From: Timothe Litt Date: Tue, 14 May 2019 21:21:56 +0000 (-0400) Subject: Make statistics tables (in HTML view) togglable X-Git-Tag: v9.15.3~31^2~4 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=86595ed8cb5cec19585bd65f83b0af1ae489b0cd;p=thirdparty%2Fbind9.git 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. --- diff --git a/bin/named/bind9.xsl b/bin/named/bind9.xsl index 00bca861379..79a9a76a50a 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; }