diff --git a/db_queries.php b/db_queries.php index 18b729d9..fdb2f055 100644 --- a/db_queries.php +++ b/db_queries.php @@ -43,21 +43,21 @@
-
- +

+
-
- +

+
-
- +

+
-
-
- +

+

+
diff --git a/groups-domains.php b/groups-domains.php index 3d23b723..45d9a0bd 100644 --- a/groups-domains.php +++ b/groups-domains.php @@ -52,7 +52,7 @@ - + diff --git a/queries.php b/queries.php index a1e2695b..3723ed17 100644 --- a/queries.php +++ b/queries.php @@ -138,7 +138,10 @@ if(strlen($showing) > 0) -
+
+ + +
diff --git a/scripts/pi-hole/js/footer.js b/scripts/pi-hole/js/footer.js index b5b69460..05fe1097 100644 --- a/scripts/pi-hole/js/footer.js +++ b/scripts/pi-hole/js/footer.js @@ -125,6 +125,15 @@ function testCookies() { return ret; } +function applyCheckboxRadioStyle() { + var chkboxStyle = localStorage.getItem("theme_icheck"); + if (chkboxStyle === null) { + chkboxStyle = "material-blue"; + } + $("input[type='radio'],input[type='checkbox']").parent().removeClass(); + $("input[type='radio'],input[type='checkbox']").parent().addClass("icheck-" + chkboxStyle); +} + $(function () { var enaT = $("#enableTimer"); var target = new Date(parseInt(enaT.html())); @@ -137,12 +146,8 @@ $(function () { $("#cookieInfo").show(); } - var checkboxTheme = $("#checkbox_theme").text(); - $("input").icheck({ - checkboxClass: "icheckbox_" + checkboxTheme, - radioClass: "iradio_" + checkboxTheme, - increaseArea: "20%" - }); + applyCheckboxRadioStyle(); + // Run check immediately after page loading ... checkMessages(); // ... and once again with five seconds delay diff --git a/scripts/pi-hole/js/settings.js b/scripts/pi-hole/js/settings.js index 37598007..de0d994d 100644 --- a/scripts/pi-hole/js/settings.js +++ b/scripts/pi-hole/js/settings.js @@ -274,4 +274,17 @@ $(function () { bargraphs.click(function () { localStorage.setItem("barchart_chkbox", bargraphs.prop("checked")); }); + + // iCheck style toggle + var iCheckSelect = $("#iCheckStyle"); + var iCheckStyle = localStorage.getItem("theme_icheck"); + if (iCheckStyle === null) { + iCheckStyle = "material-blue"; + } + iCheckSelect.val(iCheckStyle); + + iCheckSelect.change(function () { + localStorage.setItem("theme_icheck", iCheckSelect.val()); + applyCheckboxRadioStyle(); + }); }); diff --git a/scripts/pi-hole/php/header.php b/scripts/pi-hole/php/header.php index 65ed77fc..56468546 100644 --- a/scripts/pi-hole/php/header.php +++ b/scripts/pi-hole/php/header.php @@ -214,7 +214,7 @@ - + @@ -226,7 +226,6 @@ -