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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt (-3 / +13 lines)
Lines 16-22 Link Here
16
</script>
16
</script>
17
<script type="text/javascript" src="[% interface %]/[% theme %]/lib/modernizr.min.js"></script>
17
<script type="text/javascript" src="[% interface %]/[% theme %]/lib/modernizr.min.js"></script>
18
</head>
18
</head>
19
<body onload="dofocus();">
19
<body onload="dofocus();" onunload="mungeHistory();">
20
[% INCLUDE 'masthead-sco.inc' %]
20
[% INCLUDE 'masthead-sco.inc' %]
21
21
22
    <div class="main">
22
    <div class="main">
Lines 309-316 Link Here
309
    [% INCLUDE 'datatables.inc' %]
309
    [% INCLUDE 'datatables.inc' %]
310
    <script type="text/javascript">
310
    <script type="text/javascript">
311
        //<![CDATA[
311
        //<![CDATA[
312
        function mungeHistory() {
313
            // prevent back button from allowing form resubmission
314
            if (history && history.pushState) {
315
                history.replaceState(null, document.title, this.href);
316
            }
317
        }
318
        var mainTimeout;
312
        function sco_init() {
319
        function sco_init() {
313
            setTimeout("location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';",[% SelfCheckTimeout %]);
320
            mainTimeout = setTimeout(function() {
321
                location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
322
            }, [% SelfCheckTimeout %]);
314
        }
323
        }
315
        function dofocus() {    // named function req'd for body onload event by some FF and IE7 security models
324
        function dofocus() {    // named function req'd for body onload event by some FF and IE7 security models
316
            // alert("dofocus called");
325
            // alert("dofocus called");
Lines 346-351 Link Here
346
            }));
355
            }));
347
356
348
            $("#logout_form").submit(function(){
357
            $("#logout_form").submit(function(){
358
                clearTimeout(mainTimeout);
349
                if(confirm("Would you like to print a receipt?")){
359
                if(confirm("Would you like to print a receipt?")){
350
                    window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber %]&amp;print=qslip");
360
                    window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber %]&amp;print=qslip");
351
                }
361
                }
Lines 357-360 Link Here
357
367
358
    [% IF ( opacuserjs ) %]<script type="text/javascript">[% opacuserjs %]</script>[% END %]
368
    [% IF ( opacuserjs ) %]<script type="text/javascript">[% opacuserjs %]</script>[% END %]
359
    [% IF ( SCOUserJS ) %]<script type="text/javascript">[% SCOUserJS %]</script>[% END %]
369
    [% IF ( SCOUserJS ) %]<script type="text/javascript">[% SCOUserJS %]</script>[% END %]
360
[% END %]
370
[% END %]
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tt (-3 / +12 lines)
Lines 15-22 Link Here
15
</script>
15
</script>
16
[% INCLUDE 'datatables.inc' %]
16
[% INCLUDE 'datatables.inc' %]
17
<script type="text/javascript">//<![CDATA[
17
<script type="text/javascript">//<![CDATA[
18
function mungeHistory() {
19
    // prevent back button from allowing form resubmission
20
    if (history && history.pushState) {
21
        history.replaceState(null, document.title, this.href);
22
    }
23
}
24
var mainTimeout;
18
function sco_init() {
25
function sco_init() {
19
    setTimeout("location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';",[% SelfCheckTimeout %]);
26
    mainTimeout = setTimeout(function() {
27
        location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
28
    }, [% SelfCheckTimeout %]);
20
}
29
}
21
function dofocus() {    // named function req'd for body onload event by some FF and IE7 security models
30
function dofocus() {    // named function req'd for body onload event by some FF and IE7 security models
22
    // alert("dofocus called");
31
    // alert("dofocus called");
Lines 80-85 $(document).ready(function() { Link Here
80
        ]
89
        ]
81
    }));
90
    }));
82
    $("#logout_form").submit(function(){
91
    $("#logout_form").submit(function(){
92
        clearTimeout(mainTimeout);
83
        if(confirm("Would you like to print a receipt?")){
93
        if(confirm("Would you like to print a receipt?")){
84
            window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber %]&amp;print=qslip");
94
            window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber %]&amp;print=qslip");
85
        }
95
        }
Lines 96-102 $(document).ready(function() { Link Here
96
[% IF ( SCOUserCSS ) %]<style type="text/css">[% SCOUserCSS %]</style>[% END %]
106
[% IF ( SCOUserCSS ) %]<style type="text/css">[% SCOUserCSS %]</style>[% END %]
97
107
98
</head>
108
</head>
99
<body onload="dofocus();">
109
<body onload="dofocus();" onunload="mungeHistory();">
100
110
101
<div id="doc" class="yui-t7">
111
<div id="doc" class="yui-t7">
102
112
103
- 

Return to bug 10016