Bug 17416

Summary: Move javascript in doc-head-close.inc into a separate include
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: jonathan.druart, katrin.fischer, kyle
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:
Bug Depends on:    
Bug Blocks: 17418, 17870    
Attachments: Bug 17416 - Move javascript in doc-head-close.inc into a separate include
Bug 17416 - Move javascript in doc-head-close.inc into a separate include
Bug 17416 - Move javascript in doc-head-close.inc into a separate include
Bug 17416: Fix audio alerts
Bug 17416 - Move javascript in doc-head-close.inc into a separate include
Bug 17416: Fix audio alerts

Description Owen Leonard 2016-10-10 09:50:24 UTC
I would like to move the staff client JavaScript assets from the header to the footer. This is a best practice for speed because pages can begin rendering before all JavaScript is loaded. 

This bug is a first step which shouldn't affect any JS behavior. It will move the parts of doc-head-close.inc which relate to JavaScript into a separate file, js_includes.inc. A later patch will move the include into the footer.
Comment 1 Owen Leonard 2016-10-10 12:51:05 UTC
Created attachment 56099 [details] [review]
Bug 17416 - Move javascript in doc-head-close.inc into a separate include

In order to prepare to move staff client javascript assets into the
footer, this patch creates a new include file containing all <script>
content. This change should have no visible effect on how pages are
generated.

To test, apply the patch and view various pages in the staff client
(ciruclation, preferences, etc) to confirm that JavaScript is working
correctly.
Comment 2 Claire Gravely 2016-10-11 09:45:11 UTC
Created attachment 56152 [details] [review]
Bug 17416 - Move javascript in doc-head-close.inc into a separate include

In order to prepare to move staff client javascript assets into the
footer, this patch creates a new include file containing all <script>
content. This change should have no visible effect on how pages are
generated.

To test, apply the patch and view various pages in the staff client
(ciruclation, preferences, etc) to confirm that JavaScript is working
correctly.

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Comment 3 Jonathan Druart 2016-11-23 09:18:09 UTC
Owen, I have created an audio alert (#breadcrumbs using beep.ogg) to test if it works and it does not on the main page.
Comment 4 Jonathan Druart 2016-11-23 09:24:06 UTC
Ok, I have a fix.
Comment 5 Jonathan Druart 2016-11-23 09:25:10 UTC
Created attachment 57719 [details] [review]
Bug 17416 - Move javascript in doc-head-close.inc into a separate include

In order to prepare to move staff client javascript assets into the
footer, this patch creates a new include file containing all <script>
content. This change should have no visible effect on how pages are
generated.

To test, apply the patch and view various pages in the staff client
(ciruclation, preferences, etc) to confirm that JavaScript is working
correctly.

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Comment 6 Jonathan Druart 2016-11-23 09:25:14 UTC
Created attachment 57720 [details] [review]
Bug 17416: Fix audio alerts
Comment 7 Jonathan Druart 2016-11-23 09:26:08 UTC
Created attachment 57721 [details] [review]
Bug 17416 - Move javascript in doc-head-close.inc into a separate include

In order to prepare to move staff client javascript assets into the
footer, this patch creates a new include file containing all <script>
content. This change should have no visible effect on how pages are
generated.

To test, apply the patch and view various pages in the staff client
(ciruclation, preferences, etc) to confirm that JavaScript is working
correctly.

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 8 Jonathan Druart 2016-11-23 09:26:11 UTC
Created attachment 57722 [details] [review]
Bug 17416: Fix audio alerts

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 9 Katrin Fischer 2016-12-12 22:29:59 UTC
Patch status is set to "patch doesn't apply" - but both patches appear to have been pushed to master. I am resetting the status to reflect this.
Comment 10 Katrin Fischer 2016-12-12 22:30:57 UTC
These won't get backported to 16.11.x as it is an enhancement.