From da87e72c5f91c9f82b458f75cd9fd426f9c3c275 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Wed, 18 Dec 2013 05:50:06 +0000 Subject: [PATCH] fix tab activation git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1551856 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/webapp/js/redback/roles.js | 35 ++++++++++--------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/redback/roles.js b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/redback/roles.js index 5b6d7cb4c..7decb04ae 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/redback/roles.js +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/redback/roles.js @@ -146,9 +146,6 @@ function(jquery,utils,i18n,jqueryValidate,ko,koSimpleGrid) { var viewModel = new RoleViewModel(role); ko.applyBindings(viewModel,mainContent.find("#roles-view-tabs-content #role-edit").get(0)); activateRoleEditTab(); - mainContent.find("#role-view-users").tabs("show"); - mainContent.find("#role-edit-users-tabs-content #role-view-users").addClass("active"); - mainContent.find("#role-edit").collapse("show"); } } ); @@ -313,34 +310,38 @@ function(jquery,utils,i18n,jqueryValidate,ko,koSimpleGrid) { } activateRolesGridTab=function(){ - $("#main-content").find("#roles-view-tabs").find("li").removeClass("active"); - $("#main-content").find("#roles-view-tabs-content").find("div").removeClass("active"); + var mainContent = $("#main-content"); + mainContent.find("#roles-view-tabs").find("li").removeClass("active"); + mainContent.find("#roles-view-tabs-content").find("div").removeClass("active"); // activate roles grid tab - $("#main-content").find("#roles-view-tabs-content").find("#roles-view").addClass("active"); - $("#main-content").find("#roles-view-tabs-li-roles-grid").addClass("active"); + mainContent.find("#roles-view-tabs-content").find("#roles-view").addClass("active"); + mainContent.find("#roles-view-tabs-li-roles-grid").addClass("active"); } activateRoleEditTab=function(){ - $("#main-content").find("#roles-view-tabs").find("li").removeClass("active"); - $("#main-content").find("#roles-view-tabs-content").find("div").removeClass("active"); + var mainContent = $("#main-content"); + mainContent.find("#roles-view-tabs").find("li").removeClass("active"); + mainContent.find("#roles-view-tabs-content").find("div").removeClass("active"); // activate role edit tab - $("#main-content").find("#roles-view-tabs-content").find("#role-edit").addClass("active"); + mainContent.find("#roles-view-tabs-content").find("#role-edit").addClass("active"); $("#roles-view-tabs-li-roles-edit").addClass("active"); } activateRoleUsersListTab=function(){ - $("#main-content").find("#role-edit-users-li").removeClass("active"); - $("#main-content").find("#role-edit-users").removeClass("active"); + var mainContent = $("#main-content"); + mainContent.find("#role-edit-users-li").removeClass("active"); + mainContent.find("#role-edit-users").removeClass("active"); // activate roles grid tab - $("#main-content").find("#role-view-users-li").addClass("active"); - $("#main-content").find("#role-view-users").addClass("active"); + mainContent.find("#role-view-users-li").addClass("active"); + mainContent.find("#role-view-users").addClass("active"); } activateRoleUsersEditTab=function(){ - $("#main-content").find("#role-view-users-li").removeClass("active"); - $("#main-content").find("#role-view-users").removeClass("active"); + var mainContent = $("#main-content"); + mainContent.find("#role-view-users-li").removeClass("active"); + mainContent.find("#role-view-users").removeClass("active"); // activate role edit tab - $("#main-content").find("#role-edit-users").addClass("active"); + mainContent.find("#role-edit-users").addClass("active"); $("#role-edit-users-li").addClass("active"); } -- 2.39.5