]> source.dussan.org Git - archiva.git/commitdiff
do not hide tab after users changes in roles
authorOlivier Lamy <olamy@apache.org>
Tue, 3 Apr 2012 12:19:38 +0000 (12:19 +0000)
committerOlivier Lamy <olamy@apache.org>
Tue, 3 Apr 2012 12:19:38 +0000 (12:19 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1308843 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/roles.js

index 6ea9234d32eb5a037ed29f6683197b5b188ae2d3..aeadf2c10aa5dbb5a19db43937d40fdfba7a2f16 100644 (file)
@@ -165,12 +165,8 @@ define("redback.roles",["jquery","order!utils","i18n","jquery.validate","order!k
     }
 
     updateModifiedRoles=function(){
-
-
       var modifiedRoles = getModifiedRoles();
       $.log("modifiedRoles:"+modifiedRoles);
-
-
       openDialogConfirm(function(){
                           for(i=0;i<modifiedRoles.length;i++){
                             var modifiedRole=modifiedRoles[i];
@@ -225,7 +221,6 @@ define("redback.roles",["jquery","order!utils","i18n","jquery.validate","order!k
           mainContent.find("#roles-view-tabs #roles-view-tabs-a-roles-grid").tab("show");
           activateRolesGridTab();
           removeMediumSpinnerImg();
-
         }
       }
     );
@@ -244,24 +239,28 @@ define("redback.roles",["jquery","order!utils","i18n","jquery.validate","order!k
       for (var i = 0; i < removed.length; i++) {
         $.log("add user:"+removed[i].username());
         currentRole.users.push(removed[i]);
-        //role.modified(true);
         role.usersModified(true);
       }
       selectedOtherUsers([]);
+      $("#role-collapse" ).removeClass("in");
+      $("#role-users-collapse" ).addClass("in");
       activateRoleUsersEditTab();
     }
 
     removeUser=function(){
+      $.log("removeUser");
       var added = currentRole.users.removeAll(selectedUsers());
       for (var i = 0; i < added.length; i++) {
         currentRole.otherUsers.push(added[i]);
         currentRole.removedUsers.push(added[i]);
-        //role.modified(true);
         role.usersModified(true);
       }
       selectedUsers([]);
-      activateRoleUsersEditTab()
+      $("#role-collapse" ).removeClass("in");
+      $("#role-users-collapse" ).addClass("in");
+      activateRoleUsersEditTab();
     }
+
     saveRoleDescription=function(){
       currentRole.updateDescription();
     }