View | Details | Raw Unified | Return to bug 9507
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/js/prevent_submit.js (+18 lines)
Line 0 Link Here
1
var prevent_nav = window.Event ? true : false;
2
if (prevent_nav) {
3
    window.captureEvents(Event.KEYDOWN);
4
    window.onkeydown = NetscapeEventHandler_KeyDown;
5
} else {
6
    document.onkeydown = IEEventHandler_KeyDown;
7
}
8
9
function NetscapeEventHandler_KeyDown(e) {
10
    if (e.which == 13 && e.target.type != 'textarea' && e.target.type != 'submit') { return false; }
11
    return true;
12
}
13
14
function IEEventHandler_KeyDown() {
15
    if (event.keyCode == 13 && event.srcElement.type != 'textarea' && event.srcElement.type != 'submit')
16
        return false;
17
    return true;
18
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt (-18 / +1 lines)
Lines 6-30 Link Here
6
<script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
6
<script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
7
[% INCLUDE 'additem.js.inc' %]
7
[% INCLUDE 'additem.js.inc' %]
8
<script type="text/javascript" src="[% themelang %]/js/additem.js"></script>
8
<script type="text/javascript" src="[% themelang %]/js/additem.js"></script>
9
<script type="text/javascript" src="[% themelang %]/js/prevent_submit.js"></script>
9
<script type="text/javascript">
10
<script type="text/javascript">
10
var nav = window.Event ? true : false;
11
if (nav) {
12
    window.captureEvents(Event.KEYDOWN);
13
    window.onkeydown = NetscapeEventHandler_KeyDown;
14
} else {
15
    document.onkeydown = IEEventHandler_KeyDown;
16
}
17
18
function NetscapeEventHandler_KeyDown(e) {
19
    if (e.which == 13 && e.target.type != 'textarea' && e.target.type != 'submit') { return false; }
20
    return true;
21
}
22
23
function IEEventHandler_KeyDown() {
24
    if (event.keyCode == 13 && event.srcElement.type != 'textarea' && event.srcElement.type != 'submit')
25
        return false;
26
    return true;
27
}
28
//<![CDATA[
11
//<![CDATA[
29
actTotal = "";
12
actTotal = "";
30
13
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt (-19 / +1 lines)
Lines 3-28 Link Here
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'additem.js.inc' %]
4
[% INCLUDE 'additem.js.inc' %]
5
<script type="text/javascript" src="[% themelang %]/js/additem.js"> </script>
5
<script type="text/javascript" src="[% themelang %]/js/additem.js"> </script>
6
<script type="text/javascript" src="[% themelang %]/js/prevent_submit.js"></script>
6
<script type="text/javascript">
7
<script type="text/javascript">
7
8
var nav = window.Event ? true : false;
9
if (nav) {
10
	window.captureEvents(Event.KEYDOWN);
11
	window.onkeydown = NetscapeEventHandler_KeyDown;
12
} else {
13
	document.onkeydown = IEEventHandler_KeyDown;
14
}
15
16
function NetscapeEventHandler_KeyDown(e) {
17
	if (e.which == 13 && e.target.type != 'textarea' && e.target.type != 'submit') { return false; }
18
	return true;
19
}
20
21
function IEEventHandler_KeyDown() {
22
	if (event.keyCode == 13 && event.srcElement.type != 'textarea' && event.srcElement.type != 'submit')
23
		return false;
24
	return true;
25
}
26
//<![CDATA[
8
//<![CDATA[
27
    function Check(form) {
9
    function Check(form) {
28
        [% IF (AcqCreateItemReceiving) %]
10
        [% IF (AcqCreateItemReceiving) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt (-19 / +1 lines)
Lines 2-26 Link Here
2
<title>Koha &rsaquo; Serials &rsaquo; Serial edition [% bibliotitle %]</title>
2
<title>Koha &rsaquo; Serials &rsaquo; Serial edition [% bibliotitle %]</title>
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
<script type="text/javascript" src="[% themelang %]/js/cataloging.js"></script>
4
<script type="text/javascript" src="[% themelang %]/js/cataloging.js"></script>
5
<script type="text/javascript" src="[% themelang %]/js/prevent_submit.js"></script>
5
<script language="JavaScript" type="text/javascript">
6
<script language="JavaScript" type="text/javascript">
6
var nav = window.Event ? true : false;
7
if (nav) {
8
	window.captureEvents(Event.KEYDOWN);
9
	window.onkeydown = NetscapeEventHandler_KeyDown;
10
} else {
11
	document.onkeydown = IEEventHandler_KeyDown;
12
}
13
14
function NetscapeEventHandler_KeyDown(e) {
15
	if (e.which == 13 && e.target.type != 'textarea' && e.target.type != 'submit') { return false; }
16
	return true;
17
}
18
19
function IEEventHandler_KeyDown() {
20
	if (event.keyCode == 13 && event.srcElement.type != 'textarea' && event.srcElement.type != 'submit')
21
		return false;
22
	return true;
23
}
24
//<![CDATA[
7
//<![CDATA[
25
function generateReceive() {
8
function generateReceive() {
26
    var subscriptionid =  document.getElementsByName("subscriptionid")[0].value;
9
    var subscriptionid =  document.getElementsByName("subscriptionid")[0].value;
27
- 

Return to bug 9507