retrieving high perm org IDs instead of objects now and taking advantage of existing...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 28 May 2008 02:56:35 +0000 (02:56 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 28 May 2008 02:56:35 +0000 (02:56 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@9715 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/dojo/openils/User.js

index 875c695..4157e87 100644 (file)
@@ -231,14 +231,20 @@ if(!dojo._hasResource["openils.User"]) {
 
             function buildTreePicker(r) {
                 var orgList = r.recv().content();
-                var store = new dojo.data.ItemFileReadStore({data:aou.toStoreData(orgList)});
+                var orgNodeList = [];
+
+                for(var i = 0; i < orgList.length; i++) 
+                    orgNodeList = orgNodeList.concat(
+                        fieldmapper.aou.descendantNodeList(orgList[i]));
+
+                var store = new dojo.data.ItemFileReadStore({data:aou.toStoreData(orgNodeList)});
                 selector.store = store;
                 selector.startup();
                 selector.setValue(_u.user.ws_ou());
             }
     
             fieldmapper.standardRequest(
-                ['open-ils.actor', 'open-ils.actor.user.work_perm.org_unit_list'],
+                ['open-ils.actor', 'open-ils.actor.user.work_perm.highest_org_set'],
                 {   params: [this.authtoken, perm],
                     oncomplete: buildTreePicker,
                     async: true