From b22c92a7387670fe9ce97f8a3a0d1d0703822efc Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sun, 13 Nov 2016 19:16:57 +0100 Subject: [PATCH] Add individual labels for the black-/whitelisting button --- js/pihole/queries.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/js/pihole/queries.js b/js/pihole/queries.js index 9f2c7aa8..b9368c59 100644 --- a/js/pihole/queries.js +++ b/js/pihole/queries.js @@ -2,10 +2,12 @@ $(document).ready(function() { tableApi = $('#all-queries').DataTable( { "rowCallback": function( row, data, index ){ if (data[4] == "Pi-holed") { - $(row).css('color','red') + $(row).css('color','red'); + $('td:eq(5)', row).html( '' ); } else{ - $(row).css('color','green') + $(row).css('color','green'); + $('td:eq(5)', row).html( '' ); } }, @@ -16,14 +18,14 @@ $(document).ready(function() { { "width" : "20%", "type": "date" }, { "width" : "10%" }, { "width" : "40%" }, - { "width" : "12.5%" }, - { "width" : "12.5%" }, - { "width" : "5%" }, + { "width" : "10%" }, + { "width" : "10%" }, + { "width" : "10%" }, ], "columnDefs": [ { "targets": -1, "data": null, - "defaultContent": "" + "defaultContent": '' } ] }); $('#all-queries tbody').on( 'click', 'button', function () {