From 27b99653b988f5a9e516f2ec296df2800625ca14 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 28 Sep 2020 11:09:01 +0000 Subject: [PATCH] Bug 26207: (follow-up) Hide comparison toolbar if there are no comparisons This patch adds a check to the JavaScript so that the comparisons toolbar will be hidden if there are no system preferences in the results to compare. --- koha-tmpl/intranet-tmpl/prog/js/viewlog.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/js/viewlog.js b/koha-tmpl/intranet-tmpl/prog/js/viewlog.js index 04eb6c7b2f..58c126de59 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/viewlog.js +++ b/koha-tmpl/intranet-tmpl/prog/js/viewlog.js @@ -51,6 +51,13 @@ function limitCheckboxes() { $(document).ready(function(){ limitCheckboxes(); + + if( $(".compare_info").length == 0 ){ + /* Remove toolbar if there are no system preference + entries to compare */ + $("#toolbar").remove(); + } + if ($('#toolbar').length) { Sticky = $("#toolbar"); Sticky.hcSticky({ -- 2.11.0