Bug 17893 - Move JavaScript to the footer on staff client catalog pages
Summary: Move JavaScript to the footer on staff client catalog pages
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 17418 17870
Blocks: 17858 20977 20979
  Show dependency treegraph
 
Reported: 2017-01-12 16:43 UTC by Owen Leonard
Modified: 2018-06-21 21:09 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 17893 - Move JavaScript to the footer on staff client catalog pages (85.58 KB, patch)
2017-06-23 18:19 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 17893 - Move JavaScript to the footer on staff client catalog pages (85.63 KB, patch)
2017-06-27 14:36 UTC, Lee Jamison
Details | Diff | Splinter Review
Bug 17893 - Move JavaScript to the footer on staff client catalog pages (85.79 KB, patch)
2017-09-07 16:53 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 17893 - Move JavaScript to the footer on staff client catalog pages (85.94 KB, patch)
2017-09-07 18:08 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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