From b0e16975e490a02eeb7638d08925ddd6bd2b7fff Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sat, 23 Sep 2017 13:55:09 +0200 Subject: [PATCH] Show reset button only if one-click filtering is actually used Signed-off-by: DL6ER --- queries.php | 2 +- scripts/pi-hole/js/queries.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/queries.php b/queries.php index 108592f6..ebd06443 100644 --- a/queries.php +++ b/queries.php @@ -134,7 +134,7 @@ if(strlen($showing) > 0) - + diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index 9012d2fc..f72b6e21 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -189,11 +189,11 @@ $(document).ready(function() { "initComplete": function () { var api = this.api(); // Query type IPv4 / IPv6 - api.$('td:eq(1)').click( function () { api.search( this.innerHTML ).draw(); } ); + api.$('td:eq(1)').click( function () { api.search( this.innerHTML ).draw(); $('#resetButton').show(); } ); // Domain - api.$('td:eq(2)').click( function () { api.search( this.innerHTML ).draw(); } ); + api.$('td:eq(2)').click( function () { api.search( this.innerHTML ).draw(); $('#resetButton').show(); } ); // Client - api.$('td:eq(3)').click( function () { api.search( this.innerHTML ).draw(); } ); + api.$('td:eq(3)').click( function () { api.search( this.innerHTML ).draw(); $('#resetButton').show(); } ); } }); @@ -209,7 +209,7 @@ $(document).ready(function() { } } ); - $('#resetButton').click( function () { tableApi.search("").draw(); } ); + $('#resetButton').click( function () { tableApi.search("").draw(); $('#resetButton').hide(); } ); } );