From 712346cc48438b63fe1cbf8a7dc96006a0910672 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 2 Jan 2018 19:54:24 +0000 Subject: [PATCH] Bug 19906: Move template JavaScript to the footer: NORMARC editor plugins This patch updates NORMARC 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 NORMARC 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. - normarc_field_007.tt - normarc_field_008.tt - normarc_leader.tt --- .../cataloguing/value_builder/normarc_field_007.tt | 5448 ++++++------- .../cataloguing/value_builder/normarc_field_008.tt | 8617 ++++++++++---------- .../cataloguing/value_builder/normarc_leader.tt | 49 +- 3 files changed, 7060 insertions(+), 7054 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/normarc_field_007.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/normarc_field_007.tt index 503af7a..77e0cdf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/normarc_field_007.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/normarc_field_007.tt @@ -1,3 +1,4 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Cataloging › 007 feltbygger [% INCLUDE 'doc-head-close.inc' %] @@ -69,2758 +70,2759 @@
Avbryt
- + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ +
(Skalaen oppgis med tre sifre, f.eks. 015, 048). En strek brukes for ukjente sifre (f.eks. 03-, 1--). Bruk ||| dersom info ikke er oppgitt.) \ + - 001-999 \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + '; + break; + case "k": + divOutput.innerHTML=' \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ +
00 Type materialek Grafisk materiale som er ugjenomtrengelig for lys
\ + \ +
\ + \ +
\ + \ +
\ + \ +
\ + \ +
'; + break; + case "m": + divOutput.innerHTML=' \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ +
00 Type materialem Film
\ + \ +
\ + \ +
\ + \ +
\ + \ +
\ + \ +
\ + \ +
\ + \ +
\ + \ +
\ + \ +
\ + \ +
\ + \ +
\ + \ +
\ + Koder er ikke definert \ +
\ + Koder er ikke definert \ +
\ + \ +
\ + \ +

(Registreres med 6 siffer i formen ååååmm. Hvis deler av datoen ikke er kjent, erstattes hvert ukjent siffer med en strek (-).)
Dato \ +
'; + break; + case "s": + divOutput.innerHTML=' \ + \ + \ + \ + \ + \ + \ + \ + \ +
00 Type materiales Lydopptak
\ + \ +
'; + break; + case "u": + divOutput.innerHTML=' \ + \ + \ + \ + \ + \ + \ + \ + \ +
00 Type materiales Tredimensjonal gjenstand
\ + \ +
'; + break; + case "v": + divOutput.innerHTML=' \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ +
00 Type materialev Videoopptak
\ + \ +
\ + \ +
\ + \ +
\ + \ +
\ + \ +
\ + \ +
\ + \ +
\ + \ +
'; + break; + default: + divOutput.innerHTML=""; + } + } + +[% 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/normarc_field_008.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/normarc_field_008.tt index 14101b1..5444d9b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/normarc_field_008.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/normarc_field_008.tt @@ -1,3 +1,4 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Katalogisering › Feltbygger for 008 [% INCLUDE 'doc-head-close.inc' %] @@ -205,4316 +206,4316 @@
Cancel
- + document.f_pop.f1.value+ + document.f_pop.f6.value+ + // bug 2563 { + ( document.f_pop.f710.value.match(/^\s*$/) ? " " : pad4(document.f_pop.f710.value) )+ + ( document.f_pop.f1114.value.match(/^\s*$/) ? " " : pad4(document.f_pop.f1114.value) )+ + // } + document.f_pop.f1517.value+ + document.f_pop.f18.value+ + document.f_pop.f19.value+ + document.f_pop.f20.value+ + document.f_pop.f21.value+ + document.f_pop.f22.value+ + document.f_pop.f23.value+ + document.f_pop.f24.value+ + document.f_pop.f25.value+ + document.f_pop.f26.value+ + document.f_pop.f27.value+ + document.f_pop.f28.value+ + document.f_pop.f29.value+ + document.f_pop.f30.value+ + document.f_pop.f31.value+ + document.f_pop.f32.value+ + document.f_pop.f33.value+ + document.f_pop.f34.value+ + document.f_pop.f3537.value+ + document.f_pop.f38.value+ + document.f_pop.f39.value; + 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/normarc_leader.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/normarc_leader.tt index a99d78e..f455804 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/normarc_leader.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/normarc_leader.tt @@ -1,7 +1,9 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Cataloging › 000 - Bygging av postens hode [% INCLUDE 'doc-head-close.inc' %] +
@@ -197,27 +199,28 @@
Avbryt
- -[% INCLUDE 'popup-bottom.inc' %] + field.value = + ' '+ + document.f_pop.f5.value+ + document.f_pop.f6.value+ + document.f_pop.f7.value+ + ' '+ // document.f_pop.f8.value+ + 'a'+ // MARC21 UNICODE flag - must be 'a' for Koha + '22 '+ + document.f_pop.f17.value+ + ' '+ // document.f_pop.f18.value+ + ' '+ // document.f_pop.f19.value+ + '4500'; + self.close(); + return false; + } + +[% END %] + +[% INCLUDE 'intranet-bottom.inc' popup_window=1 %] -- 2.1.4