fix from tsbere to handle case where the print strategy is set to custom/external...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 22 Sep 2010 20:01:55 +0000 (20:01 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 22 Sep 2010 20:01:55 +0000 (20:01 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@17896 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/util/print.js

index 87e1618..3f9e884 100644 (file)
@@ -16,6 +16,10 @@ util.print = function (context) {
     var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces['nsIPrefBranch']);
     var key = 'oils.printer.external.cmd.' + this.context;
     var has_key = prefs.prefHasUserValue(key);
+    if(!has_key && this.context != 'default') {
+        key = 'oils.printer.external.cmd.default';
+        has_key = prefs.prefHasUserValue(key);
+    }
     this.oils_printer_external_cmd = has_key ? prefs.getCharPref(key) : '';
 
     return this;