Bug 17893

Summary: Move JavaScript to the footer on staff client catalog pages
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: claire_gravely, fridolin.somers, jonathan.druart, kyle, testopia
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Medium patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 17418, 17870    
Bug Blocks: 17858, 20977, 20979    
Attachments: Bug 17893 - Move JavaScript to the footer on staff client catalog pages
Bug 17893 - Move JavaScript to the footer on staff client catalog pages
Bug 17893 - Move JavaScript to the footer on staff client catalog pages
Bug 17893 - Move JavaScript to the footer on staff client catalog pages

Description Owen Leonard 2017-01-12 16:43:51 UTC
This patch will move JavaScript to the footer on a number of pages in the catalog module of the staff client:

basket/basket.tt
catalogue/ISBDdetail.tt
catalogue/MARCdetail.tt
catalogue/advsearch.tt
catalogue/detail.tt
catalogue/imageviewer.tt
catalogue/issuehistory.tt
catalogue/itemsearch.tt
catalogue/labeledMARCdetail.tt
catalogue/moredetail.tt
catalogue/results.tt
catalogue/search-history.tt

In the process I will be consolidating JS from several of those templates into one separate JavaScript file. Other modifications will be required in order for JavaScript to be able to be called from catalog-related include files. Since include files are parsed before jQuery is loaded in the footer, jQuery-specific code will have to be adapted or moved.
Comment 1 Owen Leonard 2017-06-23 18:19:08 UTC Comment hidden (obsolete)
Comment 2 Lee Jamison 2017-06-27 14:36:32 UTC Comment hidden (obsolete)
Comment 3 Owen Leonard 2017-09-07 16:53:06 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2017-09-07 18:08:50 UTC
Created attachment 66962 [details] [review]
Bug 17893 - Move JavaScript to the footer on staff client catalog pages

This patch modifies multiple catalog-related pages in order to move
embedded JavaScript to the footer.

The JavaScript previously embedded in cat-toolbar.inc is moved to a
separate file (catalog.js).

To test, apply the patch and test JavaScript-driven interactions on all
modified pages, including JS which isn't page-specific (menus, help,
etc). The functionality of the catalog toolbar should be tested on each
page.

- Bibliographic detail pages (standard, MARC, labeled MARC, ISBD).
- Advanced search page
- Local cover image viewer
- Item search page
- Item detail page
- Search history page
- Checkout history page

https://bugs.koha-community.org/show_bug.cgi?id=17839

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 5 Jonathan Druart 2017-09-07 18:09:15 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 6 Fridolin Somers 2017-10-10 09:56:34 UTC
Enhancement not pushed to 17.05.x