From 28b7e853737825b6462ac53f5677d146f86445fa Mon Sep 17 00:00:00 2001 From: Lion Ralfs Date: Sat, 2 Oct 2021 15:31:41 +0200 Subject: [PATCH 1/2] fix: exclude status checkboxes from being treated as iCheck elements Signed-off-by: Lion Ralfs --- scripts/pi-hole/js/footer.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/pi-hole/js/footer.js b/scripts/pi-hole/js/footer.js index a590e5704..ad8c114e4 100644 --- a/scripts/pi-hole/js/footer.js +++ b/scripts/pi-hole/js/footer.js @@ -137,8 +137,9 @@ function initCheckboxRadioStyle() { function applyCheckboxRadioStyle(style) { boxsheet.attr("href", getCheckboxURL(style)); - // Get all radio/checkboxes for theming, with the exception of the two radio buttons on the custom disable timer - var sel = $("input[type='radio'],input[type='checkbox']").not("#selSec").not("#selMin"); + // Get all radio/checkboxes for theming, with the exception of the two radio buttons on the custom disable timer, + // as well as every element with an id that starts with "status_" + var sel = $("input[type='radio'],input[type='checkbox']").not("#selSec").not("#selMin").not('[id^=status_]'); sel.parent().removeClass(); sel.parent().addClass("icheck-" + style); } From 15f4b4c25fdbb212e20e50b06f072666348cb341 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Mon, 4 Oct 2021 21:42:01 +0100 Subject: [PATCH 2/2] address prettier complaints Signed-off-by: Adam Warner --- scripts/pi-hole/js/footer.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/pi-hole/js/footer.js b/scripts/pi-hole/js/footer.js index ad8c114e4..763e8ae92 100644 --- a/scripts/pi-hole/js/footer.js +++ b/scripts/pi-hole/js/footer.js @@ -139,7 +139,10 @@ function initCheckboxRadioStyle() { boxsheet.attr("href", getCheckboxURL(style)); // Get all radio/checkboxes for theming, with the exception of the two radio buttons on the custom disable timer, // as well as every element with an id that starts with "status_" - var sel = $("input[type='radio'],input[type='checkbox']").not("#selSec").not("#selMin").not('[id^=status_]'); + var sel = $("input[type='radio'],input[type='checkbox']") + .not("#selSec") + .not("#selMin") + .not("[id^=status_]"); sel.parent().removeClass(); sel.parent().addClass("icheck-" + style); }