ah, my favorite.. the timeout
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 24 Jul 2005 19:34:46 +0000 (19:34 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 24 Jul 2005 19:34:46 +0000 (19:34 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1388 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index 58713d5..8e4f3e4 100644 (file)
@@ -15,11 +15,15 @@ function print_checkout_receipt(params) {
 function sPrint(s) {
        sdump('D_PRINT',arg_dump(arguments));
        var w = new_window('data:text/html,<html>' + s + '</html>\r\n', { 'window_name':'LastPrint' });
-       w.minimize(); mw.minimize();
-       this.focus();
-       NSPrint(w);
-       w.minimize(); mw.minimize();
-       //w.close();
+       setTimeout(
+               function() {
+                       w.minimize(); mw.minimize();
+                       this.focus();
+                       NSPrint(w);
+                       w.minimize(); mw.minimize();
+                       w.close();
+               },0
+       );
 }
 
 function NSPrint(w)