]> git.koha-community.org Git - koha.git/commit
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)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 2 Jul 2018 16:58:15 +0000 (17:58 +0100)
commit5253c38864b9e8ebca18c2a8645e58b48290b677
tree1eca7ca6bc9c1343a36a9399145ca07ec858242b
parent693d68b64746ffd5569d32f2524e3587792908a1
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>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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