Bug 19785 - Move template JavaScript to the footer: Authorities, part 1
Summary: Move template JavaScript to the footer: Authorities, part 1
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: Academy
Depends on:
Blocks: 17858 19786 19983
  Show dependency treegraph
 
Reported: 2017-12-08 19:04 UTC by Owen Leonard
Modified: 2018-03-26 17:13 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 19785: Move template JavaScript to the footer: Authorities, part 1 (14.16 KB, patch)
2017-12-08 19:20 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 19785: Move template JavaScript to the footer: Authorities, part 1 (13.77 KB, patch)
2017-12-11 14:35 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 19785: Move template JavaScript to the footer: Authorities, part 1 (16.80 KB, patch)
2018-01-16 17:19 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 19785: Move template JavaScript to the footer: Authorities, part 1 (16.87 KB, patch)
2018-02-09 18:24 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 19785: Move template JavaScript to the footer: Authorities, part 1 (16.96 KB, patch)
2018-02-13 15:42 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 19785: Move template JavaScript to the footer: Authorities, part 1 (17.01 KB, patch)
2018-02-14 08:09 UTC, Claire Gravely
Details | Diff | Splinter Review
Bug 19785: Move template JavaScript to the footer: Authorities, part 1 (17.11 KB, patch)
2018-02-18 12:53 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 19785: Replace intranet-tmpl with [% interface %] (1.13 KB, patch)
2018-02-18 19:40 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 2017-12-08 19:04:06 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 of the authorities templates.
Comment 1 Owen Leonard 2017-12-08 19:20:39 UTC Comment hidden (obsolete)
Comment 2 Dominic Pichette 2017-12-08 19:46:38 UTC
I am not able to delete an authority from the results page. The confirmation window is shown but when I come back the authority is still there. Is there an Ajax call that is not working here or is it a problem from my DB maybe?

Otherwise, everything works fine.
Comment 3 Katrin Fischer 2017-12-10 21:35:08 UTC
Hi Dominic, if you find something wrong with a patch, please switch to 'failed QA', thx!
Comment 4 Owen Leonard 2017-12-11 14:35:45 UTC Comment hidden (obsolete)
Comment 5 Simon Pouchol 2017-12-14 11:06:24 UTC
There seems to be an issue with suggestions from cache (not sure how to call them, when pressing down arrow or double-clicking on a text input to show previously used text) on the Z39.50 search form. When double clicking on a text field, these options immediately hide and have weird behavior overall. Might be unrelated to this patch ?
Comment 6 Owen Leonard 2017-12-14 13:31:30 UTC
Sorry Simon, I don't understand the problem you're having!
Comment 7 Simon Pouchol 2017-12-14 14:54:13 UTC
Seems like it's a bug on Firefox, totally unrelated to this patch my bad.
Comment 8 Owen Leonard 2018-01-16 17:19:49 UTC Comment hidden (obsolete)
Comment 9 Owen Leonard 2018-02-09 18:24:42 UTC
Created attachment 71390 [details] [review]
Bug 19785: Move template JavaScript to the footer: Authorities, part 1

This patch modifies even more staff client authorities 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.

 - Authorities
   - New from Z39.50
   -> Search
      -> Results
         - New from Z39.50
         - Deletion confirmation
         - Merge records -> Merge
           - Tabs
           - Tag selection
         -> Authority detail
            - Tabs
            - Deletion confirmation
            - New from Z39.50
Comment 10 Claire Gravely 2018-02-13 13:23:15 UTC
Hullo,

when merging two authorities (merge.pl) I get:

ReferenceError: _ is not defined

merge.pl:54:9
Comment 11 Owen Leonard 2018-02-13 15:42:42 UTC
Created attachment 71553 [details] [review]
Bug 19785: Move template JavaScript to the footer: Authorities, part 1

This patch modifies even more staff client authorities 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.

 - Authorities
   - New from Z39.50
   -> Search
      -> Results
         - New from Z39.50
         - Deletion confirmation
         - Merge records -> Merge
           - Tabs
           - Tag selection
         -> Authority detail
            - Tabs
            - Deletion confirmation
            - New from Z39.50
Comment 12 Claire Gravely 2018-02-14 08:09:54 UTC
Created attachment 71601 [details] [review]
Bug 19785: Move template JavaScript to the footer: Authorities, part 1

This patch modifies even more staff client authorities 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.

 - Authorities
   - New from Z39.50
   -> Search
      -> Results
         - New from Z39.50
         - Deletion confirmation
         - Merge records -> Merge
           - Tabs
           - Tag selection
         -> Authority detail
            - Tabs
            - Deletion confirmation
            - New from Z39.50

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Comment 13 Katrin Fischer 2018-02-18 12:53:29 UTC
Created attachment 71902 [details] [review]
Bug 19785: Move template JavaScript to the footer: Authorities, part 1

This patch modifies even more staff client authorities 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.

 - Authorities
   - New from Z39.50
   -> Search
      -> Results
         - New from Z39.50
         - Deletion confirmation
         - Merge records -> Merge
           - Tabs
           - Tag selection
         -> Authority detail
            - Tabs
            - Deletion confirmation
            - New from Z39.50

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 14 Katrin Fischer 2018-02-18 12:54:22 UTC
Hi Owen, QA tools complain, but I suspect false positives. Could you please double check?

 FAIL	koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt
   FAIL	  forbidden patterns
		forbidden pattern: intranet-tmpl should certainly replaced with [% interface %] (line 102)
		forbidden pattern: Include [% KOHA_VERSION %] in js paths (bug 12904) - May be false positive (line 102)

The line in the template is:
        <script type="text/javascript" src="/intranet-tmpl/lib/jquery/plugins/jquery.jstree_[% KOHA_VERSION %].js"></script>
Comment 15 Jonathan Druart 2018-02-18 19:40:01 UTC
Created attachment 71916 [details] [review]
Bug 19785: Replace intranet-tmpl with [% interface %]
Comment 16 Jonathan Druart 2018-02-18 19:49:47 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 17 Nick Clemens 2018-03-23 00:55:10 UTC
Enhancement, not backported for 17.11