mirror of
https://github.com/pi-hole/web.git
synced 2026-04-28 04:33:58 +01:00
Add support the same list being used once as allow- and once as blocklist
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -41,7 +41,7 @@ function processGroupResult(data, type, done, notDone) {
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
function delGroupItems(type, ids, table) {
|
||||
function delGroupItems(type, ids, table, listType = undefined) {
|
||||
// Check input validity
|
||||
if (!Array.isArray(ids)) return;
|
||||
|
||||
@@ -60,6 +60,11 @@ function delGroupItems(type, ids, table) {
|
||||
// Append "s" to type if more than one item is deleted
|
||||
type += ids.length > 1 ? "s" : "";
|
||||
|
||||
// Prepend listType to type if it is not undefined
|
||||
if (listType !== undefined) {
|
||||
type = listType + " " + type;
|
||||
}
|
||||
|
||||
utils.disableAll();
|
||||
utils.showAlert("info", "", "Deleting " + ids.length + " " + type + "...", idstring);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user