use data from xpcom stash instead of fetching over the network
authorpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 23 Feb 2007 19:46:35 +0000 (19:46 +0000)
committerpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 23 Feb 2007 19:46:35 +0000 (19:46 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_0@7014 dcc99617-32d9-48b4-a31d-7c20da2025e4

Evergreen/xul/staff_client/server/patron/ue.js

index 86f2cd9..df9307d 100644 (file)
@@ -35,6 +35,9 @@ function uEditInit() {
 /* ------------------------------------------------------------------------------ */
 function uEditFetchIdentTypes() {
        _debug("uEditFetchIdentTypes()");
+       var s = fetchXULStash(); 
+       if (typeof s.list != 'undefined') 
+               if (typeof s.list.cit != 'undefined') return s.list.cit;
        var req = new Request(FETCH_ID_TYPES);
        req.send(true);
        return req.result();
@@ -42,6 +45,9 @@ function uEditFetchIdentTypes() {
 
 function uEditFetchStatCats() {
        _debug("uEditFetchStatCats()");
+       var s = fetchXULStash(); 
+       if (typeof s.list != 'undefined') 
+               if (typeof s.list.my_actsc != 'undefined') return s.list.my_actsc;
        var req = new Request(SC_FETCH_ALL, SESSION);
        req.send(true);
        return req.result();
@@ -49,6 +55,9 @@ function uEditFetchStatCats() {
 
 function uEditFetchSurveys() {
        _debug("uEditFetchSurveys()");
+       var s = fetchXULStash(); 
+       if (typeof s.list != 'undefined') 
+               if (typeof s.list.asv != 'undefined') return s.list.asv;
        var req = new Request(SV_FETCH_ALL, SESSION);
        req.send(true);
        return req.result();
@@ -56,6 +65,9 @@ function uEditFetchSurveys() {
 
 function uEditFetchGroups() {
        _debug("uEditFetchGroups()");
+       var s = fetchXULStash(); 
+       if (typeof s.tree != 'undefined') 
+               if (typeof s.tree.pgt != 'undefined') return s.tree.pgt;
        var req = new Request(FETCH_GROUPS);
        req.send(true);
        return req.result();
@@ -63,6 +75,9 @@ function uEditFetchGroups() {
 
 function uEditFetchNetLevels() {
        _debug("uEditFetchNetLevels()");
+       var s = fetchXULStash(); 
+       if (typeof s.list != 'undefined') 
+               if (typeof s.list.cnal != 'undefined') return s.list.cnal;
        var req = new Request(FETCH_NET_LEVELS, SESSION);
        req.send(true);
        return req.result();