Bugzilla – Attachment 9290 Details for
Bug 7563
Silent print slips using Firefox PlugIn jsPrintSetup and new staff client preference
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Bug 7563 [ENH] - Silent print slips using Firefox PlugIn jsPrintSetup and new staff client preference
Bug-7563-ENH---Silent-print-slips-using-Firefox-Pl.patch (text/plain), 5.22 KB, created by
Marc Véron
on 2012-04-24 20:29:13 UTC
(
hide
)
Description:
Bug 7563 [ENH] - Silent print slips using Firefox PlugIn jsPrintSetup and new staff client preference
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2012-04-24 20:29:13 UTC
Size:
5.22 KB
patch
obsolete
>From b81ce08ee942e6902e71b723963720924cee71e7 Mon Sep 17 00:00:00 2001 >From: Marc Veron <veron@veron.ch> >Date: Tue, 24 Apr 2012 22:21:01 +0200 >Subject: [PATCH] Bug 7563 [ENH] - Silent print slips using Firefox PlugIn jsPrintSetup and new staff client preference >Content-Type: text/plain; charset="utf-8" > >Marc Veron <veron@veron.ch> > > modified: mysql/sysprefs.sql > modified: mysql/updatedatabase.pl > modified: ../../koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt > modified: ../../koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt > modified: ../../members/printslip.pl >--- > installer/data/mysql/sysprefs.sql | 1 + > installer/data/mysql/updatedatabase.pl | 8 ++++++++ > .../prog/en/modules/members/moremember-print.tt | 4 ++++ > .../prog/en/modules/members/moremember-receipt.tt | 5 ++++- > members/printslip.pl | 1 + > 5 files changed, 18 insertions(+), 1 deletions(-) > >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 49debd2..bfa2cfd 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -362,3 +362,4 @@ INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES(' > INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('AutoResumeSuspendedHolds', '1', NULL , 'Allow suspended holds to be automatically resumed by a set date.', 'YesNo'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacStarRatings','all',NULL,'disable|all|details','Choice'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacBrowseResults','1','Disable/enable browsing and paging search results from the OPAC detail page.',NULL,'YesNo'); >+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('intranetslipprinterjs','','Use this JavaScript for printing slips. Define at least function printThenClose(). For use e.g. with Firefox PlugIn jsPrintSetup, see http://jsprintsetup.mozdev.org/','','Free'); >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 84f0437..90f2274 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -5212,6 +5212,14 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { > SetVersion($DBversion); > } > >+ >+$DBversion ="XXX"; >+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { >+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('intranetslipprinterjs','','Use this JavaScript for printing slips. Define at least function printThenClose(). For use e.g. with Firefox PlugIn jsPrintSetup, see http://jsprintsetup.mozdev.org/','','Free')"); >+ print "Upgrade to $DBversion done (Add system preference intranetslipprinterjs))\n"; >+ SetVersion($DBversion); >+} >+ > =head1 FUNCTIONS > > =head2 TableExists($table) >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt >index d3e5b49..55fa79b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt >@@ -4,10 +4,14 @@ > <link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon %][% ELSE %][% themelang %]/includes/favicon.ico[% END %]" type="image/x-icon" /> > <link rel="stylesheet" type="text/css" href="[% themelang %]/css/print.css" /> > <script language="javascript"> >+[% IF ( intranetslipprinterjs ) %] >+ [% intranetslipprinterjs %] >+[% ELSE %] > function printThenClose() { > window.print(); > window.close(); > } >+[% END %] > </script> > <body id="pat_moremember-print" class="pat" onload="printThenClose();"> > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt >index 512f6d9..da61fb4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt >@@ -3,12 +3,15 @@ > <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> > <link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon %][% ELSE %][% themelang %]/includes/favicon.ico[% END %]" type="image/x-icon" /> > <link rel="stylesheet" type="text/css" href="[% themelang %]/css/print.css" /> >- > <script language="javascript"> >+[% IF ( intranetslipprinterjs ) %] >+ [% intranetslipprinterjs %] >+[% ELSE %] > function printThenClose() { > window.print(); > window.close(); > } >+[% END %] > </script> > </head> > <body id="pat_moremember-receipt" class="pat" onload="printThenClose();"> >diff --git a/members/printslip.pl b/members/printslip.pl >index 3a499cd..6941495 100755 >--- a/members/printslip.pl >+++ b/members/printslip.pl >@@ -86,6 +86,7 @@ $template->param( > plain => !$is_html, > title => "Print Receipt for $borrowernumber", > stylesheet => C4::Context->preference("SlipCSS"), >+ intranetslipprinterjs => C4::Context->preference('intranetslipprinterjs'), > error => $error, > ); > >-- >1.7.2.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 Raw
Actions:
View
Attachments on
bug 7563
:
9290
|
9306
|
9307
|
9981
|
10063
|
10068
|
10071
|
10073
|
10104
|
10427
|
10428
|
10557
|
10570
|
11149