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 <stephane.delaye@biblibre.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Owen Leonard 2017-12-22 14:12:09 +00:00 committed by Jonathan Druart
parent fbfbcae838
commit 7ea03cefd6
7 changed files with 107 additions and 86 deletions

View file

@ -1,7 +1,9 @@
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>UNIMARC field 124a builder</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="cat_unimarc_field_124a" class="cat" style="padding:1em;">
<h3>UNIMARC field 124a builder</h3>
<form name="f_pop" action="">
@ -30,8 +32,9 @@
</table>
<fieldset class="action"><input type="button" value="OK" onclick="report();" /> <a href="#" class="cancel close">Cancel</a></fieldset>
</form>
<script type="text/javascript">
//<![CDATA[
[% MACRO jsinclude BLOCK %]
<script type="text/javascript">
function report() {
var doc = opener.document;
var field = doc.getElementById("[% index %]");
@ -40,7 +43,7 @@
self.close();
return false;
}
//]]>
</script>
</script>
[% END %]
[% INCLUDE 'popup-bottom.inc' %]
[% INCLUDE 'intranet-bottom.inc' popup_window=1 %]

View file

@ -1,7 +1,9 @@
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>UNIMARC field 124b builder</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="cat_unimarc_field_124b" class="cat" style="padding:1em;">
<h3>UNIMARC field 124b builder</h3>
<form name="f_pop" action="">
@ -71,8 +73,9 @@
</table>
<fieldset class="action"><input type="button" value="OK" onclick="report();" /> <a href="#" class="cancel close">Cancel</a></fieldset>
</form>
<script type="text/javascript">
//<![CDATA[
[% MACRO jsinclude BLOCK %]
<script type="text/javascript">
function report() {
var doc = opener.document;
var field = doc.getElementById("[% index %]");
@ -81,7 +84,7 @@
self.close();
return false;
}
//]]>
</script>
</script>
[% END %]
[% INCLUDE 'popup-bottom.inc' %]
[% INCLUDE 'intranet-bottom.inc' popup_window=1 %]

View file

@ -1,7 +1,9 @@
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>UNIMARC field 124c builder</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="cat_unimarc_field_124c" class="cat" style="padding:1em;">
<h3>UNIMARC field 124c builder</h3>
<form name="f_pop" action="">
@ -126,8 +128,9 @@
</table>
<fieldset class="action"><input type="button" value="OK" onclick="report();" /> <a href="#" class="cancel close">Cancel</a></fieldset>
</form>
<script type="text/javascript">
//<![CDATA[
[% MACRO jsinclude BLOCK %]
<script type="text/javascript">
function report() {
var doc = opener.document;
var field = doc.getElementById("[% index %]");
@ -135,7 +138,7 @@
window.close();
return false;
}
//]]>
</script>
</script>
[% END %]
[% INCLUDE 'popup-bottom.inc' %]
[% INCLUDE 'intranet-bottom.inc' popup_window=1 %]

View file

@ -1,7 +1,9 @@
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>UNIMARC field 124d builder</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="cat_unimarc_field_124d" class="cat" style="padding:1em;">
<h3>UNIMARC field 124d builder</h3>
<form name="f_pop" action="">
@ -30,8 +32,9 @@
</table>
<fieldset class="action"><input type="button" value="OK" onclick="report();" /> <a href="#" class="cancel close">Cancel</a></fieldset>
</form>
<script type="text/javascript">
//<![CDATA[
[% MACRO jsinclude BLOCK %]
<script type="text/javascript">
function report() {
var doc = opener.document;
var field = doc.getElementById("[% index %]");
@ -39,7 +42,7 @@
window.close();
return false;
}
//]]>
</script>
</script>
[% END %]
[% INCLUDE 'popup-bottom.inc' %]
[% INCLUDE 'intranet-bottom.inc' popup_window=1 %]

View file

@ -1,7 +1,9 @@
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>UNIMARC field 124e builder</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="cat_unimarc_field_124e" class="cat" style="padding:1em;">
<h3>UNIMARC field 124e builder</h3>
<form name="f_pop" action="">
@ -31,8 +33,9 @@
</table>
<fieldset class="action"><input type="button" value="OK" onclick="report();" /> <a href="#" class="cancel close">Cancel</a></fieldset>
</form>
<script type="text/javascript">
//<![CDATA[
[% MACRO jsinclude BLOCK %]
<script type="text/javascript">
function report() {
var doc = opener.document;
var field = doc.getElementById("[% index %]");
@ -40,7 +43,7 @@
window.close();
return false;
}
//]]>
</script>
</script>
[% END %]
[% INCLUDE 'popup-bottom.inc' %]
[% INCLUDE 'intranet-bottom.inc' popup_window=1 %]

View file

@ -1,7 +1,9 @@
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>UNIMARC field 124f builder</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="cat_unimarc_field_124f" class="cat" style="padding:1em;">
<h3>UNIMARC field 124f builder</h3>
<form name="f_pop" action="">
@ -105,8 +107,9 @@
</table>
<fieldset class="action"><input type="button" value="OK" onclick="report();" /> <a href="#" class="cancel close">Cancel</a></fieldset>
</form>
<script type="text/javascript">
//<![CDATA[
[% MACRO jsinclude BLOCK %]
<script type="text/javascript">
function report() {
var doc = opener.document;
var field = doc.getElementById("[% index %]");
@ -114,7 +117,7 @@
self.close();
return false;
}
//]]>
</script>
</script>
[% END %]
[% INCLUDE 'popup-bottom.inc' %]
[% INCLUDE 'intranet-bottom.inc' popup_window=1 %]

View file

@ -1,7 +1,9 @@
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>UNIMARC field 124g builder</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="cat_unimarc_field_124g" class="cat" style="padding:1em;">
<h3>UNIMARC field 124g builder</h3>
<form name="f_pop" action="">
@ -66,8 +68,9 @@
</table>
<fieldset class="action"><input type="button" value="OK" onclick="report();" /> <a href="#" class="cancel close">Cancel</a></fieldset>
</form>
<script type="text/javascript">
//<![CDATA[
[% MACRO jsinclude BLOCK %]
<script type="text/javascript">
function report() {
var doc = opener.document;
var field = doc.getElementById("[% index %]");
@ -75,7 +78,7 @@
window.close();
return false;
}
//]]>
</script>
</script>
[% END %]
[% INCLUDE 'popup-bottom.inc' %]
[% INCLUDE 'intranet-bottom.inc' popup_window=1 %]