Bug 19356

Summary: Move staff client cart JavaScript to the footer
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Nick Clemens (kidclamp) <nick>
Severity: enhancement    
Priority: P5 - low CC: jonathan.druart, nick, testopia
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on:    
Bug Blocks: 17858    
Attachments: Bug 19356: Move staff client cart JavaScript to the footer
[SIGNED-OFF] Bug 19356: Move staff client cart JavaScript to the footer
Bug 19356: Move staff client cart JavaScript to the footer

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!