From 86595ed8cb5cec19585bd65f83b0af1ae489b0cd Mon Sep 17 00:00:00 2001 From: Timothe Litt Date: Tue, 14 May 2019 17:21:56 -0400 Subject: [PATCH] Make statistics tables (in HTML view) togglable The HTML view of the statistics channel creates pages with many long tables. These can be difficult to navigate. This commit adds a "show/hide" toggle to each heading, which makes it easy to compress/expand the view. --- bin/named/bind9.xsl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/named/bind9.xsl b/bin/named/bind9.xsl index 00bca86137..79a9a76a50 100644 --- a/bin/named/bind9.xsl +++ b/bin/named/bind9.xsl @@ -21,6 +21,8 @@ var wid=0; $('table.zones').each(function(i) { if( $(this).width() > wid ) wid = $(this).width(); return true; }); $('table.zones').css('min-width', wid ); + $("h2+table,h3+table,h4+table").prev().append(' Show/Hide'); + $(".tabletoggle").click(function(){ $(this).closest("h2,h3,h4").next().toggleClass("hidden"); return false;}); }); @@ -90,6 +92,10 @@ font-size: 10pt; } + .hidden{ + display: none; + } + .odd{ background-color: #f0f0f0; }