Bug 19623 - Move template JavaScript to the footer: Cataloging
Summary: Move template JavaScript to the footer: Cataloging
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: Josef Moravec
URL:
Whiteboard:
Keywords:
Depends on: 19608
Blocks: 17858
  Show dependency treegraph
 
Reported: 2017-11-14 18:21 UTC by Owen Leonard
Modified: 2018-01-16 12:17 UTC (History)
6 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 19623 - Move template JavaScript to the footer: Cataloging (27.58 KB, patch)
2017-11-14 19:37 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 19623 - Move template JavaScript to the footer: Cataloging (27.64 KB, patch)
2017-11-15 15:27 UTC, Claire Gravely
Details | Diff | Splinter Review
Bug 19623: (Follow-up) Correct footer include in pop-up windows (2.05 KB, patch)
2017-12-22 13:42 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 19623 - Move template JavaScript to the footer: Cataloging (27.69 KB, patch)
2017-12-23 07:53 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 19623: (Follow-up) Correct footer include in pop-up windows (2.10 KB, patch)
2017-12-23 07:53 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 19623: (QA follow-up) Add missing footerjs variable in merge.tt (823 bytes, patch)
2017-12-23 07:53 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-14 18:21:34 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 some cataloging templates: addbooks.tt, linkitem.tt, merge.tt, z3950_auth_search.tt, z3950_search.tt
Comment 1 Owen Leonard 2017-11-14 19:37:46 UTC Comment hidden (obsolete)
Comment 2 Claire Gravely 2017-11-15 15:27:47 UTC
Created attachment 69163 [details] [review]
Bug 19623 - Move template JavaScript to the footer: Cataloging

This patch modifies some staff client cataloging templates so that
JavaScript is included in the footer instead of the header.

Several cataloging templates are excluded because they require
significant structural changes: addbiblio.tt, additem.tt, and editor.tt

To test, apply the patch and test the JavaScript-driven features of the
modified templates: All button controls, DataTables functionality, tabs,
etc.

Note that z350_auth_search.tt is tested by performing a Z39.50 search
from the Authorities module.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Comment 3 Katrin Fischer 2017-12-21 23:13:50 UTC
With this patch applied, the Z39.50 search window remains empty. 
Owen, can you please check? Tested on kohadevbox with the sample data.
Comment 4 Owen Leonard 2017-12-22 13:42:52 UTC
Created attachment 70118 [details] [review]
Bug 19623: (Follow-up) Correct footer include in pop-up windows

This patch corrects the footer include in two templates for Z39.50
pop-up windows. popup-bottom.inc shouldn't be used because it doesn't
have the JavaScript embed code in it.

To test, perform a Z39.50 search from both the MARC bibliographic editor
and the MARC authority editor. In both cases the Z39.50 popup window
should work correctly.
Comment 5 Josef Moravec 2017-12-23 07:53:23 UTC
Created attachment 70144 [details] [review]
Bug 19623 - Move template JavaScript to the footer: Cataloging

This patch modifies some staff client cataloging templates so that
JavaScript is included in the footer instead of the header.

Several cataloging templates are excluded because they require
significant structural changes: addbiblio.tt, additem.tt, and editor.tt

To test, apply the patch and test the JavaScript-driven features of the
modified templates: All button controls, DataTables functionality, tabs,
etc.

Note that z350_auth_search.tt is tested by performing a Z39.50 search
from the Authorities module.

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

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 6 Josef Moravec 2017-12-23 07:53:30 UTC
Created attachment 70145 [details] [review]
Bug 19623: (Follow-up) Correct footer include in pop-up windows

This patch corrects the footer include in two templates for Z39.50
pop-up windows. popup-bottom.inc shouldn't be used because it doesn't
have the JavaScript embed code in it.

To test, perform a Z39.50 search from both the MARC bibliographic editor
and the MARC authority editor. In both cases the Z39.50 popup window
should work correctly.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 7 Josef Moravec 2017-12-23 07:53:36 UTC
Created attachment 70146 [details] [review]
Bug 19623: (QA follow-up) Add missing footerjs variable in merge.tt

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 8 Jonathan Druart 2017-12-26 15:53:46 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 9 Nick Clemens 2018-01-16 12:17:33 UTC
Enhancement, skipping for 17.11.x.
Awesome work everybody!