From 42ff67e1732f5cbbaf580214d88f3f287ca34770 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 2 Jan 2018 16:29:44 +0000 Subject: [PATCH] Bug 19878: Move template JavaScript to the footer: UNIMARC editor plugins, part 7 This patch updates the last of the UNIMARC plugin templates so that JavaScript is included in the footer following the same pattern as other templates which have been modified to fix Bug 17858. To test you do not need a UNIMARC system. Apply the patch and for each plugin, configure a MARC subfield (e.g. 100$a) to use that plugin. From the MARC edit page, trigger the plugin and confirm that changes made in the popup window are saved to the corresponding field in the editor. - unimarc_field_210c.tt - unimarc_field_210c_bis.tt - unimarc_field_225a.tt - unimarc_field_225a_bis.tt - unimarc_field_4XX.tt - unimarc_field_700-4.tt - unimarc_leader.tt Signed-off-by: Anne-Claire Bernaudin Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- .../value_builder/unimarc_field_210c.tt | 26 +- .../value_builder/unimarc_field_210c_bis.tt | 51 ++-- .../value_builder/unimarc_field_225a.tt | 19 +- .../value_builder/unimarc_field_225a_bis.tt | 55 ++--- .../value_builder/unimarc_field_4XX.tt | 228 ++++++++---------- .../value_builder/unimarc_field_700-4.tt | 33 +-- .../value_builder/unimarc_leader.tt | 31 +-- 7 files changed, 222 insertions(+), 221 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_210c.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_210c.tt index 043e700ac2..31797ada8e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_210c.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_210c.tt @@ -1,8 +1,10 @@ [% PROCESS 'authorities-search-results.inc' %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 210c builder [% INCLUDE 'doc-head-close.inc' %] +

UNIMARC field 210c builder

Search for authority type: EDITORS

@@ -77,17 +79,17 @@ [% pagination_bar %] [% END %] - +[% MACRO jsinclude BLOCK %] + +[% END %] -[% INCLUDE 'popup-bottom.inc' %] +[% INCLUDE 'intranet-bottom.inc' popup_window=1 %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_210c_bis.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_210c_bis.tt index 3114d30395..f48f9937c6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_210c_bis.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_210c_bis.tt @@ -1,32 +1,12 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › UNIMARC field 210c builder [% INCLUDE 'doc-head-close.inc' %] - - +
@@ -47,14 +27,37 @@ $(document).ready(function(){
+ +[% MACRO jsinclude BLOCK %] -[% INCLUDE 'popup-bottom.inc' %] \ No newline at end of file +[% END %] + +[% INCLUDE 'intranet-bottom.inc' popup_window=1 %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_225a.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_225a.tt index e888db1be7..68a2ff2a45 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_225a.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_225a.tt @@ -1,7 +1,9 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 225a builder [% INCLUDE 'doc-head-close.inc' %] +

UNIMARC field 225a builder

@@ -23,17 +25,18 @@
- - + +[% END %] -[% INCLUDE 'popup-bottom.inc' %] +[% INCLUDE 'intranet-bottom.inc' popup_window=1 %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_225a_bis.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_225a_bis.tt index c3fa5505ef..7499cf4d73 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_225a_bis.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_225a_bis.tt @@ -1,3 +1,4 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › UNIMARC field 225a builder [% INCLUDE 'doc-head-close.inc' %] @@ -9,8 +10,8 @@ text-align:left; } - +
@@ -31,33 +32,33 @@
- + +[% END %] -[% INCLUDE 'popup-bottom.inc' %] +[% INCLUDE 'intranet-bottom.inc' popup_window=1 %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_4XX.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_4XX.tt index b784c3adb4..95e70ab569 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_4XX.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_4XX.tt @@ -1,118 +1,13 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Cataloging › 4XX plugin [% INCLUDE 'doc-head-close.inc' %] -[% IF ( fillinput ) %] - - - -

UNIMARC field 4XX builder

-[% ELSE %] - - +

UNIMARC field 4XX builder

+[% UNLESS ( fillinput ) %] [% IF ( Search ) %] - - - - + [% END %] [% END %] -[% INCLUDE 'popup-bottom.inc' %] + +[% MACRO jsinclude BLOCK %] + + [% IF ( fillinput ) %] + + + [% END %] +[% END %] + +[% INCLUDE 'intranet-bottom.inc' popup_window=1 %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_700-4.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_700-4.tt index e51ffdabd3..948b1439ec 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_700-4.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_700-4.tt @@ -1,7 +1,9 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 700-4 builder [% INCLUDE 'doc-head-close.inc' %] +

UNIMARC field 700-4 builder

Sélectionnez la valeur pour le champ 700 $4. Elle sera automatiquement reportée dans la zone 700 $8 qui suit.

@@ -44,21 +46,22 @@
Cancel
- + if ([% index2 %] > 0) { + opener.document.f.field_value[[% index2 %]].value= x[1]; + } + self.close(); + return false; + } + +[% END %] -[% INCLUDE 'popup-bottom.inc' %] +[% INCLUDE 'intranet-bottom.inc' popup_window=1 %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_leader.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_leader.tt index 3720e964f4..aaa477c386 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_leader.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_leader.tt @@ -1,7 +1,9 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC leader builder [% INCLUDE 'doc-head-close.inc' %] +

UNIMARC leader builder

@@ -290,21 +292,22 @@
Cancel
- + document.f_pop.f6.value+ document.f_pop.f7.value+ + document.f_pop.f8.value+ ' '+ + document.f_pop.f17.value+ document.f_pop.f18.value+' 4500'; + window.close(); + return false; + } + +[% END %] -[% INCLUDE 'popup-bottom.inc' %] +[% INCLUDE 'intranet-bottom.inc' popup_window=1 %] -- 2.39.5