From 230185791c50919df51c0bd391c3dd822e2a61d5 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Fri, 6 Jan 2012 09:14:33 +0000 Subject: [PATCH] add ids for selenium tests and force tab activation as webkit tend to fail git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1228029 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/webapp/js/redback/roles.js | 20 ++++++++++++++++++- .../js/redback/templates/roles-tmpl.html | 4 ++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/roles.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/roles.js index 54eed7d79..bd113eda6 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/roles.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/roles.js @@ -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 diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/roles-tmpl.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/roles-tmpl.html index 7f1ed50c3..b92be860c 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/roles-tmpl.html +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/roles-tmpl.html @@ -117,10 +117,10 @@ {{/if}} -- 2.39.5