mirror of
https://github.com/pi-hole/web.git
synced 2026-02-15 07:25:39 +00:00
Update jQuery to v3.6.1. (#2392)
This commit is contained in:
@@ -393,7 +393,7 @@ $("#querytime").on("apply.daterangepicker", function (ev, picker) {
|
||||
updateQueriesOverTime();
|
||||
});
|
||||
|
||||
$("#queryOverTimeChart").click(function (evt) {
|
||||
$("#queryOverTimeChart").on("click", function (evt) {
|
||||
var activePoints = timeLineChart.getElementsAtEventForMode(
|
||||
evt,
|
||||
"nearest",
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -69,7 +69,7 @@ function showSuggestDomains(value) {
|
||||
// Purposefully omit 'btn' class to save space on padding
|
||||
return $('<button type="button" class="btn-link btn-block text-right">')
|
||||
.append($("<i>").text(hostname))
|
||||
.click(function () {
|
||||
.on("click", function () {
|
||||
hideSuggestDomains();
|
||||
newDomainEl.val(hostname);
|
||||
});
|
||||
|
||||
@@ -1071,7 +1071,7 @@ $(function () {
|
||||
updateTopClientsChart();
|
||||
}
|
||||
|
||||
$("#queryOverTimeChart").click(function (evt) {
|
||||
$("#queryOverTimeChart").on("click", function (evt) {
|
||||
var activePoints = timeLineChart.getElementsAtEventForMode(
|
||||
evt,
|
||||
"nearest",
|
||||
@@ -1093,7 +1093,7 @@ $(function () {
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#clientsChart").click(function (evt) {
|
||||
$("#clientsChart").on("click", function (evt) {
|
||||
var activePoints = clientsChart.getElementsAtEventForMode(
|
||||
evt,
|
||||
"nearest",
|
||||
|
||||
@@ -178,7 +178,7 @@ $(function () {
|
||||
}
|
||||
|
||||
$("td:eq(3)", row).html(names.join("<br>"));
|
||||
$("td:eq(3)", row).hover(function () {
|
||||
$("td:eq(3)", row).on("hover", function () {
|
||||
this.title = allnames.join("\n");
|
||||
});
|
||||
}
|
||||
@@ -201,7 +201,7 @@ $(function () {
|
||||
}
|
||||
|
||||
$("td:eq(0)", row).html(ips.join("<br>"));
|
||||
$("td:eq(0)", row).hover(function () {
|
||||
$("td:eq(0)", row).on("hover", function () {
|
||||
this.title = data.ip.join("\n");
|
||||
});
|
||||
|
||||
|
||||
@@ -240,17 +240,18 @@ $(function () {
|
||||
$("td:eq(6)", row).html(buttontext);
|
||||
|
||||
if (DomainlistLink) {
|
||||
$("td:eq(4)", row).hover(
|
||||
function () {
|
||||
$("td:eq(4)", row).on(
|
||||
"hover",
|
||||
(function () {
|
||||
this.title = "Click to show matching blacklist/whitelist domain";
|
||||
this.style.color = "#72afd2";
|
||||
},
|
||||
function () {
|
||||
this.style.color = "";
|
||||
}
|
||||
})
|
||||
);
|
||||
$("td:eq(4)", row).off(); // Release any possible previous onClick event handlers
|
||||
$("td:eq(4)", row).click(function () {
|
||||
$("td:eq(4)", row).on("click", function () {
|
||||
var newTab = window.open("groups-domains.php?domainid=" + data[9], "_blank");
|
||||
if (newTab) {
|
||||
newTab.focus();
|
||||
@@ -366,80 +367,85 @@ $(function () {
|
||||
// Query type IPv4 / IPv6
|
||||
api
|
||||
.$("td:eq(1)")
|
||||
.click(function (event) {
|
||||
.on("click", function (event) {
|
||||
addColumnFilter(event, 1, this.textContent);
|
||||
})
|
||||
.hover(
|
||||
function () {
|
||||
.on(
|
||||
"hover",
|
||||
(function () {
|
||||
$(this).addClass("pointer").attr("title", tooltipText(1, this.textContent));
|
||||
},
|
||||
function () {
|
||||
$(this).removeClass("pointer");
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
// Domain
|
||||
api
|
||||
.$("td:eq(2)")
|
||||
.click(function (event) {
|
||||
.on("click", function (event) {
|
||||
addColumnFilter(event, 2, this.textContent.split("\n")[0]);
|
||||
})
|
||||
.hover(
|
||||
function () {
|
||||
.on(
|
||||
"hover",
|
||||
(function () {
|
||||
$(this).addClass("pointer").attr("title", tooltipText(2, this.textContent));
|
||||
},
|
||||
function () {
|
||||
$(this).removeClass("pointer");
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
// Client
|
||||
api
|
||||
.$("td:eq(3)")
|
||||
.click(function (event) {
|
||||
.on("click", function (event) {
|
||||
addColumnFilter(event, 3, this.textContent);
|
||||
})
|
||||
.hover(
|
||||
function () {
|
||||
.on(
|
||||
"hover",
|
||||
(function () {
|
||||
$(this).addClass("pointer").attr("title", tooltipText(3, this.textContent));
|
||||
},
|
||||
function () {
|
||||
$(this).removeClass("pointer");
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
// Status
|
||||
api
|
||||
.$("td:eq(4)")
|
||||
.click(function (event) {
|
||||
.on("click", function (event) {
|
||||
var id = this.children.id.value;
|
||||
var text = this.textContent;
|
||||
addColumnFilter(event, 4, id + "#" + text);
|
||||
})
|
||||
.hover(
|
||||
function () {
|
||||
.on(
|
||||
"hover",
|
||||
(function () {
|
||||
$(this).addClass("pointer").attr("title", tooltipText(4, this.textContent));
|
||||
},
|
||||
function () {
|
||||
$(this).removeClass("pointer");
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
// Reply type
|
||||
api
|
||||
.$("td:eq(5)")
|
||||
.click(function (event) {
|
||||
.on("click", function (event) {
|
||||
var id = this.children.id.value;
|
||||
var text = this.textContent.split(" ")[0];
|
||||
addColumnFilter(event, 5, id + "#" + text);
|
||||
})
|
||||
.hover(
|
||||
function () {
|
||||
.on(
|
||||
"hover",
|
||||
(function () {
|
||||
$(this).addClass("pointer").attr("title", tooltipText(5, this.textContent));
|
||||
},
|
||||
function () {
|
||||
$(this).removeClass("pointer");
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
// Disable autocorrect in the search box
|
||||
@@ -465,7 +471,7 @@ $(function () {
|
||||
}
|
||||
});
|
||||
|
||||
$("#resetButton").click(function () {
|
||||
$("#resetButton").on("click", function () {
|
||||
tableApi.search("");
|
||||
resetColumnsFilters();
|
||||
});
|
||||
|
||||
@@ -87,7 +87,7 @@ function eventsource() {
|
||||
}
|
||||
|
||||
// Handle enter key
|
||||
$("#domain").keypress(function (e) {
|
||||
$("#domain").on("keypress", function (e) {
|
||||
if (e.which === 13) {
|
||||
// Enter was pressed, and the input has focus
|
||||
exact = "";
|
||||
|
||||
@@ -59,7 +59,7 @@ $(function () {
|
||||
});
|
||||
|
||||
// display selected import file on button's adjacent textfield
|
||||
$("#zip_file").change(function () {
|
||||
$("#zip_file").on("change", function () {
|
||||
var fileName = $(this)[0].files.length === 1 ? $(this)[0].files[0].name : "";
|
||||
$("#zip_filename").val(fileName);
|
||||
});
|
||||
@@ -194,7 +194,7 @@ $("#apiTokenModal").on("show.bs.modal", function () {
|
||||
$('iframe[name="apiToken_iframe"]').contents().find("table").css(qrCodeStyle);
|
||||
});
|
||||
|
||||
$("#DHCPchk").click(function () {
|
||||
$("#DHCPchk").on("click", function () {
|
||||
$("input.DHCPgroup").prop("disabled", !this.checked);
|
||||
$("#dhcpnotice").prop("hidden", !this.checked).addClass("lookatme");
|
||||
});
|
||||
@@ -347,7 +347,7 @@ $(function () {
|
||||
|
||||
// En-/disable conditional forwarding input fields based
|
||||
// on the checkbox state
|
||||
$('input[name="rev_server"]').click(function () {
|
||||
$('input[name="rev_server"]').on("click", function () {
|
||||
$('input[name="rev_server_cidr"]').prop("disabled", !this.checked);
|
||||
$('input[name="rev_server_target"]').prop("disabled", !this.checked);
|
||||
$('input[name="rev_server_domain"]').prop("disabled", !this.checked);
|
||||
@@ -377,7 +377,7 @@ $(function () {
|
||||
}
|
||||
}
|
||||
|
||||
bargraphs.click(function () {
|
||||
bargraphs.on("click", function () {
|
||||
localStorage.setItem("barchart_chkbox", bargraphs.prop("checked"));
|
||||
});
|
||||
});
|
||||
@@ -397,7 +397,7 @@ $(function () {
|
||||
}
|
||||
}
|
||||
|
||||
colorfulQueryLog.click(function () {
|
||||
colorfulQueryLog.on("click", function () {
|
||||
localStorage.setItem("colorfulQueryLog_chkbox", colorfulQueryLog.prop("checked"));
|
||||
});
|
||||
});
|
||||
@@ -463,7 +463,7 @@ $(function () {
|
||||
}
|
||||
}
|
||||
|
||||
nonfatalwarnigns.click(function () {
|
||||
nonfatalwarnigns.on("click", function () {
|
||||
localStorage.setItem("hideNonfatalDnsmasqWarnings_chkbox", nonfatalwarnigns.prop("checked"));
|
||||
// Call check messages to make new setting effective
|
||||
checkMessages();
|
||||
|
||||
@@ -39,11 +39,11 @@ $(function () {
|
||||
reloadData();
|
||||
});
|
||||
|
||||
$("#chk1").click(function () {
|
||||
$("#chk1").on("click", function () {
|
||||
$("#chk2").prop("checked", this.checked);
|
||||
scrolling = this.checked;
|
||||
});
|
||||
$("#chk2").click(function () {
|
||||
$("#chk2").on("click", function () {
|
||||
$("#chk1").prop("checked", this.checked);
|
||||
scrolling = this.checked;
|
||||
});
|
||||
|
||||
@@ -39,11 +39,11 @@ $(function () {
|
||||
reloadData();
|
||||
});
|
||||
|
||||
$("#chk1").click(function () {
|
||||
$("#chk1").on("click", function () {
|
||||
$("#chk2").prop("checked", this.checked);
|
||||
scrolling = this.checked;
|
||||
});
|
||||
$("#chk2").click(function () {
|
||||
$("#chk2").on("click", function () {
|
||||
$("#chk1").prop("checked", this.checked);
|
||||
scrolling = this.checked;
|
||||
});
|
||||
|
||||
4
scripts/vendor/jquery.min.js
vendored
4
scripts/vendor/jquery.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user