Bugzilla – Attachment 72212 Details for
Bug 19786
Move template JavaScript to the footer: Authorities, part 2
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19786: (follow-up) Correct js include path, popup window size
Bug-19786-follow-up-Correct-js-include-path-popup-.patch (text/plain), 4.34 KB, created by
Claire Gravely
on 2018-02-26 14:53:50 UTC
(
hide
)
Description:
Bug 19786: (follow-up) Correct js include path, popup window size
Filename:
MIME Type:
Creator:
Claire Gravely
Created:
2018-02-26 14:53:50 UTC
Size:
4.34 KB
patch
obsolete
>From 8f64e1d583d78663927909f8cc6b8cfc37ca449d Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 20 Feb 2018 14:19:31 +0000 >Subject: [PATCH] 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> >--- > .../intranet-tmpl/prog/en/modules/authorities/auth_finder.tt | 2 +- > .../prog/en/modules/authorities/searchresultlist-auth.tt | 2 +- > koha-tmpl/intranet-tmpl/prog/js/auth-finder-search.js | 12 ++++++++---- > 3 files changed, 10 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/auth_finder.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/auth_finder.tt >index 7460ecc..8a7459c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/auth_finder.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/auth_finder.tt >@@ -28,7 +28,7 @@ > var index = "[% index %]"; > var authtypecode = "[% authtypecode %]"; > </script> >- <script type="text/javascript" src="[% interface %]/[% theme %]/js/auth-finder-search.js"></script> >+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/auth-finder-search_[% KOHA_VERSION %].js"></script> > [% END %] > > [% INCLUDE 'intranet-bottom.inc' popup_window = 1 %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt >index 1e8cf99..07d9d59 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt >@@ -100,7 +100,7 @@ > var index = "[% index %]"; > var authtypecode = "[% authtypecode %]"; > </script> >- <script type="text/javascript" src="[% interface %]/[% theme %]/js/auth-finder-search.js"></script> >+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/auth-finder-search_[% KOHA_VERSION %].js"></script> > <script type="text/javascript"> > > function jumpfull(page){ >diff --git a/koha-tmpl/intranet-tmpl/prog/js/auth-finder-search.js b/koha-tmpl/intranet-tmpl/prog/js/auth-finder-search.js >index ab1d394..2e853e2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/auth-finder-search.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/auth-finder-search.js >@@ -3,11 +3,11 @@ > $(document).ready(function(){ > $("#clear").on("click",function(e){ > e.preventDefault(); >- finderjumpfull('blinddetail-biblio-search.pl?authid=0&index=' + index ); >+ finderjump('blinddetail-biblio-search.pl?authid=0&index=' + index ); > }); > $("#createnew").on("click",function(e){ > e.preventDefault(); >- finderjumpfull('authorities.pl?index=' + index + '&authtypecode=' + authtypecode ); >+ finderjump('authorities.pl?index=' + index + '&authtypecode=' + authtypecode, 'full' ); > }); > // marclist > $( "#value_any" ).autocomplete({ >@@ -95,6 +95,10 @@ $(document).ready(function(){ > }); > }); > >-function finderjumpfull(page){ >- window.open(page,'','width=100,height=100,resizable=yes,toolbar=false,scrollbars=yes,top'); >+function finderjump(page, full){ >+ var window_size = ''; >+ if( full != "full"){ >+ window_size = 'width=100,height=100,'; >+ } >+ window.open(page,'', window_size + 'resizable=yes,toolbar=false,scrollbars=yes,top'); > } >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19786
:
69744
|
71820
|
71903
|
72002
|
72212
|
72287
|
72288