From: pines Date: Wed, 31 Jan 2007 07:40:56 +0000 (+0000) Subject: avoid another window.open error X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=0700a0f7923b83a959852eefcc9c891a77b25761;p=Evergreen.git avoid another window.open error git-svn-id: svn://svn.open-ils.org/ILS/trunk@6838 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/chrome/content/util/print.js b/Open-ILS/xul/staff_client/chrome/content/util/print.js index 295f56b452..13388ad209 100644 --- a/Open-ILS/xul/staff_client/chrome/content/util/print.js +++ b/Open-ILS/xul/staff_client/chrome/content/util/print.js @@ -9,6 +9,7 @@ util.print = function () { JSAN.use('OpenILS.data'); this.data = new OpenILS.data(); this.data.init( { 'via':'stash' } ); JSAN.use('util.window'); this.win = new util.window(); JSAN.use('util.functional'); + JSAN.use('util.file'); return this; }; @@ -247,7 +248,7 @@ util.print.prototype = { w.getSelection().selectAllChildren(w.document.firstChild); var text = w.getSelection().toString(); - JSAN.use('util.file'); var file = new util.file('receipt.txt'); + var file = new util.file('receipt.txt'); file.write_content('truncate',text); file.close(); file = new util.file('receipt.bat'); @@ -367,7 +368,7 @@ util.print.prototype = { 'load_settings' : function() { try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - JSAN.use('util.file'); var file = new util.file('gPrintSettings'); + var file = new util.file('gPrintSettings'); if (file._file.exists()) { temp = file.get_object(); file.close(); for (var i in temp) { @@ -393,7 +394,7 @@ util.print.prototype = { 'save_settings' : function() { try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - JSAN.use('util.file'); var file = new util.file('gPrintSettings'); + var file = new util.file('gPrintSettings'); file.set_object(this.gPrintSettings); file.close(); } catch(E) { this.error.standard_unexpected_error_alert("save_settings()",E);