Bug 19608 - Move admin templates JavaScript to the footer: The rest
Summary: Move admin templates JavaScript to the footer: The rest
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: 19607
Blocks: 17858 19603 19623
  Show dependency treegraph
 
Reported: 2017-11-10 14:50 UTC by Owen Leonard
Modified: 2018-03-16 10:58 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 19608 - Move admin templates JavaScript to the footer: The rest (28.42 KB, patch)
2017-11-14 17:13 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 19608 - Move admin templates JavaScript to the footer: The rest (28.48 KB, patch)
2017-11-23 14:10 UTC, Claire Gravely
Details | Diff | Splinter Review
Bug 19608 (QA follow-up) Fix redirect on localization modal (2.57 KB, patch)
2017-12-14 13:21 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 19608: Move admin templates JavaScript to the footer: The rest (28.53 KB, patch)
2017-12-23 07:30 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 19608: (QA follow-up) Fix redirect on localization modal (2.63 KB, patch)
2017-12-23 07:31 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 19608: (QA follow-up) Fix menu item styling for clone-rules (1.25 KB, patch)
2017-12-23 07:31 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-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