If CircSidebar is set and you hit /cgi-bin/koha/circ/returns.pl, you will get "ReferenceError: $ is not defined"
I can confirm the error, but haven't been able to locate the mistake in the code yet. Only thing I notice is some errors from the validator - 2 stay </div> tags.
Ah, I think the JavaScript for navbar needs to be moved to the bottom.
(In reply to Katrin Fischer from comment #2) > Ah, I think the JavaScript for navbar needs to be moved to the bottom. It needs to be moved to a separate JS file or a JS file which is already included on the affected pages. It's on my to-do list but someone else can take it if they want. As far as I know it's only a cosmetic issue -- the highlighting of the current page won't work.
Created attachment 76215 [details] [review] 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
Could reproduce, and went through most pages in the sidebar: the ones I visited were indeed highlighted as active, and the '$' error went away after applying patch.
Created attachment 76312 [details] [review] 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>
Created attachment 76416 [details] [review] 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>
Awesome work all! Pushed to master for 18.11
Pushed to 18.05.x for 18.05.02
Depends on Bug 19700 not in 17.11.x