mirror of
https://github.com/pi-hole/web.git
synced 2026-04-22 01:39:50 +01:00
Use button to remove lists
This commit is contained in:
@@ -87,3 +87,14 @@ $(document).ready(function(){
|
||||
$("[data-toggle=\"tooltip\"]").tooltip({"html": true, container : "body"});
|
||||
});
|
||||
|
||||
// Handle list deletion
|
||||
$("button[id^='adlist-btn-']").on("click", function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var status = $(this).siblings("input[name^='adlist-del-']").is(":checked");
|
||||
var text_type = status ? "none" : "line-through";
|
||||
|
||||
$(this).siblings("input[name^='adlist-del-']").prop("checked", !status);
|
||||
$(this).siblings("input[name^='adlist-enable-']").prop("disabled", !status);
|
||||
$(this).siblings("a").css("text-decoration", text_type);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user