Bug 17416 - Move javascript in doc-head-close.inc into a separate include
Summary: Move javascript in doc-head-close.inc into a separate include
Status: RESOLVED 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:
Whiteboard:
Keywords:
Depends on:
Blocks: 17418 17870
  Show dependency treegraph
 
Reported: 2016-10-10 09:50 UTC by Owen Leonard
Modified: 2017-01-09 17:30 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 17416 - Move javascript in doc-head-close.inc into a separate include (9.93 KB, patch)
2016-10-10 12:51 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 17416 - Move javascript in doc-head-close.inc into a separate include (9.95 KB, patch)
2016-10-11 09:45 UTC, Claire Gravely
Details | Diff | Splinter Review
Bug 17416 - Move javascript in doc-head-close.inc into a separate include (9.95 KB, patch)
2016-11-23 09:25 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 17416: Fix audio alerts (1.24 KB, patch)
2016-11-23 09:25 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 17416 - Move javascript in doc-head-close.inc into a separate include (10.01 KB, patch)
2016-11-23 09:26 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 17416: Fix audio alerts (1.30 KB, patch)
2016-11-23 09:26 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 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.