From 497f539a15bd35eed29fe3fdf5322b62201c59be Mon Sep 17 00:00:00 2001 From: Nathan Ahrens Date: Mon, 8 Apr 2019 14:36:32 -0400 Subject: [PATCH] allow selecting apps by category --- Bulk Mobile App Scoping/static/main.js | 8 +++++--- Bulk Mobile App Scoping/templates/apps.html | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Bulk Mobile App Scoping/static/main.js b/Bulk Mobile App Scoping/static/main.js index dda768c..ce30338 100644 --- a/Bulk Mobile App Scoping/static/main.js +++ b/Bulk Mobile App Scoping/static/main.js @@ -4,11 +4,13 @@ $("#checkAll").click(function() { function categorySelect() { var category=$("#catsel").val(); - console.log(category); $("tr.approw").each(function(index, element) { - var rowcat = $(element).children("td.catname").text().trim(); // get td with category + // console.log(element.childNodes[9].innerText); + var rowcat = element.childNodes[9].innerText; // get td with category if (category == rowcat) { - $(element).children().get(0).children(0).prop("checked", true); // set the checkbox to checked + element.childNodes[1].childNodes[1].setAttribute("checked", true); + } else { + element.childNodes[1].childNodes[1].removeAttribute("checked"); } }); } diff --git a/Bulk Mobile App Scoping/templates/apps.html b/Bulk Mobile App Scoping/templates/apps.html index 26b4d69..a680f24 100644 --- a/Bulk Mobile App Scoping/templates/apps.html +++ b/Bulk Mobile App Scoping/templates/apps.html @@ -37,7 +37,7 @@

App Management