Bugzilla – Attachment 14134 Details for
Bug 8033
remove unused sco/receipt template file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8033 [Follow-up] add print receipt option to Koha self-check
Bug-8033-Follow-up-add-print-receipt-option-to-Koh.patch (text/plain), 4.36 KB, created by
Owen Leonard
on 2012-12-14 15:50:23 UTC
(
hide
)
Description:
Bug 8033 [Follow-up] add print receipt option to Koha self-check
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2012-12-14 15:50:23 UTC
Size:
4.36 KB
patch
obsolete
>From 57611784803d4cf4ed5ce217bcea65e9d87ef129 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 14 Dec 2012 10:32:29 -0500 >Subject: [PATCH] Bug 8033 [Follow-up] add print receipt option to Koha > self-check >Content-Type: text/plain; charset="utf-8" > >This follow-up makes some corrections to JavaScript, most importantly >by enabling translation of strings embedded in the script. Other >corrections: Trailing whitespace, proper <![CDATA[ commenting, >and === comparisons (Following coding/JSHint guidelines). > >To test, check something out in self checkout and click the "Finish" >button. The JavaScript confirmation dialog should appear and the receipt >should appear and self-close correctly. >--- > .../opac-tmpl/prog/en/modules/sco/printslip.tt | 2 ++ > koha-tmpl/opac-tmpl/prog/en/modules/sco/receipt.tt | 6 ++++-- > .../opac-tmpl/prog/en/modules/sco/sco-main.tt | 9 +++++---- > 3 files changed, 11 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/sco/printslip.tt b/koha-tmpl/opac-tmpl/prog/en/modules/sco/printslip.tt >index eaa0d30..44954b3 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/sco/printslip.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/sco/printslip.tt >@@ -8,10 +8,12 @@ > [% END %] > > <script language="javascript"> >+//<![CDATA[ > function printThenClose() { > window.print(); > window.close(); > } >+//]]> > </script> > </head> > <body id="circ_printslip" class="circ" onload="printThenClose();"> >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/sco/receipt.tt b/koha-tmpl/opac-tmpl/prog/en/modules/sco/receipt.tt >index 8178412..41be4e4 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/sco/receipt.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/sco/receipt.tt >@@ -4,7 +4,8 @@ > <head> > <title> RECEIPT </title> > >-<script language="JavaScript" type="text/javascript"> >+<script type="text/javascript"> >+//<![CDATA[ > x = 0; > function callPrint() > { >@@ -12,7 +13,7 @@ function callPrint() > > { > self.print(); >- javascript:window.opener.location='/cgi-bin/koha/sco/sco-main.pl?logout.x=1'; >+ window.opener.location='/cgi-bin/koha/sco/sco-main.pl?logout.x=1'; > x = 1; > } > } >@@ -24,6 +25,7 @@ function closeNow() > setTimeout('self.close()',1000); > } > } >+//]]> > </script> > > >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tt >index 1398673..a2db46f 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tt >@@ -11,6 +11,7 @@ > <script type="text/javascript" src="[% themelang %]/lib/jquery/jquery-ui.js"></script> > <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script> > <script type="text/javascript">//<![CDATA[ >+function _(s) { return s; } // dummy function for gettext > function sco_init(valid_session) { > if (valid_session == 1) { > setTimeout("location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';",[% SelfCheckTimeout %]); >@@ -30,13 +31,13 @@ function checkout_confirm(patronid) { > var barcode = $("#barcode").val(); > // alert("checkout_confirm('" + patronid + "') called for barcode '" + barcode + "'"); > if (! barcode) { dofocus(); return false; } // no barcode >- if (barcode == "__KOHA_NEW_CIRC__") { // magic barcode >+ if (barcode == "__KOHA_NEW_CIRC__") { // magic barcode > window.location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout'; > return false; > } >- if (this.valid_session == 0) { >+ if (this.valid_session === 0) { > // probably should force logout like above ? --atz 6/09 >- if (confirm('Session has expired. Click \'OK\' to continue processing this item. Click Cancel if you are not ' + patronid)){ >+ if (confirm(_("Session has expired. Click 'OK' to continue processing this item. Click Cancel if you are not ") + patronid)){ > this.op.value='logout'; > this.patronid.value=''; > } >@@ -100,7 +101,7 @@ $(document).ready(function() { > //]]> > $(document).ready(function(){ > $("#logout_form").submit(function(){ >- if(confirm("Would you like to print a receipt?")){ >+ if(confirm(_("Would you like to print a receipt?"))){ > window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber %]&print=qslip"); > } > return true; >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8033
:
10648
|
10649
|
10677
|
10678
|
11112
|
12316
|
13559
|
13716
|
14024
|
14025
|
14026
|
14091
|
14094
|
14095
|
14096
|
14097
|
14098
|
14099
|
14100
|
14101
|
14102
|
14134
|
14496
|
14498
|
17373
|
17374
|
18053
|
18054
|
22301
|
22302
|
37489
|
37490
|
37497
|
37651