Bug 19608

Summary: Move admin templates JavaScript to the footer: The rest
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Josef Moravec <josef.moravec>
Severity: enhancement    
Priority: P5 - low CC: jonathan.druart, josef.moravec, m.de.rooy, nick, simon.pouchol, testopia
Version: master   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19436
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11297
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 19607    
Bug Blocks: 17858, 19603, 19623    
Attachments: Bug 19608 - Move admin templates JavaScript to the footer: The rest
Bug 19608 - Move admin templates JavaScript to the footer: The rest
Bug 19608 (QA follow-up) Fix redirect on localization modal
Bug 19608: Move admin templates JavaScript to the footer: The rest
Bug 19608: (QA follow-up) Fix redirect on localization modal
Bug 19608: (QA follow-up) Fix menu item styling for clone-rules

Description Owen Leonard 2017-11-10 14:50:26 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 administration templates not already converted in other patches.
Comment 1 Owen Leonard 2017-11-14 17:13:44 UTC Comment hidden (obsolete)
Comment 2 Claire Gravely 2017-11-23 14:10:43 UTC
Created attachment 69308 [details] [review]
Bug 19608 - Move admin templates JavaScript to the footer: The rest

This patch modifies the staff client administration templates 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
modified templates: All button controls, DataTables functionality, tabs,
etc.

To test the changes to localization.tt you must have more than one
translation installed. Go to admin/itemtypes.pl, edit an itemtype, and
click the 'Translate into other languages' link.

To test the changes to sur_modmapping.tt, go to admin/z3950servers.pl
and create a new SRU server. Click the 'Modify' button next to 'SRU
Search fields mapping'

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Comment 3 Josef Moravec 2017-12-14 07:32:48 UTC
The item  types translation popup dialog does not work for me - it opens when I click "Translate into other languages" but then I am redirected straight to localization.pl as if would click on normal link... look like going to href on that anchor is not prevented... I tried it in firefox 57 and chromium 62

Also on clone rules page the "Circulation and fines rules" menu item should be styled in bold.

Sorry
Comment 4 Owen Leonard 2017-12-14 13:21:58 UTC
Created attachment 69802 [details] [review]
Bug 19608 (QA follow-up) Fix redirect on localization modal

This patch makes two minor corrections:

1. The item types localization modal redirect problem has been fixed by
   excluding the anti-clickjack code from executing in the footer.
2. The sidebar menu highlighting script has been modified to correctly
   handle the clone-rules page.
Comment 5 Josef Moravec 2017-12-23 07:30:56 UTC
Created attachment 70141 [details] [review]
Bug 19608: Move admin templates JavaScript to the footer: The rest

This patch modifies the staff client administration templates 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
modified templates: All button controls, DataTables functionality, tabs,
etc.

To test the changes to localization.tt you must have more than one
translation installed. Go to admin/itemtypes.pl, edit an itemtype, and
click the 'Translate into other languages' link.

To test the changes to sur_modmapping.tt, go to admin/z3950servers.pl
and create a new SRU server. Click the 'Modify' button next to 'SRU
Search fields mapping'

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:31:02 UTC
Created attachment 70142 [details] [review]
Bug 19608: (QA follow-up) Fix redirect on localization modal

This patch makes two minor corrections:

1. The item types localization modal redirect problem has been fixed by
   excluding the anti-clickjack code from executing in the footer.
2. The sidebar menu highlighting script has been modified to correctly
   handle the clone-rules page.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 7 Josef Moravec 2017-12-23 07:31:08 UTC
Created attachment 70143 [details] [review]
Bug 19608: (QA follow-up) Fix menu item styling for clone-rules

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 8 Jonathan Druart 2017-12-26 15:53:40 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 9 Nick Clemens 2018-01-16 12:17:09 UTC
Enhancement, skipping for 17.11.x.
Awesome work everybody!
Comment 10 Marcel de Rooy 2018-03-16 10:33:46 UTC
Problem with sru_modmapping while replacing intranet-bottom by popup-bottom
Comment 11 Marcel de Rooy 2018-03-16 10:38:20 UTC
(In reply to Marcel de Rooy from comment #10)
> Problem with sru_modmapping while replacing intranet-bottom by popup-bottom

Will be fixed on 19436