Bug 7563 - Silent print slips using Firefox PlugIn jsPrintSetup and new staff client preference
...to version 3.09.00.021 Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This commit is contained in:
parent
665136f8a0
commit
86299b5386
5 changed files with 23 additions and 5 deletions
|
@ -374,4 +374,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('
|
|||
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('OPACShowUnusedAuthorities','1','','Show authorities that are not being used in the OPAC.','YesNo');
|
||||
INSERT INTO systempreferences (variable,value,explanation,type) VALUES('EnableBorrowerFiles','0','If enabled, allows librarians to upload and attach arbitrary files to a borrower record.','YesNo');
|
||||
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('UpdateTotalIssuesOnCirc','0','Whether to update the totalissues field in the biblio on each circ.',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');
|
||||
|
|
|
@ -5466,6 +5466,13 @@ 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)
|
||||
|
|
|
@ -15,6 +15,11 @@ Staff Client:
|
|||
- pref: intranetstylesheet
|
||||
class: url
|
||||
- on all pages in the staff interface, instead of the default. (This should be a complete URL, starting with <code>http://</code>.)
|
||||
-
|
||||
- "Use the following JavaScript for printing slips. Define at least function printThenClose(). For use e.g. with Firefox PlugIn jsPrintSetup, see http://jsprintsetup.mozdev.org/:"
|
||||
- pref: IntranetSlipPrinterJS
|
||||
type: textarea
|
||||
class: code
|
||||
-
|
||||
- "Include the following CSS on all pages in the staff client:"
|
||||
- pref: IntranetUserCSS
|
||||
|
|
|
@ -8,10 +8,14 @@
|
|||
[% END %]
|
||||
|
||||
<script language="javascript">
|
||||
function printThenClose() {
|
||||
window.print();
|
||||
window.close();
|
||||
}
|
||||
[% IF ( IntranetSlipPrinterJS ) %]
|
||||
[% IntranetSlipPrinterJS %]
|
||||
[% ELSE %]
|
||||
function printThenClose() {
|
||||
window.print();
|
||||
window.close();
|
||||
}
|
||||
[% END %]
|
||||
</script>
|
||||
</head>
|
||||
<body id="circ_printslip" class="circ" onload="printThenClose();">
|
||||
|
|
|
@ -89,4 +89,6 @@ $template->param(
|
|||
error => $error,
|
||||
);
|
||||
|
||||
$template->param( IntranetSlipPrinterJS => C4::Context->preference('IntranetSlipPrinterJS' ) );
|
||||
|
||||
output_html_with_http_headers $input, $cookie, $template->output;
|
||||
|
|
Loading…
Reference in a new issue