From 5253c38864b9e8ebca18c2a8645e58b48290b677 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 20 Jun 2018 17:16:16 +0000 Subject: [PATCH] Bug 20931: JS error "ReferenceError: $ is not defined" when CircSidebar is turned on This patch reorganizes the way sidebar menus get highlighted based on the current page. A global function is added to handle most cases. Individual menu-handling scripts have been modified to handle only the edge cases which aren't covered by the global one. A new class is added to the global CSS file so that highlighted menu links can be custom-styled. To test, apply the patch and clear your cache if necessary. View various pages to confirm that current-page-highlighting in the sidebar menu is working correctly and that there are no JS errors in the browser console. For example: - Administration -> Currencies and exchange rates. - Acquisitions -> Invoices - Tools -> Patron lists - Tools -> Export And with CircSidebar turned on test various circulation pages, e.g. - Circulation -> Set library Signed-off-by: Charles Farmer Signed-off-by: Jonathan Druart Signed-off-by: Nick Clemens Signed-off-by: Martin Renvoize --- .../intranet-tmpl/prog/css/staff-global.css | 6 +++++- .../prog/en/includes/circ-nav.inc | 13 ------------- koha-tmpl/intranet-tmpl/prog/js/acq.js | 5 ----- .../intranet-tmpl/prog/js/acquisitions-menu.js | 4 +--- koha-tmpl/intranet-tmpl/prog/js/admin-menu.js | 12 +++++------- .../intranet-tmpl/prog/js/staff-global.js | 12 ++++++++++++ koha-tmpl/intranet-tmpl/prog/js/tools-menu.js | 18 ++++++++---------- 7 files changed, 31 insertions(+), 39 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/css/staff-global.css index c68bff67f9..db075c000c 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/css/staff-global.css @@ -163,7 +163,11 @@ label input[type="radio"], } #navmenulist li a { - text-decoration : none; + text-decoration : none; +} + +#navmenulist li a.current { + font-weight: bold; } #doc, #doc1, #doc2, #doc3 { diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc index 844926c83a..b6dc7fbdf6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc @@ -1,17 +1,4 @@ [% USE Branches %] - -