]> source.dussan.org Git - archiva.git/commitdiff
add ids for selenium tests and force tab activation as webkit tend to fail
authorOlivier Lamy <olamy@apache.org>
Fri, 6 Jan 2012 09:14:33 +0000 (09:14 +0000)
committerOlivier Lamy <olamy@apache.org>
Fri, 6 Jan 2012 09:14:33 +0000 (09:14 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1228029 13f79535-47bb-0310-9956-ffa450edef68

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

index 54eed7d797c767b91e64a422f6f034118143ac1b..bd113eda62a3994d24f377f25540a205aaeb3668 100644 (file)
@@ -163,6 +163,7 @@ $(function() {
         currentRole.users.push(removed[i]);
       }
       selectedOtherUsers([]);
+      activateRoleUsersEditTab();
     }
 
     removeUser=function(){
@@ -172,7 +173,7 @@ $(function() {
         currentRole.removedUsers.push(added[i]);
       }
       selectedUsers([]);
-
+      activateRoleUsersEditTab()
     }
     saveRoleDescription=function(){
       $.log("saveRoleDescription:"+currentRole.description());
@@ -237,4 +238,21 @@ $(function() {
     $("#roles-view-tabs-li-roles-edit").addClass("active");
   }
 
+  activateRoleUsersListTab=function(){
+    $("#main-content #role-edit-users-li").removeClass("active");
+    $("#main-content #role-edit-users").removeClass("active");
+    // activate roles grid tab
+    $("#main-content #role-view-users-li").addClass("active");
+    $("#main-content #role-view-users").addClass("active");
+  }
+
+  activateRoleUsersEditTab=function(){
+    $("#main-content #role-view-users-li").removeClass("active");
+    $("#main-content #role-view-users").removeClass("active");
+    // activate role edit tab
+    $("#main-content #role-edit-users").addClass("active");
+    $("#role-edit-users-li").addClass("active");
+  }
+
+
 });
\ No newline at end of file
index 7f1ed50c3934957b21e5b58a1e3b764fb32c5d08..b92be860cb149831b7584a802e13940d1dd2fdc5 100644 (file)
   {{/if}}
 
   <ul id="role-edit-users-tabs" class="pills">
-    <li class="active">
+    <li class="active" id="role-view-users-li">
       <a href="#role-view-users">${$.i18n.prop('role.edit.users.list')}</a>
     </li>
-    <li>
+    <li id="role-edit-users-li">
       <a href="#role-edit-users">${$.i18n.prop('edit')}</a>
     </li>
   </ul>