From fbfbcae838eacf7684141260e263619dd7869aef Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 21 Dec 2017 18:20:12 +0000 Subject: [PATCH] Bug 19869: Move template JavaScript to the footer: UNIMARC editor plugins, part 3 This patch updates even more 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_123a.tt - unimarc_field_123d.tt - unimarc_field_123e.tt - unimarc_field_123f.tt - This template has been modified, but doesn't appear to be used. The unimarc_field_1234.pl script uses unimarc_field_123g.tt as its template. - unimarc_field_123g.tt - unimarc_field_123i_j.tt Signed-off-by: Anne-Claire Bernaudin Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- .../value_builder/unimarc_field_123a.tt | 23 +++++------ .../value_builder/unimarc_field_123d.tt | 23 +++++------ .../value_builder/unimarc_field_123e.tt | 24 ++++++------ .../value_builder/unimarc_field_123f.tt | 24 ++++++------ .../value_builder/unimarc_field_123g.tt | 24 ++++++------ .../value_builder/unimarc_field_123i_j.tt | 38 ++++++++++--------- 6 files changed, 83 insertions(+), 73 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_123a.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_123a.tt index 10c8408320..b48869e23d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_123a.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_123a.tt @@ -1,3 +1,4 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 123a builder [% INCLUDE 'doc-head-close.inc' %] @@ -30,17 +31,17 @@
Cancel
- - + 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_field_123d.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_123d.tt index 90cdd6aaa0..54cb77f177 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_123d.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_123d.tt @@ -1,3 +1,4 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 123d builder [% INCLUDE 'doc-head-close.inc' %] @@ -46,9 +47,10 @@
Cancel
- + window.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_field_123e.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_123e.tt index 7fc52dd792..ea2cf43d3f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_123e.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_123e.tt @@ -1,3 +1,4 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 123e builder [% INCLUDE 'doc-head-close.inc' %] @@ -46,9 +47,10 @@
Cancel
- + window.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_field_123f.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_123f.tt index 8a87afaa28..bb0d414661 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_123f.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_123f.tt @@ -1,3 +1,4 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 123f builder [% INCLUDE 'doc-head-close.inc' %] @@ -46,9 +47,10 @@
Cancel
- + window.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_field_123g.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_123g.tt index 0eb1cf90f9..d256865ce1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_123g.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_123g.tt @@ -1,3 +1,4 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 123g builder [% INCLUDE 'doc-head-close.inc' %] @@ -46,9 +47,10 @@
Cancel
- + window.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_field_123i_j.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_123i_j.tt index 898953da62..41381a46bc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_123i_j.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_123i_j.tt @@ -1,3 +1,4 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 123i/j builder [% INCLUDE 'doc-head-close.inc' %] @@ -36,22 +37,23 @@
Cancel
- -[% INCLUDE 'popup-bottom.inc' %] +[% MACRO jsinclude BLOCK %] + +[% END %] + +[% INCLUDE 'intranet-bottom.inc' popup_window=1 %] -- 2.39.5