[open-ils-commits] r19868 - branches/rel_2_1/Open-ILS/xul/staff_client/server/admin (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Mar 28 12:34:23 EDT 2011
Author: phasefx
Date: 2011-03-28 12:34:20 -0400 (Mon, 28 Mar 2011)
New Revision: 19868
Modified:
branches/rel_2_1/Open-ILS/xul/staff_client/server/admin/printer_settings.js
Log:
clear print.always_print_silent instead of setting it to false in the Printer Settings Editor
Signed-off-by: Jason Etheridge <jason at esilibrary.com>
Modified: branches/rel_2_1/Open-ILS/xul/staff_client/server/admin/printer_settings.js
===================================================================
--- branches/rel_2_1/Open-ILS/xul/staff_client/server/admin/printer_settings.js 2011-03-28 16:31:33 UTC (rev 19867)
+++ branches/rel_2_1/Open-ILS/xul/staff_client/server/admin/printer_settings.js 2011-03-28 16:34:20 UTC (rev 19868)
@@ -36,8 +36,17 @@
g.toggle_silent_print = function() {
var x = document.getElementById('print_silent');
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- g.prefs.setBoolPref('print.always_print_silent', x.checked);
- dump('Setting print.always_print_silent to ' + x.checked + '\n');
+ if (x.checked) {
+ g.prefs.setBoolPref('print.always_print_silent', true);
+ dump('Setting print.always_print_silent to true\n');
+ } else {
+ // Setting print.always_print_silent to false is not the same as clearing it, since a false here will prevent
+ // gPrintSettings.printSilent = true from working when fed to webBrowserPrint
+ if (g.prefs.HasUserValue('print.always_print_silent')) {
+ g.prefs.clearUserPref('print.always_print_silent');
+ }
+ dump('Clearing print.always_print_silent\n');
+ }
}
g.set_printer_context = function(context) {
More information about the open-ils-commits
mailing list