mirror of
https://github.com/pi-hole/web.git
synced 2025-12-24 20:55:28 +00:00
Merge pull request #1149 from pi-hole/new/space-separated-item-injection
Allow space separated multiple items injection
This commit is contained in:
@@ -217,28 +217,6 @@ $(document).ready(function() {
|
||||
$('[data-toggle="tooltip"]').tooltip({ html: true, container: "body" });
|
||||
});
|
||||
|
||||
// Handle list deletion
|
||||
$("button[id^='adlist-btn-']").on("click", function(e) {
|
||||
var id = parseInt($(this).context.id.replace(/[^0-9.]/g, ""), 10);
|
||||
e.preventDefault();
|
||||
|
||||
var status = $('input[name="adlist-del-' + id + '"]').is(":checked");
|
||||
var textType = status ? "none" : "line-through";
|
||||
|
||||
// Check hidden delete box (or reset)
|
||||
$('input[name="adlist-del-' + id + '"]').prop("checked", !status);
|
||||
// Untick and disable check box (or reset)
|
||||
$('input[name="adlist-enable-' + id + '"]')
|
||||
.prop("checked", status)
|
||||
.prop("disabled", !status);
|
||||
// Strike through text (or reset)
|
||||
$('a[id="adlist-text-' + id + '"]').css("text-decoration", textType);
|
||||
// Highlight that the button has to be clicked in order to make the change live
|
||||
$('button[id="blockinglistsaveupdate"]')
|
||||
.addClass("btn-danger")
|
||||
.css("font-weight", "bold");
|
||||
});
|
||||
|
||||
// Change "?tab=" parameter in URL for save and reload
|
||||
$(".nav-tabs a").on("shown.bs.tab", function(e) {
|
||||
var tab = e.target.hash.substring(1);
|
||||
|
||||
Reference in New Issue
Block a user