From b679835593ff4a46420d868b84a7a2eb7f5a2d56 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 22 Dec 2017 16:32:57 +0000 Subject: [PATCH] Bug 19877: Move template JavaScript to the footer: UNIMARC editor plugins, part 6 This patch updates more UNIMARC plugin templates than ever before, 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_128a.tt - unimarc_field_128b.tt - unimarc_field_128c.tt - unimarc_field_130.tt - unimarc_field_135a.tt - unimarc_field_140.tt - unimarc_field_141.tt Signed-off-by: delaye Signed-off-by: Katrin Fischer --- .../value_builder/unimarc_field_128a.tt | 28 +++++++++++--------- .../value_builder/unimarc_field_128b.tt | 27 ++++++++++--------- .../value_builder/unimarc_field_128c.tt | 24 +++++++++-------- .../cataloguing/value_builder/unimarc_field_130.tt | 28 +++++++++++--------- .../value_builder/unimarc_field_135a.tt | 22 +++++++++------- .../cataloguing/value_builder/unimarc_field_140.tt | 28 +++++++++++--------- .../cataloguing/value_builder/unimarc_field_141.tt | 30 ++++++++++++---------- 7 files changed, 107 insertions(+), 80 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_128a.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_128a.tt index 88d7f8c..bba00eb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_128a.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_128a.tt @@ -1,7 +1,9 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 128a builder [% INCLUDE 'doc-head-close.inc' %] +

UNIMARC field 128a builder

@@ -365,16 +367,18 @@
Cancel
- -[% INCLUDE 'popup-bottom.inc' %] +[% MACRO jsinclude BLOCK %] + +[% 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_128b.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_128b.tt index 9f302ae..e92cbb6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_128b.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_128b.tt @@ -1,7 +1,9 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 128b builder [% INCLUDE 'doc-head-close.inc' %] +

UNIMARC field 128b builder

@@ -461,17 +463,18 @@
Cancel
- + field.value = document.f_pop.f1.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_128c.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_128c.tt index 50a8be0..d5aa78d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_128c.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_128c.tt @@ -1,7 +1,9 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 128c builder [% INCLUDE 'doc-head-close.inc' %] +

UNIMARC field 128c builder

@@ -455,16 +457,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_130.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_130.tt index 6b07582..b486896 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_130.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_130.tt @@ -1,7 +1,9 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 130 builder [% INCLUDE 'doc-head-close.inc' %] +

UNIMARC field 130 builder

@@ -325,18 +327,20 @@ value="[% f5 %]" />
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_135a.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_135a.tt index 4483cf3..cd106f7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_135a.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_135a.tt @@ -1,7 +1,9 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 135a builder [% INCLUDE 'doc-head-close.inc' %] +

UNIMARC field 135a builder

@@ -56,17 +58,19 @@

Cancel

- + } + +[% 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_140.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_140.tt index 585f1a0..c1eaf92 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_140.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_140.tt @@ -1,7 +1,9 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 140 builder [% INCLUDE 'doc-head-close.inc' %] +

UNIMARC field 140 builder

@@ -1721,16 +1723,18 @@
Cancel
- -[% INCLUDE 'popup-bottom.inc' %] +[% MACRO jsinclude BLOCK %] + +[% 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_141.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_141.tt index a7ffe28..6b1d6d2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_141.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_141.tt @@ -1,7 +1,9 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 141 builder [% INCLUDE 'doc-head-close.inc' %] +

UNIMARC field 141 builder

@@ -364,17 +366,19 @@
Cancel
- -[% INCLUDE 'popup-bottom.inc' %] +[% MACRO jsinclude BLOCK %] + +[% END %] + +[% INCLUDE 'intranet-bottom.inc' popup_window=1 %] \ No newline at end of file -- 2.1.4