Bugzilla – Attachment 14496 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), 3.90 KB, created by
Owen Leonard
on 2013-01-09 14:52:19 UTC
(
hide
)
Description:
Bug 8033 [Follow-up] add print receipt option to Koha self-check
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2013-01-09 14:52:19 UTC
Size:
3.90 KB
patch
obsolete
>From 9b3c63f47de7ace0643697bc1d61a71dd84ef643 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 | 5 +++-- > 3 files changed, 9 insertions(+), 4 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 7e363d2..8339b35 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> > > [% IF ( SCOUserCSS ) %]<style type="text/css">[% SCOUserCSS %]</style>[% END %] >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 3f6438f..72c29f6 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() { > setTimeout("location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';",[% SelfCheckTimeout %]); > } >@@ -28,7 +29,7 @@ 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; > } >@@ -90,7 +91,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