Bug 19874: Move template JavaScript to the footer: UNIMARC editor plugins, part 5
This patch updates yet 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_125a.tt - unimarc_field_125b.tt - unimarc_field_126a.tt - unimarc_field_126b.tt - unimarc_field_127.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:
parent
7ea03cefd6
commit
077fcf3a6b
5 changed files with 76 additions and 68 deletions
|
@ -1,7 +1,9 @@
|
|||
[% SET footerjs = 1 %]
|
||||
[% INCLUDE 'doc-head-open.inc' %]
|
||||
<title>UNIMARC field 125a builder</title>
|
||||
[% INCLUDE 'doc-head-close.inc' %]
|
||||
</head>
|
||||
|
||||
<body id="cat_unimarc_field_125a" class="cat" style="padding:1em;">
|
||||
<h3>UNIMARC field 125a builder</h3>
|
||||
<form name="f_pop" action="">
|
||||
|
@ -133,17 +135,16 @@
|
|||
<fieldset class="action"><input type="button" value="OK" onclick="report();" /> <a href="#" class="cancel close">Cancel</a></fieldset>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function report() {
|
||||
var doc = opener.document;
|
||||
[% MACRO jsinclude BLOCK %]
|
||||
<script type="text/javascript">
|
||||
function report() {
|
||||
var doc = opener.document;
|
||||
var field = doc.getElementById("[% index %]");
|
||||
field.value = document.f_pop.f1.value+document.f_pop.f2.value;
|
||||
window.close();
|
||||
return false;
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
field.value = document.f_pop.f1.value+document.f_pop.f2.value;
|
||||
window.close();
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
[% END %]
|
||||
|
||||
|
||||
[% INCLUDE 'popup-bottom.inc' %]
|
||||
[% INCLUDE 'intranet-bottom.inc' popup_window=1 %]
|
|
@ -1,7 +1,9 @@
|
|||
[% SET footerjs = 1 %]
|
||||
[% INCLUDE 'doc-head-open.inc' %]
|
||||
<title>UNIMARC field 125b builder</title>
|
||||
[% INCLUDE 'doc-head-close.inc' %]
|
||||
</head>
|
||||
|
||||
<body id="unimarc_field_125b" class="cat" style="padding:1em;">
|
||||
<h3>UNIMARC field 125b builder</h3>
|
||||
<form name="f_pop" action="">
|
||||
|
@ -125,17 +127,18 @@
|
|||
</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[
|
||||
function report() {
|
||||
var doc = opener.document;
|
||||
var field = doc.getElementById("[% index %]");
|
||||
|
||||
field.value = document.f_pop.f1.value;
|
||||
window.close();
|
||||
return false;
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
[% INCLUDE 'popup-bottom.inc' %]
|
||||
[% MACRO jsinclude BLOCK %]
|
||||
<script type="text/javascript">
|
||||
function report() {
|
||||
var doc = opener.document;
|
||||
var field = doc.getElementById("[% index %]");
|
||||
|
||||
field.value = document.f_pop.f1.value;
|
||||
window.close();
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
[% END %]
|
||||
|
||||
[% INCLUDE 'intranet-bottom.inc' popup_window=1 %]
|
|
@ -1,7 +1,9 @@
|
|||
[% SET footerjs = 1 %]
|
||||
[% INCLUDE 'doc-head-open.inc' %]
|
||||
<title>UNIMARC field 126a builder</title>
|
||||
[% INCLUDE 'doc-head-close.inc' %]
|
||||
</head>
|
||||
|
||||
<body id="cat_unimarc_field_126a" class="cat" style="padding:1em;">
|
||||
<h3>UNIMARC field 126a builder</h3>
|
||||
<form name="f_pop" action="">
|
||||
|
@ -1026,16 +1028,17 @@
|
|||
</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[
|
||||
function report() {
|
||||
var doc = opener.document;
|
||||
|
||||
[% MACRO jsinclude BLOCK %]
|
||||
<script type="text/javascript">
|
||||
function report() {
|
||||
var doc = opener.document;
|
||||
var field = doc.getElementById("[% index %]");
|
||||
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 ;
|
||||
window.close();
|
||||
return false;
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
window.close();
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
[% END %]
|
||||
|
||||
[% INCLUDE 'popup-bottom.inc' %]
|
||||
[% INCLUDE 'intranet-bottom.inc' popup_window=1 %]
|
|
@ -1,7 +1,9 @@
|
|||
[% SET footerjs = 1 %]
|
||||
[% INCLUDE 'doc-head-open.inc' %]
|
||||
<title>UNIMARC field 126b builder</title>
|
||||
[% INCLUDE 'doc-head-close.inc' %]
|
||||
</head>
|
||||
|
||||
<body id="cat_unimarc_field_126b" class="cat" style="padding:1em;">
|
||||
<h3>UNIMARC field 126b builder</h3>
|
||||
<form name="f_pop" action="">
|
||||
|
@ -169,19 +171,18 @@
|
|||
</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[
|
||||
function report() {
|
||||
|
||||
|
||||
var doc = opener.document;
|
||||
[% MACRO jsinclude BLOCK %]
|
||||
<script type="text/javascript">
|
||||
function report() {
|
||||
var doc = opener.document;
|
||||
var field = doc.getElementById("[% index %]");
|
||||
|
||||
field.value = document.f_pop.f1.value+document.f_pop.f2.value+document.f_pop.f3.value ;
|
||||
self.close();
|
||||
return false;
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
[% INCLUDE 'popup-bottom.inc' %]
|
||||
field.value = document.f_pop.f1.value+document.f_pop.f2.value+document.f_pop.f3.value ;
|
||||
self.close();
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
[% END %]
|
||||
|
||||
[% INCLUDE 'intranet-bottom.inc' popup_window=1 %]
|
|
@ -1,7 +1,9 @@
|
|||
[% SET footerjs = 1 %]
|
||||
[% INCLUDE 'doc-head-open.inc' %]
|
||||
<title>UNIMARC field 127 builder</title>
|
||||
[% INCLUDE 'doc-head-close.inc' %]
|
||||
</head>
|
||||
|
||||
<body id="cat_unimarc_field_127" class="cat" style="padding:1em;">
|
||||
<h3>UNIMARC field 127 builder</h3>
|
||||
<form name="f_pop" action="">
|
||||
|
@ -23,28 +25,26 @@
|
|||
</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[
|
||||
function report() {
|
||||
document.f_pop.f1.value=document.f_pop.f1.value+' ';
|
||||
document.f_pop.f2.value=document.f_pop.f2.value+' ';
|
||||
document.f_pop.f3.value=document.f_pop.f3.value+' ';
|
||||
|
||||
[% MACRO jsinclude BLOCK %]
|
||||
<script type="text/javascript">
|
||||
function report() {
|
||||
document.f_pop.f1.value=document.f_pop.f1.value+' ';
|
||||
document.f_pop.f2.value=document.f_pop.f2.value+' ';
|
||||
document.f_pop.f3.value=document.f_pop.f3.value+' ';
|
||||
|
||||
document.f_pop.f1.value=document.f_pop.f1.value.substring(0,2);
|
||||
document.f_pop.f2.value=document.f_pop.f2.value.substring(0,2);
|
||||
document.f_pop.f3.value=document.f_pop.f3.value.substring(0,2);
|
||||
|
||||
document.f_pop.f1.value=document.f_pop.f1.value.substring(0,2);
|
||||
document.f_pop.f2.value=document.f_pop.f2.value.substring(0,2);
|
||||
document.f_pop.f3.value=document.f_pop.f3.value.substring(0,2);
|
||||
|
||||
|
||||
var doc = opener.document;
|
||||
var doc = opener.document;
|
||||
var field = doc.getElementById("[% index %]");
|
||||
|
||||
field.value = document.f_pop.f1.value+document.f_pop.f2.value+document.f_pop.f3.value;
|
||||
self.close();
|
||||
return false;
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
[% INCLUDE 'popup-bottom.inc' %]
|
||||
field.value = document.f_pop.f1.value+document.f_pop.f2.value+document.f_pop.f3.value;
|
||||
self.close();
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
[% END %]
|
||||
|
||||
[% INCLUDE 'intranet-bottom.inc' popup_window=1 %]
|
Loading…
Reference in a new issue