From 7ea03cefd6a1612ad60ead35bbac95588ff5723c Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 22 Dec 2017 14:12:09 +0000 Subject: [PATCH] Bug 19872: Move template JavaScript to the footer: UNIMARC editor plugins, part 4 This patch updates more and 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_124a.tt - unimarc_field_124b.tt - unimarc_field_124c.tt - unimarc_field_124d.tt - unimarc_field_124e.tt - unimarc_field_124f.tt - unimarc_field_124g.tt Signed-off-by: delaye Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- .../value_builder/unimarc_field_124a.tt | 27 ++++++++++--------- .../value_builder/unimarc_field_124b.tt | 25 +++++++++-------- .../value_builder/unimarc_field_124c.tt | 25 +++++++++-------- .../value_builder/unimarc_field_124d.tt | 25 +++++++++-------- .../value_builder/unimarc_field_124e.tt | 27 ++++++++++--------- .../value_builder/unimarc_field_124f.tt | 27 ++++++++++--------- .../value_builder/unimarc_field_124g.tt | 25 +++++++++-------- 7 files changed, 101 insertions(+), 80 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_124a.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_124a.tt index de3aefaba9..9c42aef691 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_124a.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_124a.tt @@ -1,7 +1,9 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 124a builder [% INCLUDE 'doc-head-close.inc' %] +

UNIMARC field 124a builder

@@ -30,17 +32,18 @@
Cancel
- -[% INCLUDE 'popup-bottom.inc' %] + field.value = document.f_pop.f1.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_124b.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_124b.tt index 647ef9613a..6d3e5d1226 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_124b.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_124b.tt @@ -1,7 +1,9 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 124b builder [% INCLUDE 'doc-head-close.inc' %] +

UNIMARC field 124b builder

@@ -71,17 +73,18 @@
Cancel
- + self.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_124c.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_124c.tt index 6d99bca00e..c8200789b8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_124c.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_124c.tt @@ -1,7 +1,9 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 124c builder [% INCLUDE 'doc-head-close.inc' %] +

UNIMARC field 124c builder

@@ -126,16 +128,17 @@
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_124d.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_124d.tt index b003354106..a2b5eebbdd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_124d.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_124d.tt @@ -1,7 +1,9 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 124d builder [% INCLUDE 'doc-head-close.inc' %] +

UNIMARC field 124d builder

@@ -30,16 +32,17 @@
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_124e.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_124e.tt index 72a39efec2..44261c184d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_124e.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_124e.tt @@ -1,7 +1,9 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 124e builder [% INCLUDE 'doc-head-close.inc' %] +

UNIMARC field 124e builder

@@ -31,16 +33,17 @@
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_124f.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_124f.tt index dd9051e8a6..2a6aab2433 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_124f.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_124f.tt @@ -1,7 +1,9 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 124f builder [% INCLUDE 'doc-head-close.inc' %] +

UNIMARC field 124f builder

@@ -105,16 +107,17 @@
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_124g.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_124g.tt index 40add6a537..effdf26d20 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_124g.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_124g.tt @@ -1,7 +1,9 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 124g builder [% INCLUDE 'doc-head-close.inc' %] +

UNIMARC field 124g builder

@@ -66,16 +68,17 @@
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 -- 2.39.5