Bug 19356 - Move staff client cart JavaScript to the footer
Summary: Move staff client cart JavaScript to the footer
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: Nick Clemens (kidclamp)
URL:
Keywords:
Depends on:
Blocks: 17858
  Show dependency treegraph
 
Reported: 2017-09-21 13:49 UTC by Owen Leonard
Modified: 2018-06-04 20:18 UTC (History)
3 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 19356: Move staff client cart JavaScript to the footer (2.26 KB, patch)
2017-09-21 14:04 UTC, Owen Leonard
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 19356: Move staff client cart JavaScript to the footer (2.33 KB, patch)
2017-09-26 22:29 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19356: Move staff client cart JavaScript to the footer (2.37 KB, patch)
2017-10-13 14:22 UTC, Owen Leonard
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-09-21 13:49:54 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 the staff client cart.
Comment 1 Owen Leonard 2017-09-21 14:04:52 UTC
Created attachment 67278 [details] [review]
Bug 19356: Move staff client cart JavaScript to the footer

This patch modifies the staff client cart template so that
JavaScript is included in the footer instead of the header.

To test, apply the patch and test the JavaScript-driven features of the
cart: All button controls, DataTables functionality.
Comment 2 Aleisha Amohia 2017-09-26 22:29:18 UTC
Created attachment 67386 [details] [review]
[SIGNED-OFF] Bug 19356: Move staff client cart JavaScript to the footer

This patch modifies the staff client cart template so that
JavaScript is included in the footer instead of the header.

To test, apply the patch and test the JavaScript-driven features of the
cart: All button controls, DataTables functionality.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Comment 3 Nick Clemens (kidclamp) 2017-10-07 01:18:59 UTC
Why the conditional for footerjs? 

If we are setting it statically why not just always include the js in footer?

If I understand the variable is to prvent doc-head-close / intranet-bottom.inc from adding more js
Comment 4 Owen Leonard 2017-10-13 14:22:22 UTC
Created attachment 68080 [details] [review]
Bug 19356: Move staff client cart JavaScript to the footer

This patch modifies the staff client cart template so that
JavaScript is included in the footer instead of the header.

To test, apply the patch and test the JavaScript-driven features of the
cart: All button controls, DataTables functionality.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

Correction for QA: Removed contditional around footer JS (from
copy-paste) because it will always be true.
Comment 5 Jonathan Druart 2017-10-20 20:20:50 UTC
Pushed to master for 17.11, thanks to everybody involved!