fixed bug in group display
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 17 Aug 2006 21:30:54 +0000 (21:30 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 17 Aug 2006 21:30:54 +0000 (21:30 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5579 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index 32eb175..25e6d94 100644 (file)
@@ -114,8 +114,10 @@ function uEditBuild() {
 function uEditCheckEditPerm() {
 
        var perm = uEditFindGroupPerm(groupsCache[patron.profile()]);   
+       /*
        _debug("editing user with group app perm "+patron.profile()+' : '+
                groupsCache[patron.profile()].name() +', and perm = ' + perm);
+               */
 
        if(PERMS[perm] != -1) return;
 
@@ -251,7 +253,7 @@ function uEditDraw(identTypes, groups, statCats, surveys, netLevels ) {
 
        dataFields = [];
        uEditDrawIDTypes(identTypes);
-       uEditDrawGroups(groups);
+       uEditDrawGroups(groups, null, null, true);
        uEditDrawStatCats(statCats);
        uEditDrawSurveys(surveys);
        uEditDrawNetLevels(netLevels);
index dacdfcf..4d492c9 100644 (file)
@@ -116,7 +116,7 @@ function uEditBuildLibSelector( node, depth, selector ) {
 
 
 /* group tree selector */
-function uEditDrawGroups(tree, depth, selector) {
+function uEditDrawGroups(tree, depth, selector, drawme) {
        if(!selector) {
                selector = $('ue_profile');
                depth = 0;
@@ -127,13 +127,15 @@ function uEditDrawGroups(tree, depth, selector) {
                remove it from the tree and don't add it's children */
        var perm = uEditFindGroupPerm(tree);
        var org = PERMS[perm];
-       if( org == -1 ) return;
+       if( org == -1 ) drawme = false;
 
-       var opt = insertSelectorVal( selector, -1, tree.name(), tree.id(), null, depth++ );     
-       if(!isTrue(tree.usergroup())) opt.disabled = true;
+       if( drawme ) {
+               var opt = insertSelectorVal( selector, -1, tree.name(), tree.id(), null, depth++ );     
+               if(!isTrue(tree.usergroup())) opt.disabled = true;
+       }
 
        for( var c in tree.children() ) 
-               uEditDrawGroups( tree.children()[c], depth, selector );
+               uEditDrawGroups( tree.children()[c], depth, selector, drawme );
 }