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 (+1 lines)
Lines 3-8 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
//<![CDATA[
8
//<![CDATA[
8
    function Check(form) {
9
    function Check(form) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt (-1 / +1 lines)
Lines 1-6 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
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/prevent_submit.js"></script>
4
<script language="JavaScript" type="text/javascript">
5
<script language="JavaScript" type="text/javascript">
5
//<![CDATA[
6
//<![CDATA[
6
function popup(subscriptionid) {
7
function popup(subscriptionid) {
7
- 

Return to bug 9507