Bug 20931: JS error "ReferenceError: $ is not defined" when CircSidebar is turned on
authorOwen Leonard <oleonard@myacpl.org>
Wed, 20 Jun 2018 17:16:16 +0000 (17:16 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Mon, 2 Jul 2018 11:10:00 +0000 (11:10 +0000)
commit0254b4e87df2879d9de97a8651fd1f325fc4495c
tree7b45f9a8ce7eb3290d23b23a13813d704b0acd73
parent3e3cf93bff75bb4432889345024595e848108df1
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 <charles.farmer@inLibro.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/css/staff-global.css
koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc
koha-tmpl/intranet-tmpl/prog/js/acq.js
koha-tmpl/intranet-tmpl/prog/js/acquisitions-menu.js
koha-tmpl/intranet-tmpl/prog/js/admin-menu.js
koha-tmpl/intranet-tmpl/prog/js/staff-global.js
koha-tmpl/intranet-tmpl/prog/js/tools-menu.js