From e42475ca28a56e83a672a618339ffdfacd09036c Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 21 Dec 2017 16:30:05 +0000 Subject: [PATCH] Bug 19866: Move template JavaScript to the footer: UNIMARC editor plugins, part 1 This patch updates several 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_100.tt - unimarc_field_100_authorities.tt - unimarc_field_105.tt - unimarc_field_106.tt - unimarc_field_110.tt - unimarc_field_115a.tt - unimarc_field_115b.tt Signed-off-by: Claire Gravely Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- .../value_builder/unimarc_field_100.tt | 95 ++++++------------- .../unimarc_field_100_authorities.tt | 52 +++++----- .../value_builder/unimarc_field_105.tt | 29 +++--- .../value_builder/unimarc_field_106.tt | 27 +++--- .../value_builder/unimarc_field_110.tt | 33 ++++--- .../value_builder/unimarc_field_115a.tt | 36 +++---- .../value_builder/unimarc_field_115b.tt | 39 ++++---- 7 files changed, 147 insertions(+), 164 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_100.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_100.tt index d434b63a9d..12a394ffa5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_100.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_100.tt @@ -1,7 +1,9 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 100 builder [% INCLUDE 'doc-head-close.inc' %] +

UNIMARC field 100 builder

@@ -683,69 +685,34 @@ languages and obsolete typography)

Cancel

- +[% END %] - field.value= document.f_pop.f1.value + - document.f_pop.f2.value +document.f_pop.f3.value - +document.f_pop.f4.value+document.f_pop.f5.value+document.f_pop.f6.value+document.f_pop.f7.value+document.f_pop.f8.value+document.f_pop.f9.value+document.f_pop.f10.value+document.f_pop.f11.value+document.f_pop.f12.value+document.f_pop.f13.value+document.f_pop.f14.value+document.f_pop.f15.value; - -// SetPublicationDate(); - self.close(); - return false; - } -//]]> - -[% 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_100_authorities.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_100_authorities.tt index e905585cac..a13ab33211 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_100_authorities.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_100_authorities.tt @@ -1,7 +1,9 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 100 builder [% INCLUDE 'doc-head-close.inc' %] +

UNIMARC field 100 builder

@@ -348,27 +350,29 @@ languages and obsolete typography)

Cancel

- -[% INCLUDE 'popup-bottom.inc' %] + +[% MACRO jsinclude BLOCK %] + +[% END %] + +[% INCLUDE 'intranet-bottom.inc' popup_window=1 %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_105.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_105.tt index d6b163c108..5511ef4767 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_105.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_105.tt @@ -1,7 +1,9 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 105 builder [% INCLUDE 'doc-head-close.inc' %] +

UNIMARC field 105 builder

@@ -1133,17 +1135,18 @@
Cancel
- -[% INCLUDE 'popup-bottom.inc' %] +[% MACRO jsinclude BLOCK %] + +[% END %] + +[% INCLUDE 'intranet-bottom.inc' popup_window=1 %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_106.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_106.tt index 889d389b6f..a418529534 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_106.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_106.tt @@ -1,7 +1,9 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 106 builder [% INCLUDE 'doc-head-close.inc' %] +

UNIMARC field 106 builder

@@ -83,19 +85,18 @@ supplement)
Cancel
- +[% MACRO jsinclude BLOCK %] + +[% END %] -[% INCLUDE 'popup-bottom.inc' %] \ No newline at end of file +[% INCLUDE 'intranet-bottom.inc' popup_window=1 %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_110.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_110.tt index 67682ba383..a8ea826800 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_110.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_110.tt @@ -1,7 +1,9 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 110 builder [% INCLUDE 'doc-head-close.inc' %] +

UNIMARC field 110 builder

@@ -591,18 +593,19 @@
Cancel
- - -[% INCLUDE 'popup-bottom.inc' %] + +[% MACRO jsinclude BLOCK %] + +[% END %] + +[% INCLUDE 'intranet-bottom.inc' popup_window=1 %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_115a.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_115a.tt index 588f3521bd..7a8091bc16 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_115a.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_115a.tt @@ -1,3 +1,4 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 115a builder [% INCLUDE 'doc-head-close.inc' %] @@ -1189,20 +1190,21 @@
Cancel
- - -[% INCLUDE 'popup-bottom.inc' %] + +[% MACRO jsinclude BLOCK %] + +[% END %] + +[% INCLUDE 'intranet-bottom.inc' popup_window=1 %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_115b.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_115b.tt index 64698d648e..80c0105a55 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_115b.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_115b.tt @@ -1,7 +1,9 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] UNIMARC field 115b builder [% INCLUDE 'doc-head-close.inc' %] +

UNIMARC field 115b builder

@@ -635,21 +637,22 @@
Cancel
- - -[% INCLUDE 'popup-bottom.inc' %] + +[% MACRO jsinclude BLOCK %] + +[% END %] + +[% INCLUDE 'intranet-bottom.inc' popup_window=1 %] -- 2.39.5