From 514808d5141602aed72d0a30e3bcb79a5ba3812f Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 22 Dec 2017 14:51:20 +0000 Subject: [PATCH] Bug 19874: Move template JavaScript to the footer: UNIMARC editor plugins, part 5 This patch updates yet 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_125a.tt - unimarc_field_125b.tt - unimarc_field_126a.tt - unimarc_field_126b.tt - unimarc_field_127.tt Signed-off-by: delaye --- .../value_builder/unimarc_field_125a.tt | 25 +++++++------- .../value_builder/unimarc_field_125b.tt | 25 ++++++++------ .../value_builder/unimarc_field_126a.tt | 23 +++++++------ .../value_builder/unimarc_field_126b.tt | 27 ++++++++------- .../cataloguing/value_builder/unimarc_field_127.tt | 40 +++++++++++----------- 5 files changed, 74 insertions(+), 66 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_125a.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_125a.tt index 444da8d..10056b9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_125a.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_125a.tt @@ -1,7 +1,9 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 125a builder [% INCLUDE 'doc-head-close.inc' %] +

UNIMARC field 125a builder

@@ -133,17 +135,16 @@
Cancel
- - + field.value = document.f_pop.f1.value+document.f_pop.f2.value; + window.close(); + return false; + } + +[% 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_125b.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_125b.tt index 6bfa70a..feea0b1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_125b.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_125b.tt @@ -1,7 +1,9 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 125b builder [% INCLUDE 'doc-head-close.inc' %] +

UNIMARC field 125b builder

@@ -125,17 +127,18 @@
Cancel
- + window.close(); + return false; + } + +[% 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_126a.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_126a.tt index 0e03751..253c899 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_126a.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_126a.tt @@ -1,7 +1,9 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 126a builder [% INCLUDE 'doc-head-close.inc' %] +

UNIMARC field 126a builder

@@ -1026,16 +1028,17 @@
Cancel
- + window.close(); + return false; + } + +[% 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_126b.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_126b.tt index 278007eb..075c633 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_126b.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_126b.tt @@ -1,7 +1,9 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 126b builder [% INCLUDE 'doc-head-close.inc' %] +

UNIMARC field 126b builder

@@ -169,19 +171,18 @@
Cancel
- -[% INCLUDE 'popup-bottom.inc' %] + field.value = document.f_pop.f1.value+document.f_pop.f2.value+document.f_pop.f3.value ; + self.close(); + return false; + } + +[% 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_127.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_127.tt index 8f2f629..5e8adc2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_127.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_127.tt @@ -1,7 +1,9 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 127 builder [% INCLUDE 'doc-head-close.inc' %] +

UNIMARC field 127 builder

@@ -23,28 +25,26 @@
Cancel
- -[% INCLUDE 'popup-bottom.inc' %] + field.value = document.f_pop.f1.value+document.f_pop.f2.value+document.f_pop.f3.value; + self.close(); + return false; + } + +[% END %] + +[% INCLUDE 'intranet-bottom.inc' popup_window=1 %] \ No newline at end of file -- 2.7.4