From b840d2103bd69c6b86a675b4b37f28be7eddd514 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Mon, 23 Dec 2019 15:28:10 +0000 Subject: [PATCH] Do not reload table on successfull edits and deletions. Signed-off-by: DL6ER --- scripts/pi-hole/js/groups-adlists.js | 6 ++++-- scripts/pi-hole/js/groups-clients.js | 6 ++++-- scripts/pi-hole/js/groups-domains.js | 6 ++++-- scripts/pi-hole/js/groups.js | 6 ++++-- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/scripts/pi-hole/js/groups-adlists.js b/scripts/pi-hole/js/groups-adlists.js index 44b048d7..f85bedaf 100644 --- a/scripts/pi-hole/js/groups-adlists.js +++ b/scripts/pi-hole/js/groups-adlists.js @@ -319,7 +319,6 @@ function editAdlist() { "Successfully " + done + " adlist ", address ); - table.ajax.reload(); } else { showAlert( "error", @@ -360,7 +359,10 @@ function deleteAdlist() { "Successfully deleted adlist ", address ); - table.ajax.reload(); + table + .row(tr) + .remove() + .draw(); } else showAlert( "error", diff --git a/scripts/pi-hole/js/groups-clients.js b/scripts/pi-hole/js/groups-clients.js index 48d33cd4..c573f5e5 100644 --- a/scripts/pi-hole/js/groups-clients.js +++ b/scripts/pi-hole/js/groups-clients.js @@ -310,7 +310,6 @@ function editClient() { "Successfully " + done + " client", ip_name ); - table.ajax.reload(); } else { showAlert( "error", @@ -355,8 +354,11 @@ function deleteClient() { "Successfully deleted client ", ip_name ); + table + .row(tr) + .remove() + .draw(); reload_client_suggestions(); - table.ajax.reload(); } else { showAlert( "error", diff --git a/scripts/pi-hole/js/groups-domains.js b/scripts/pi-hole/js/groups-domains.js index fd9a9eb2..21e862da 100644 --- a/scripts/pi-hole/js/groups-domains.js +++ b/scripts/pi-hole/js/groups-domains.js @@ -344,7 +344,6 @@ function editDomain() { "Successfully " + done + " domain", domain ); - table.ajax.reload(); } else showAlert( "error", @@ -384,7 +383,10 @@ function deleteDomain() { "Successfully deleted domain", domain ); - table.ajax.reload(); + table + .row(tr) + .remove() + .draw(); } else showAlert( "error", diff --git a/scripts/pi-hole/js/groups.js b/scripts/pi-hole/js/groups.js index c2f5ef83..3a7c0e11 100644 --- a/scripts/pi-hole/js/groups.js +++ b/scripts/pi-hole/js/groups.js @@ -270,7 +270,6 @@ function editGroup() { "Successfully " + done + " group", name ); - table.ajax.reload(); } else { showAlert( "error", @@ -311,7 +310,10 @@ function deleteGroup() { "Successfully deleted group ", name ); - table.ajax.reload(); + table + .row(tr) + .remove() + .draw(); } else { showAlert( "error",