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

(-)a/koha-tmpl/opac-tmpl/prog/en/modules/sco/printslip.tt (+2 lines)
Lines 8-17 Link Here
8
[% END %]
8
[% END %]
9
9
10
<script language="javascript">
10
<script language="javascript">
11
//<![CDATA[
11
    function printThenClose() {
12
    function printThenClose() {
12
        window.print();
13
        window.print();
13
        window.close();
14
        window.close();
14
    }
15
    }
16
//]]>
15
</script>
17
</script>
16
</head>
18
</head>
17
<body id="circ_printslip" class="circ" onload="printThenClose();">
19
<body id="circ_printslip" class="circ" onload="printThenClose();">
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/sco/receipt.tt (-2 / +4 lines)
Lines 4-10 Link Here
4
<head>
4
<head>
5
<title> RECEIPT </title>
5
<title> RECEIPT </title>
6
6
7
<script language="JavaScript" type="text/javascript">
7
<script type="text/javascript">
8
//<![CDATA[
8
x = 0; 
9
x = 0; 
9
function callPrint()
10
function callPrint()
10
{
11
{
Lines 12-18 function callPrint() Link Here
12
      
13
      
13
     {
14
     {
14
      self.print();
15
      self.print();
15
      javascript:window.opener.location='/cgi-bin/koha/sco/sco-main.pl?logout.x=1';
16
      window.opener.location='/cgi-bin/koha/sco/sco-main.pl?logout.x=1';
16
      x = 1; 
17
      x = 1; 
17
     }
18
     }
18
}
19
}
Lines 24-29 function closeNow() Link Here
24
    setTimeout('self.close()',1000);
25
    setTimeout('self.close()',1000);
25
  }    
26
  }    
26
}
27
}
28
//]]>
27
</script> 
29
</script> 
28
30
29
31
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tt (-5 / +5 lines)
Lines 11-16 Link Here
11
<script type="text/javascript" src="[% themelang %]/lib/jquery/jquery-ui.js"></script>
11
<script type="text/javascript" src="[% themelang %]/lib/jquery/jquery-ui.js"></script>
12
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
12
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
13
<script type="text/javascript">//<![CDATA[
13
<script type="text/javascript">//<![CDATA[
14
function _(s) { return s; } // dummy function for gettext
14
function sco_init(valid_session) {
15
function sco_init(valid_session) {
15
    if (valid_session == 1) {
16
    if (valid_session == 1) {
16
        setTimeout("location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';",[% SelfCheckTimeout %]); 
17
        setTimeout("location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';",[% SelfCheckTimeout %]); 
Lines 30-42 function checkout_confirm(patronid) { Link Here
30
    var   barcode = $("#barcode").val();
31
    var   barcode = $("#barcode").val();
31
    // alert("checkout_confirm('" + patronid + "') called for barcode '" + barcode + "'");
32
    // alert("checkout_confirm('" + patronid + "') called for barcode '" + barcode + "'");
32
    if (! barcode) { dofocus(); return false; }    // no barcode
33
    if (! barcode) { dofocus(); return false; }    // no barcode
33
    if (barcode == "__KOHA_NEW_CIRC__") {   // magic barcode 
34
    if (barcode == "__KOHA_NEW_CIRC__") {   // magic barcode
34
        window.location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';
35
        window.location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';
35
        return false;
36
        return false;
36
    }
37
    }
37
    if (this.valid_session == 0) {
38
    if (this.valid_session === 0) {
38
        // probably should force logout like above ? --atz 6/09
39
        // probably should force logout like above ? --atz 6/09
39
        if (confirm('Session has expired.  Click \'OK\' to continue processing this item.  Click Cancel if you are not ' + patronid)){
40
        if (confirm(_("Session has expired.  Click 'OK' to continue processing this item.  Click Cancel if you are not ") + patronid)){
40
            this.op.value='logout';
41
            this.op.value='logout';
41
            this.patronid.value='';
42
            this.patronid.value='';
42
        }
43
        }
Lines 100-106 $(document).ready(function() { Link Here
100
//]]>
101
//]]>
101
$(document).ready(function(){
102
$(document).ready(function(){
102
    $("#logout_form").submit(function(){
103
    $("#logout_form").submit(function(){
103
        if(confirm("Would you like to print a receipt?")){
104
        if(confirm(_("Would you like to print a receipt?"))){
104
            window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber %]&amp;print=qslip");
105
            window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber %]&amp;print=qslip");
105
        }
106
        }
106
        return true;
107
        return true;
107
- 

Return to bug 8033