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 more of the authorities templates.
Created attachment 69744 [details] [review] Bug 19786: Move template JavaScript to the footer: Authorities, part 2 This patch modifies the staff client patron lists 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 each modified template. I've made one change to the JavaScript in addition to moving it: I've made it so that the blank window which pops up briefly in this process is 100px x 100px instead of full screen. - Cataloging -> Add or edit bibliographic record in a framework which has authorities linked to a tag -> Click authorities plugin link -> Create new authority button -> Autocomplete on text inputs (except "Search all headings") -> Search -> Select authority record ("choose") -> Click authorities plugin link again -> Clear field
Created attachment 71820 [details] [review] Bug 19786: Move template JavaScript to the footer: Authorities, part 2 This patch modifies the staff client patron lists 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 each modified template. I've made one change to the JavaScript in addition to moving it: I've made it so that the blank window which pops up briefly in this process is 100px x 100px instead of full screen. - Cataloging -> Add or edit bibliographic record in a framework which has authorities linked to a tag -> Click authorities plugin link -> Create new authority button -> Autocomplete on text inputs (except "Search all headings") -> Search -> Select authority record ("choose") -> Click authorities plugin link again -> Clear field Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Created attachment 71903 [details] Screenshot of too small pop-up window for 'create authority' "create authority" opens in a really small window for me. Can you please check? Tested with Firefox 58.0.2 (64-bit)
I think there are also some missing VERSION: + <script type="text/javascript" src="[% interface %]/[% theme %]/js/auth-finder-search.js"></script> FAIL koha-tmpl/intranet-tmpl/prog/en/modules/authorities/auth_finder.tt FAIL forbidden patterns forbidden pattern: Include [% KOHA_VERSION %] in js paths (bug 12904) - May be false positive (line 31) valid_template FAIL koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt FAIL forbidden patterns forbidden pattern: Include [% KOHA_VERSION %] in js paths (bug 12904) - May be false positive (line 103)
Created attachment 72002 [details] [review] Bug 19786: (follow-up) Correct js include path, popup window size This follow-up adds the required KOHA_VERSION variable to two templates where it was missing. This patch also adds a 'window_size' parameter to a popup window function so that self-closing windows like blinddetail-biblio-search.pl can appear small and others at a reasonable size. To test, apply the patch and clear your browser cache if necessary. - Confirm that the QA tools do not complain about missing KOHA_VERSION in auth_finder.tt and searchresultlist_auth.tt. - Open a bibliographic record for editing in the basic editor using a framework in which a field is linked to authorities. - Trigger the authority selection window for that field. - Click the "Clear field" button at the top of the authority search pop-up window. Another smaller popup window should briefly appear, and then both windows should close. - Trigger the authority selection window again. - Click the "Create new authority" button. A new window should appear with the MARC authority editor. The window should be a usable size.
Created attachment 72212 [details] [review] Bug 19786: (follow-up) Correct js include path, popup window size This follow-up adds the required KOHA_VERSION variable to two templates where it was missing. This patch also adds a 'window_size' parameter to a popup window function so that self-closing windows like blinddetail-biblio-search.pl can appear small and others at a reasonable size. To test, apply the patch and clear your browser cache if necessary. - Confirm that the QA tools do not complain about missing KOHA_VERSION in auth_finder.tt and searchresultlist_auth.tt. - Open a bibliographic record for editing in the basic editor using a framework in which a field is linked to authorities. - Trigger the authority selection window for that field. - Click the "Clear field" button at the top of the authority search pop-up window. Another smaller popup window should briefly appear, and then both windows should close. - Trigger the authority selection window again. - Click the "Create new authority" button. A new window should appear with the MARC authority editor. The window should be a usable size. Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Created attachment 72287 [details] [review] Bug 19786: Move template JavaScript to the footer: Authorities, part 2 This patch modifies the staff client patron lists 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 each modified template. I've made one change to the JavaScript in addition to moving it: I've made it so that the blank window which pops up briefly in this process is 100px x 100px instead of full screen. - Cataloging -> Add or edit bibliographic record in a framework which has authorities linked to a tag -> Click authorities plugin link -> Create new authority button -> Autocomplete on text inputs (except "Search all headings") -> Search -> Select authority record ("choose") -> Click authorities plugin link again -> Clear field Signed-off-by: Claire Gravely <claire_gravely@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 72288 [details] [review] Bug 19786: (follow-up) Correct js include path, popup window size This follow-up adds the required KOHA_VERSION variable to two templates where it was missing. This patch also adds a 'window_size' parameter to a popup window function so that self-closing windows like blinddetail-biblio-search.pl can appear small and others at a reasonable size. To test, apply the patch and clear your browser cache if necessary. - Confirm that the QA tools do not complain about missing KOHA_VERSION in auth_finder.tt and searchresultlist_auth.tt. - Open a bibliographic record for editing in the basic editor using a framework in which a field is linked to authorities. - Trigger the authority selection window for that field. - Click the "Clear field" button at the top of the authority search pop-up window. Another smaller popup window should briefly appear, and then both windows should close. - Trigger the authority selection window again. - Click the "Create new authority" button. A new window should appear with the MARC authority editor. The window should be a usable size. Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to master for 18.05, thanks to everybody involved!
Awesome work all, enhancement, not backported for stable