misc printing
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 15 Nov 2005 18:55:22 +0000 (18:55 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 15 Nov 2005 18:55:22 +0000 (18:55 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@2030 dcc99617-32d9-48b4-a31d-7c20da2025e4

Evergreen/staff_client/chrome/content/evergreen/util/error.js
Evergreen/staff_client/chrome/content/evergreen/util/print.js

index a7cfb4e..c9b3ab1 100644 (file)
@@ -3,7 +3,7 @@ sdump('D_TRACE',"Loading error.js\n");
 var consoleService = Components.classes['@mozilla.org/consoleservice;1']
        .getService(Components.interfaces.nsIConsoleService);
 
-var printDebug = true;
+var printDebug = false;
 var consoleDump = true;
 var debugDump = true;
 var arg_dump_full = false;
@@ -60,7 +60,7 @@ var sdump_levels = {
        'D_FILE' : true,
        'D_EXPLODE' : false,
        'D_FM_UTILS' : false,
-       'D_PRINT' : false,
+       'D_PRINT' : true,
        'D_SES' : true,
        'D_SES_FUNC' : false,
        'D_SES_RESULT' : true,
index 502047e..309b8a7 100644 (file)
@@ -204,6 +204,8 @@ function sPrint(s,silent) {
                function() {
                        if (!mw.printDebug) {
                                NSPrint(w,silent); w.minimize(); w.close(); mw.minimize();
+                       } else {
+                               sdump('D_PRINT','Not printing due to printDebug flag.');
                        }
                },0
        );
@@ -217,6 +219,7 @@ function NSPrint(w,silent)
                var webBrowserPrint = w
                        .QueryInterface(Components.interfaces.nsIInterfaceRequestor)
                        .getInterface(Components.interfaces.nsIWebBrowserPrint);
+               sdump('D_PRINT','webBrowserPrint = ' + webBrowserPrint);
                if (webBrowserPrint) {
                        var gPrintSettings = GetPrintSettings();
                        if (silent) gPrintSettings.printSilent = true;
@@ -233,10 +236,13 @@ function NSPrint(w,silent)
                         gPrintSettings.footerStrLeft = '';
                         gPrintSettings.footerStrCenter = '';
                         gPrintSettings.footerStrRight = '';
+                       sdump('D_PRINT','gPrintSettings = ' + js2JSON(gPrintSettings));
                        webBrowserPrint.print(gPrintSettings, null);
                        //alert('Should be printing\n');
+                       sdump('D_PRINT','Should be printing\n');
                } else {
                        //alert('Should not be printing\n');
+                       sdump('D_PRINT','Should not be printing\n');
                }
        } catch (e) {
                //alert('Probably not printing: ' + e);