From: phasefx Date: Mon, 24 Jan 2011 21:05:00 +0000 (+0000) Subject: make the Printer Settings Editor immune to the print.always_print_silent preference X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c56dd04cfa881924f27e883480231be483fdaf37;p=evergreen%2Fbjwebb.git make the Printer Settings Editor immune to the print.always_print_silent preference git-svn-id: svn://svn.open-ils.org/ILS/trunk@19268 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/server/admin/printer_settings.js b/Open-ILS/xul/staff_client/server/admin/printer_settings.js index eb0b57259..f9d9ed4f1 100644 --- a/Open-ILS/xul/staff_client/server/admin/printer_settings.js +++ b/Open-ILS/xul/staff_client/server/admin/printer_settings.js @@ -39,9 +39,15 @@ g.page_settings = function() { g.printer_settings = function() { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); + var print_silent_pref = false; + if (g.prefs.prefHasUserValue('print.always_print_silent')) { + print_silent_pref = g.prefs.getBoolPref('print.always_print_silent'); + } + g.prefs.setBoolPref('print.always_print_silent', false); var w = get_contentWindow(document.getElementById('sample')); g.print.NSPrint(w ? w : window, false, {}); g.print.save_settings(); + g.prefs.setBoolPref('print.always_print_silent', print_silent_pref); } g.set_print_strategy = function(which) {