clearing the cache since it started to interfere with the offline cgi scripts. tweak...
authorpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 3 Sep 2006 09:28:07 +0000 (09:28 +0000)
committerpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 3 Sep 2006 09:28:07 +0000 (09:28 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5887 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js
Open-ILS/xul/staff_client/server/admin/offline_manage_xacts.js
Open-ILS/xul/staff_client/server/admin/offline_manage_xacts.xul

index 79bdc6a..ae38052 100644 (file)
                }
        }
 
+       function clear_the_cache() {
+               try {
+                       netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
+                       var cacheClass          = Components.classes["@mozilla.org/network/cache-service;1"];
+                       var cacheService        = cacheClass.getService(Components.interfaces.nsICacheService);
+                       cacheService.evictEntries(Components.interfaces.nsICache.STORE_ON_DISK);
+                       cacheService.evictEntries(Components.interfaces.nsICache.STORE_IN_MEMORY);
+               } catch(E) {
+                       alert('Problem clearing the cache: ' + E);
+               }
+       }
+
index 6fb8ba8..2765bbe 100644 (file)
@@ -349,6 +349,7 @@ admin.offline_manage_xacts.prototype = {
        'execute_ses' : function() {
                var obj = this;
 
+               clear_the_cache();
                obj.data.stash_retrieve();
 
                for (var i = 0; i < obj.sel_list.length; i++) {
@@ -374,6 +375,7 @@ admin.offline_manage_xacts.prototype = {
        'ses_errors' : function() {
                var obj = this;
 
+               clear_the_cache();
                obj.data.stash_retrieve();
 
                var url  = xulG.url_prefix(urls.XUL_OFFLINE_MANAGE_XACTS_CGI)
@@ -491,6 +493,7 @@ admin.offline_manage_xacts.prototype = {
        'ses_status' : function() {
                var obj = this;
 
+               clear_the_cache();
                obj.data.stash_retrieve();
 
                var url  = xulG.url_prefix(urls.XUL_OFFLINE_MANAGE_XACTS_CGI)
@@ -516,6 +519,7 @@ admin.offline_manage_xacts.prototype = {
                var desc = window.prompt('Please enter a description:','','Create an Offline Transaction Session');
                if (desc=='' || desc==null) { return; }
 
+               clear_the_cache();
                obj.data.stash_retrieve();
 
                var url  = xulG.url_prefix(urls.XUL_OFFLINE_MANAGE_XACTS_CGI)
@@ -542,6 +546,7 @@ admin.offline_manage_xacts.prototype = {
 
                try {
 
+                       clear_the_cache();
                        obj.data.stash_retrieve();
 
                        var url = xulG.url_prefix(urls.XUL_OFFLINE_MANAGE_XACTS_CGI) 
index 46f6aef..b7bcb3b 100644 (file)
@@ -96,7 +96,7 @@
                                </vbox>
                        </groupbox>
                        <groupbox flex="1">
-                               <caption id="errors_caption" label="Processing Status goes here"/>
+                               <caption id="errors_caption" label="The session is now processing.  Hit Refresh to check its status."/>
                        </groupbox>
                </deck>
                <hbox id="iframe_placeholder" hidden="false" flex="0"/>