Bug 19659 - Move JS to the footer: Suggestions and tags
Summary: Move JS to the footer: Suggestions and tags
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Josef Moravec
URL:
Keywords:
Depends on:
Blocks: 17858
  Show dependency treegraph
 
Reported: 2017-11-20 18:04 UTC by Owen Leonard
Modified: 2018-12-03 20:03 UTC (History)
6 users (show)

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


Attachments
Bug 19659: Move JS to the footer: Suggestions and tags (24.27 KB, patch)
2017-11-20 18:29 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 19659: Move JS to the footer: Suggestions and tags (25.90 KB, patch)
2017-11-22 13:38 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 19659: Move JS to the footer: Suggestions and tags (25.95 KB, patch)
2017-11-22 15:30 UTC, Claire Gravely
Details | Diff | Splinter Review
Bug 19659: Move JS to the footer: Suggestions and tags (26.00 KB, patch)
2017-12-07 08:22 UTC, Josef Moravec
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-11-20 18:04:20 UTC
In order to conform to best practices for performance, staff client template JavaScript should be in the footer instead of the header.

This patch will do so for suggestions and tags templates.
Comment 1 Owen Leonard 2017-11-20 18:29:35 UTC Comment hidden (obsolete)
Comment 2 Claire Gravely 2017-11-22 12:05:05 UTC
Getting JS ReferenceError: $ is not defined
suggestion.pl:554:5
Comment 3 Owen Leonard 2017-11-22 13:38:20 UTC Comment hidden (obsolete)
Comment 4 Claire Gravely 2017-11-22 15:30:50 UTC
Created attachment 69285 [details] [review]
Bug 19659: Move JS to the footer: Suggestions and tags

This patch modifies the staff client's suggestions and tags templates so
that JavaScript is included in the footer instead of the header.

This patch adds a new JS file, acquisitions-menu.js, which will be added
to each template which has the Acquisitions sidebar menu (in this case,
suggestions). Highlighting of the current page in the sidebar menu will
be broken for pages which have not been modified to use this file.

To test, apply the patch and test the JavaScript-driven features of
suggestions and tags pages: All button controls, DataTables
functionality, form validation, etc.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Comment 5 Josef Moravec 2017-12-07 08:22:28 UTC
Created attachment 69597 [details] [review]
Bug 19659: Move JS to the footer: Suggestions and tags

This patch modifies the staff client's suggestions and tags templates so
that JavaScript is included in the footer instead of the header.

This patch adds a new JS file, acquisitions-menu.js, which will be added
to each template which has the Acquisitions sidebar menu (in this case,
suggestions). Highlighting of the current page in the sidebar menu will
be broken for pages which have not been modified to use this file.

To test, apply the patch and test the JavaScript-driven features of
suggestions and tags pages: All button controls, DataTables
functionality, form validation, etc.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 6 Jonathan Druart 2017-12-11 14:36:52 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 7 Nick Clemens (kidclamp) 2017-12-14 17:53:15 UTC
Awesome work all! Skipping for 17.11, enhancement