Bugzilla – Attachment 62187 Details for
Bug 18405
Self checkout: Fix broken silent printing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18405: Self checkout: Fix broken silent printing
Bug-18405-Self-checkout-Fix-broken-silent-printing.patch (text/plain), 2.76 KB, created by
Alex Buckley
on 2017-04-15 01:58:43 UTC
(
hide
)
Description:
Bug 18405: Self checkout: Fix broken silent printing
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2017-04-15 01:58:43 UTC
Size:
2.76 KB
patch
obsolete
>From dc5d60e0ac4d0dc38e378f7d2ad4e61d74e4ccae Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Sun, 9 Apr 2017 16:58:21 +0200 >Subject: [PATCH] Bug 18405: Self checkout: Fix broken silent printing > >Fix broken 'silent printing' (without printer dialog) in self checkout. > >To reproduce: >Set up silent printing to slip printers as described in: >https://wiki.koha-community.org/wiki/Setting_up_slip_printer_to_print_silently > >Verify that it works for check-outs in staff client. >Verify that it does not work in Self checkout. > >To test: >Apply patch >Verify that silent printing works on SCO > >Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> >--- > koha-tmpl/opac-tmpl/bootstrap/en/includes/slip-print.inc | 10 ++++++++++ > .../opac-tmpl/bootstrap/en/modules/sco/printslip.tt | 16 +++++++++------- > 2 files changed, 19 insertions(+), 7 deletions(-) > create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/includes/slip-print.inc > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/slip-print.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/slip-print.inc >new file mode 100644 >index 0000000..689375b >--- /dev/null >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/slip-print.inc >@@ -0,0 +1,10 @@ >+<script type="text/javascript"> >+[% IF ( Koha.Preference('IntranetSlipPrinterJS') ) %] >+ [% Koha.Preference('IntranetSlipPrinterJS') %] >+[% ELSE %] >+ $( window ).load(function() { >+ window.print(); >+ setTimeout('window.close()', 1); >+ }); >+[% END %] >+</script> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/printslip.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/printslip.tt >index f9a6582..025bf53 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/printslip.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/printslip.tt >@@ -1,3 +1,4 @@ >+[% USE Koha %] > [% INCLUDE 'doc-head-open.inc' %] > <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha [% END %] › Self checkout › Print Receipt for [% borrowernumber %]</title> > <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> >@@ -6,15 +7,16 @@ > [% IF stylesheet %] > <link rel="stylesheet" type="text/css" href="[% stylesheet %]" /> > [% END %] >-<script type="text/javascript"> >- function printThenClose() { >- window.print(); >- setTimeout('window.close()', 1); >- } >-</script> >+ >+<!-- JavaScript includes --> >+<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/jquery.js"></script> >+<script type="text/javascript" src="[% interface %]/[% theme %]/js/global.js"></script> >+ >+[% INCLUDE 'slip-print.inc' %] >+ > </head> > >-<body id="circ_printslip" class="circ" onload="printThenClose();"> >+<body id="circ_printslip" class="circ"> > <div id="receipt"> > [% IF plain %] > <pre> >-- >2.1.4
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 18405
:
61989
|
62187
|
62944