load print strategy from disk at startup
authorpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 22 Feb 2007 21:35:42 +0000 (21:35 +0000)
committerpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 22 Feb 2007 21:35:42 +0000 (21:35 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_0@7002 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js

index 7f7bdf9..59e5404 100644 (file)
@@ -290,6 +290,21 @@ OpenILS.data.prototype = {
                }
                file.close();
 
+               JSAN.use('util.file'); var file = new util.file('print_strategy');
+               if (file._file.exists()) {
+                       try {
+                               var x = file.get_content();
+                               if (x) {
+                                       obj.print_strategy = x;
+                                       obj.stash('print_strategy');
+                                       obj.data_progress('Print strategy retrieved from file. ');
+                               }
+                       } catch(E) {
+                               alert(E);
+                       }
+               }
+               file.close();
+
                JSAN.use('util.functional');
                JSAN.use('util.fm_utils');