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:
DL6ER
2024-02-13 08:41:50 +01:00
parent da7c0efb02
commit d7cf23ba2f
2 changed files with 29 additions and 22 deletions

View File

@@ -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);