From d55847013f09f2df322c746fa76b1d87abdf83b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Mon, 10 Oct 2022 15:57:17 +0200 Subject: [PATCH] Fix deprecated warnings of jquery-migrate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- scripts/pi-hole/js/db_graph.js | 2 +- scripts/pi-hole/js/db_queries.js | 4 +- scripts/pi-hole/js/footer.js | 6 +-- scripts/pi-hole/js/groups-domains.js | 2 +- scripts/pi-hole/js/index.js | 4 +- scripts/pi-hole/js/network.js | 4 +- scripts/pi-hole/js/queries.js | 56 +++++++++++++++------------- scripts/pi-hole/js/queryads.js | 2 +- scripts/pi-hole/js/settings.js | 12 +++--- scripts/pi-hole/js/taillog-FTL.js | 4 +- scripts/pi-hole/js/taillog.js | 4 +- 11 files changed, 53 insertions(+), 47 deletions(-) diff --git a/scripts/pi-hole/js/db_graph.js b/scripts/pi-hole/js/db_graph.js index 4ca0fb6b..c8405a5a 100644 --- a/scripts/pi-hole/js/db_graph.js +++ b/scripts/pi-hole/js/db_graph.js @@ -390,7 +390,7 @@ $("#querytime").on("apply.daterangepicker", function (ev, picker) { updateQueriesOverTime(); }); -$("#queryOverTimeChart").click(function (evt) { +$("#queryOverTimeChart").on("click", function (evt) { var activePoints = timeLineChart.getElementsAtEventForMode( evt, "nearest", diff --git a/scripts/pi-hole/js/db_queries.js b/scripts/pi-hole/js/db_queries.js index 9afbf402..46f41858 100644 --- a/scripts/pi-hole/js/db_queries.js +++ b/scripts/pi-hole/js/db_queries.js @@ -464,12 +464,12 @@ $("#querytime").on("apply.daterangepicker", function (ev, picker) { refreshTableData(); }); -$("input[id^=type]").change(function () { +$("input[id^=type]").on("change", function () { if (datepickerManuallySelected) { reloadBox.show(); } }); -$(".bt-reload").click(function () { +$(".bt-reload").on("click", function () { refreshTableData(); }); diff --git a/scripts/pi-hole/js/footer.js b/scripts/pi-hole/js/footer.js index d562ceb7..73ab2107 100644 --- a/scripts/pi-hole/js/footer.js +++ b/scripts/pi-hole/js/footer.js @@ -150,7 +150,7 @@ function initCheckboxRadioStyle() { var iCheckStyle = $("#iCheckStyle"); if (iCheckStyle !== null) { iCheckStyle.val(chkboxStyle); - iCheckStyle.change(function () { + iCheckStyle.on("change", function () { var themename = $(this).val(); localStorage.setItem("theme_icheck", themename); applyCheckboxRadioStyle(themename); @@ -197,7 +197,7 @@ function initCPUtemp() { var tempunitSelector = $("#tempunit-selector"); if (tempunitSelector !== null) { tempunitSelector.val(tempunit); - tempunitSelector.change(function () { + tempunitSelector.on("change", function () { tempunit = $(this).val(); setCPUtemp(tempunit); }); @@ -256,7 +256,7 @@ $("#pihole-disable-custom").on("click", function (e) { }); // Handle Ctrl + Enter button on Login page -$(document).keypress(function (e) { +$(document).on("keypress", function (e) { if ((e.keyCode === 10 || e.keyCode === 13) && e.ctrlKey && $("#loginpw").is(":focus")) { $("#loginform").attr("action", "settings.php"); $("#loginform").submit(); diff --git a/scripts/pi-hole/js/groups-domains.js b/scripts/pi-hole/js/groups-domains.js index 1dd2c026..f1228dd5 100644 --- a/scripts/pi-hole/js/groups-domains.js +++ b/scripts/pi-hole/js/groups-domains.js @@ -69,7 +69,7 @@ function showSuggestDomains(value) { // Purposefully omit 'btn' class to save space on padding return $('