diff --git a/groups-lists.lp b/groups-lists.lp index 8b212791..8a75f465 100644 --- a/groups-lists.lp +++ b/groups-lists.lp @@ -34,15 +34,15 @@ mg.include('scripts/pi-hole/lua/header_authenticated.lp','r')
pihole -g or update your gravity list online after modifying your adlists.pihole -g or update your gravity list online after modifying your lists.| ID | @@ -92,6 +92,6 @@ mg.include('scripts/pi-hole/lua/header_authenticated.lp','r') - + mg.include('scripts/pi-hole/lua/footer.lp','r')?> diff --git a/index.lp b/index.lp index ba246f4e..22e7db5a 100644 --- a/index.lp +++ b/index.lp @@ -64,14 +64,14 @@ mg.include('scripts/pi-hole/lua/header_authenticated.lp','r') diff --git a/scripts/pi-hole/js/groups-adlists.js b/scripts/pi-hole/js/groups-lists.js similarity index 94% rename from scripts/pi-hole/js/groups-adlists.js rename to scripts/pi-hole/js/groups-lists.js index ab1448f2..d6b477dc 100644 --- a/scripts/pi-hole/js/groups-adlists.js +++ b/scripts/pi-hole/js/groups-lists.js @@ -13,8 +13,8 @@ var GETDict = {}; $(function () { GETDict = utils.parseQueryString(); - $("#btnAddAllow").on("click", { type: "allow" }, addAdlist); - $("#btnAddBlock").on("click", { type: "block" }, addAdlist); + $("#btnAddAllow").on("click", { type: "allow" }, addList); + $("#btnAddBlock").on("click", { type: "block" }, addList); utils.setBsSelectDefaults(); initTable(); @@ -99,7 +99,7 @@ function format(data) { } function initTable() { - table = $("#adlistsTable") + table = $("#listsTable") .on("preXhr.dt", function () { getGroups(); }) @@ -135,11 +135,11 @@ function initTable() { }, ], drawCallback: function () { - // Hide buttons if all adlists were deleted + // Hide buttons if all lists were deleted var hasRows = this.api().rows({ filter: "applied" }).data().length > 0; $(".datatable-bt").css("visibility", hasRows ? "visible" : "hidden"); - $('button[id^="deleteAdlist_"]').on("click", deleteAdlist); + $('button[id^="deleteList_"]').on("click", deleteList); // Remove visible dropdown to prevent orphaning $("body > .bootstrap-select.dropdown").remove(); }, @@ -225,12 +225,12 @@ function initTable() { onstyle: "success", width: "80px", }); - statusEl.on("change", editAdlist); + statusEl.on("change", editList); $("td:eq(4)", row).html(''); var commentEl = $("#comment_" + dataId, row); commentEl.val(utils.unescapeHtml(data.comment)); - commentEl.on("change", editAdlist); + commentEl.on("change", editList); $("td:eq(5)", row).empty(); $("td:eq(5)", row).append( @@ -275,7 +275,7 @@ function initTable() { .addClass("btn-success") .prop("disabled", false) .on("click", function () { - editAdlist.call(selectEl); + editList.call(selectEl); }); } }) @@ -297,13 +297,13 @@ function initTable() { var applyBtn = "#btn_apply_" + dataId; - // Highlight row (if url parameter "adlistid=" is used) - if ("adlistid" in GETDict && data.id === parseInt(GETDict.adlistid, 10)) { + // Highlight row (if url parameter "listid=" is used) + if ("listid" in GETDict && data.id === parseInt(GETDict.listid, 10)) { $(row).find("td").addClass("highlight"); } var button = - '
|---|