[open-ils-commits] r14079 - in trunk/Open-ILS: src/sql/Pg xul/staff_client/server/circ xul/staff_client/server/patron (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Sep 21 23:11:27 EDT 2009
Author: phasefx
Date: 2009-09-21 23:11:24 -0400 (Mon, 21 Sep 2009)
New Revision: 14079
Modified:
trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
trunk/Open-ILS/xul/staff_client/server/circ/checkout.js
trunk/Open-ILS/xul/staff_client/server/circ/util.js
trunk/Open-ILS/xul/staff_client/server/patron/bills.js
Log:
Org unit setting (not wired into Settings Editor), circ.staff_client.do_not_auto_attempt_print:
Disable automatic print attempts from staff client interfaces for the receipt types in this list. Possible values: "Checkout", "Bill Pay", "Hold Slip", "Transit Slip", and/or "Hold/Transit Slip". This is different from the
Auto-Print checkbox in the pertinent interfaces in that it disables automatic print attempts altogether, rather than encouraging silent printing by suppressing the print dialog. The Auto-Print checkbox in these interfaces have no
effect on the behavior for this setting. In the case of the Hold, Transit, and Hold/Transit slips, this also suppresses the alert dialogs that precede the print dialog (the ones that offer Print and Do Not Print as options).
Modified: trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2009-09-21 20:06:41 UTC (rev 14078)
+++ trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2009-09-22 03:11:24 UTC (rev 14079)
@@ -1812,6 +1812,11 @@
'List of checkout/renewal events that the selfcheck interface should automatically override instead instead of alerting and stopping the transaction',
'array' ),
+( 'circ.staff_client.do_not_auto_attempt_print',
+ 'Disable Automatic Print Attempt Type List',
+ 'Disable automatic print attempts from staff client interfaces for the receipt types in this list. Possible values: "Checkout", "Bill Pay", "Hold Slip", "Transit Slip", and "Hold/Transit Slip". This is different from the Auto-Print checkbox in the pertinent interfaces in that it disables automatic print attempts altogether, rather than encouraging silent printing by suppressing the print dialog. The Auto-Print checkbox in these interfaces have no effect on the behavior for this setting. In the case of the Hold, Transit, and Hold/Transit slips, this also suppresses the alert dialogs that precede the print dialog (the ones that offer Print and Do Not Print as options).',
+ 'array' ),
+
( 'ui.patron.default_inet_access_level',
'Default level of patrons'' internet access',
null,
Modified: trunk/Open-ILS/xul/staff_client/server/circ/checkout.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/checkout.js 2009-09-21 20:06:41 UTC (rev 14078)
+++ trunk/Open-ILS/xul/staff_client/server/circ/checkout.js 2009-09-22 03:11:24 UTC (rev 14079)
@@ -231,6 +231,14 @@
['command'],
function() {
try {
+ var no_print_prompting = obj.data.hash.aous['circ.staff_client.do_not_auto_attempt_print'];
+ if (no_print_prompting) {
+ if (no_print_prompting.indexOf( "Checkout" ) > -1) {
+ obj.list.clear();
+ xulG.set_tab(urls.XUL_PATRON_BARCODE_ENTRY,{},{});
+ return;
+ }
+ }
if (document.getElementById('checkout_auto').checked) {
obj.print(true,function() {
obj.list.clear();
Modified: trunk/Open-ILS/xul/staff_client/server/circ/util.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/util.js 2009-09-21 20:06:41 UTC (rev 14078)
+++ trunk/Open-ILS/xul/staff_client/server/circ/util.js 2009-09-22 03:11:24 UTC (rev 14079)
@@ -2312,6 +2312,12 @@
msg += '\n';
}
var rv = 0;
+ var no_print_prompting = data.hash.aous['circ.staff_client.do_not_auto_attempt_print'];
+ if (no_print_prompting) {
+ if (no_print_prompting.indexOf( "Hold Slip" ) > -1) {
+ rv = -1; auto_print = true; // DO NOT PRINT and skip dialog
+ }
+ }
print_data.slip_date = util.date.formatted_date(new Date(),'%F');
print_data.slip_date_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.payload.hold.slip_date', [print_data.slip_date]);
msg += print_data.slip_date_msg;
@@ -2510,6 +2516,12 @@
msg += '\n';
}
var rv = 0;
+ var no_print_prompting = data.hash.aous['circ.staff_client.do_not_auto_attempt_print'];
+ if (no_print_prompting) {
+ if (no_print_prompting.indexOf( check.payload.hold ? "Hold/Transit Slip" : "Transit Slip" ) > -1) {
+ rv = -1; auto_print = true; // DO NOT PRINT and skip dialog
+ }
+ }
print_data.slip_date = util.date.formatted_date(new Date(),'%F');
print_data.slip_date_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.payload.hold.slip_date', [print_data.slip_date]);
msg += print_data.slip_date_msg;
Modified: trunk/Open-ILS/xul/staff_client/server/patron/bills.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/bills.js 2009-09-21 20:06:41 UTC (rev 14078)
+++ trunk/Open-ILS/xul/staff_client/server/patron/bills.js 2009-09-22 03:11:24 UTC (rev 14079)
@@ -517,6 +517,10 @@
obj.data.voided_billings = []; obj.data.stash('voided_billings');
obj.refresh();
try {
+ var no_print_prompting = obj.data.hash.aous['circ.staff_client.do_not_auto_attempt_print'];
+ if (no_print_prompting) {
+ if (no_print_prompting.indexOf( "Bill Pay" ) > -1) return; // Skip print attempt
+ }
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
obj.data.stash_retrieve();
var template = 'bill_payment';
More information about the open-ils-commits
mailing list