From 014db4990822adfbd7f8b55317c87164f8f644c5 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 --- .../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 10c8408..b48869e 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 90cdd6a..54cb77f 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 7fc52dd..ea2cf43 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 8a87afa..bb0d414 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 0eb1cf9..d256865 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 898953d..41381a4 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.1.4