diff --git a/scripts/pi-hole/js/groups-adlists.js b/scripts/pi-hole/js/groups-adlists.js
index e8e9cb2c5..bbff8225b 100644
--- a/scripts/pi-hole/js/groups-adlists.js
+++ b/scripts/pi-hole/js/groups-adlists.js
@@ -465,7 +465,7 @@ function delItems(ids) {
utils.disableAll();
var idstring = ids.join(", ");
- utils.showAlert("info", "", "Deleting Adlists: " + idstring, "...");
+ utils.showAlert("info", "", "Deleting adlist(s) ...", "
");
$.ajax({
url: "scripts/pi-hole/php/groups.php",
@@ -479,7 +479,7 @@ function delItems(ids) {
utils.showAlert(
"success",
"far fa-trash-alt",
- "Successfully deleted adlists: " + idstring,
+ "Successfully deleted adlist(s): ",
""
);
for (var id in ids) {
@@ -488,7 +488,12 @@ function delItems(ids) {
}
}
} else {
- utils.showAlert("error", "", "Error while deleting adlists: " + idstring, response.message);
+ utils.showAlert(
+ "error",
+ "",
+ "Error while deleting adlist(s): " + idstring,
+ response.message
+ );
}
// Clear selection after deletion
@@ -497,7 +502,12 @@ function delItems(ids) {
})
.fail(function (jqXHR, exception) {
utils.enableAll();
- utils.showAlert("error", "", "Error while deleting adlists: " + idstring, jqXHR.responseText);
+ utils.showAlert(
+ "error",
+ "",
+ "Error while deleting adlist(s): " + idstring,
+ jqXHR.responseText
+ );
console.log(exception); // eslint-disable-line no-console
});
}
diff --git a/scripts/pi-hole/js/groups-clients.js b/scripts/pi-hole/js/groups-clients.js
index ec77bc61d..f2ad8246a 100644
--- a/scripts/pi-hole/js/groups-clients.js
+++ b/scripts/pi-hole/js/groups-clients.js
@@ -362,7 +362,7 @@ function delItems(ids) {
utils.disableAll();
var idstring = ids.join(", ");
- utils.showAlert("info", "", "Deleting clients: " + idstring, "...");
+ utils.showAlert("info", "", "Deleting client(s)...", "");
$.ajax({
url: "scripts/pi-hole/php/groups.php",
@@ -376,7 +376,7 @@ function delItems(ids) {
utils.showAlert(
"success",
"far fa-trash-alt",
- "Successfully deleted clients: " + idstring,
+ "Successfully deleted client(s): ",
""
);
for (var id in ids) {
@@ -385,7 +385,12 @@ function delItems(ids) {
}
}
} else {
- utils.showAlert("error", "", "Error while deleting clients: " + idstring, response.message);
+ utils.showAlert(
+ "error",
+ "",
+ "Error while deleting client(s): " + idstring,
+ response.message
+ );
}
// Clear selection after deletion
@@ -394,7 +399,12 @@ function delItems(ids) {
})
.fail(function (jqXHR, exception) {
utils.enableAll();
- utils.showAlert("error", "", "Error while deleting clients: " + idstring, jqXHR.responseText);
+ utils.showAlert(
+ "error",
+ "",
+ "Error while deleting client(s): " + idstring,
+ jqXHR.responseText
+ );
console.log(exception); // eslint-disable-line no-console
});
}
diff --git a/scripts/pi-hole/js/groups-domains.js b/scripts/pi-hole/js/groups-domains.js
index f1228dd53..76d29d5e2 100644
--- a/scripts/pi-hole/js/groups-domains.js
+++ b/scripts/pi-hole/js/groups-domains.js
@@ -455,7 +455,7 @@ function delItems(ids) {
utils.disableAll();
var idstring = ids.join(", ");
- utils.showAlert("info", "", "Deleting items: " + idstring, "...");
+ utils.showAlert("info", "", "Deleting domain(s)...", "");
$.ajax({
url: "scripts/pi-hole/php/groups.php",
@@ -469,7 +469,7 @@ function delItems(ids) {
utils.showAlert(
"success",
"far fa-trash-alt",
- "Successfully deleted items: " + idstring,
+ "Successfully deleted domain(s): ",
""
);
for (var id in ids) {
@@ -478,7 +478,12 @@ function delItems(ids) {
}
}
} else {
- utils.showAlert("error", "", "Error while deleting items: " + idstring, response.message);
+ utils.showAlert(
+ "error",
+ "",
+ "Error while deleting domain(s): " + idstring,
+ response.message
+ );
}
// Clear selection after deletion
@@ -487,7 +492,12 @@ function delItems(ids) {
})
.fail(function (jqXHR, exception) {
utils.enableAll();
- utils.showAlert("error", "", "Error while deleting items: " + idstring, jqXHR.responseText);
+ utils.showAlert(
+ "error",
+ "",
+ "Error while deleting domain(s): " + idstring,
+ jqXHR.responseText
+ );
console.log(exception); // eslint-disable-line no-console
});
}
diff --git a/scripts/pi-hole/js/groups.js b/scripts/pi-hole/js/groups.js
index 8f21d460d..30efc0636 100644
--- a/scripts/pi-hole/js/groups.js
+++ b/scripts/pi-hole/js/groups.js
@@ -224,7 +224,7 @@ function delItems(ids) {
utils.disableAll();
var idstring = ids.join(", ");
- utils.showAlert("info", "", "Deleting groups: " + idstring, "...");
+ utils.showAlert("info", "", "Deleting group(s)...", "");
$.ajax({
url: "scripts/pi-hole/php/groups.php",
@@ -238,7 +238,7 @@ function delItems(ids) {
utils.showAlert(
"success",
"far fa-trash-alt",
- "Successfully deleted groups: " + idstring,
+ "Successfully deleted group(s): ",
""
);
for (var id in ids) {
@@ -247,7 +247,12 @@ function delItems(ids) {
}
}
} else {
- utils.showAlert("error", "", "Error while deleting groups: " + idstring, response.message);
+ utils.showAlert(
+ "error",
+ "",
+ "Error while deleting group(s): " + idstring,
+ response.message
+ );
}
// Clear selection after deletion
@@ -256,7 +261,12 @@ function delItems(ids) {
})
.fail(function (jqXHR, exception) {
utils.enableAll();
- utils.showAlert("error", "", "Error while deleting groups: " + idstring, jqXHR.responseText);
+ utils.showAlert(
+ "error",
+ "",
+ "Error while deleting group(s): " + idstring,
+ jqXHR.responseText
+ );
console.log(exception); // eslint-disable-line no-console
});
}
diff --git a/scripts/pi-hole/js/messages.js b/scripts/pi-hole/js/messages.js
index a480d550c..a2668aca9 100644
--- a/scripts/pi-hole/js/messages.js
+++ b/scripts/pi-hole/js/messages.js
@@ -338,7 +338,7 @@ function delMsg(ids) {
utils.disableAll();
var idstring = ids.join(", ");
- utils.showAlert("info", "", "Deleting messages: " + idstring, "...");
+ utils.showAlert("info", "", "Deleting message(s)...");
$.ajax({
url: "scripts/pi-hole/php/message.php",
@@ -349,19 +349,19 @@ function delMsg(ids) {
.done(function (response) {
utils.enableAll();
if (response.success) {
- utils.showAlert(
- "success",
- "far fa-trash-alt",
- "Successfully deleted messages: " + idstring,
- ""
- );
+ utils.showAlert("success", "far fa-trash-alt", "Successfully deleted message(s)", "");
for (var id in ids) {
if (Object.hasOwnProperty.call(ids, id)) {
table.row(id).remove().draw(false).ajax.reload(null, false);
}
}
} else {
- utils.showAlert("error", "", "Error while deleting message: " + idstring, response.message);
+ utils.showAlert(
+ "error",
+ "",
+ "Error while deleting message(s): " + idstring,
+ response.message
+ );
}
// Clear selection after deletion
@@ -373,7 +373,12 @@ function delMsg(ids) {
)
.fail(function (jqXHR, exception) {
utils.enableAll();
- utils.showAlert("error", "", "Error while deleting message: " + idstring, jqXHR.responseText);
+ utils.showAlert(
+ "error",
+ "",
+ "Error while deleting message(s): " + idstring,
+ jqXHR.responseText
+ );
console.log(exception); // eslint-disable-line no-console
});
}
diff --git a/scripts/pi-hole/js/network.js b/scripts/pi-hole/js/network.js
index 20c6c678d..7899374b0 100644
--- a/scripts/pi-hole/js/network.js
+++ b/scripts/pi-hole/js/network.js
@@ -65,7 +65,7 @@ function deleteNetworkEntry() {
var id = tr.attr("data-id");
utils.disableAll();
- utils.showAlert("info", "", "Deleting network table entry with ID " + parseInt(id, 10), "...");
+ utils.showAlert("info", "", "Deleting network table entry...");
$.ajax({
url: "scripts/pi-hole/php/network.php",
method: "post",
@@ -74,12 +74,7 @@ function deleteNetworkEntry() {
success: function (response) {
utils.enableAll();
if (response.success) {
- utils.showAlert(
- "success",
- "far fa-trash-alt",
- "Successfully deleted network table entry # ",
- id
- );
+ utils.showAlert("success", "far fa-trash-alt", "Successfully deleted network table entry");
tableApi.row(tr).remove().draw(false).ajax.reload(null, false);
} else {
utils.showAlert(