From 7c316912ef3baa413a1b91c2ba4af3736390155d 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 --- koha-tmpl/intranet-tmpl/prog/css/staff-global.css | 6 +++++- koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc | 13 ------------- koha-tmpl/intranet-tmpl/prog/js/acq.js | 5 ----- koha-tmpl/intranet-tmpl/prog/js/acquisitions-menu.js | 4 +--- koha-tmpl/intranet-tmpl/prog/js/admin-menu.js | 12 +++++------- koha-tmpl/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 c68bff6..db075c0 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 844926c..b6dc7fb 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 %] - -