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 99a7d6827..69c6792d0 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 @@ -35,7 +35,10 @@ $(function() { var roles = $.map(data.role, function(item) { return mapRole(item); }); - $("#main-content").html($("#rolesGrid").tmpl(data)); + + $("#main-content").html($("#rolesTabs").tmpl()); + $("#main-content #roles-view-tabs-content #roles-view").html($("#rolesGrid").tmpl(data)); + activateRolesGridTab(); } } ); @@ -48,4 +51,20 @@ $(function() { return new role(data.name, data.description); } + activateRolesGridTab=function(){ + $("#main-content #roles-view-tabs li").removeClass("active"); + $("#main-content #roles-view-tabs-content div").removeClass("active"); + // activate roles grid tab + $("#main-content #roles-view-tabs-content #roles-view").addClass("active"); + $("#main-content #roles-view-tabs-li-roles-grid").addClass("active"); + } + + activateRoleEditTab=function(){ + $("#main-content #roles-view-tabs li").removeClass("active"); + $("#main-content #roles-view-tabs-content div").removeClass("active"); + // activate role edit tab + $("#main-content #roles-view-tabs-content #role-edit").addClass("active"); + $("#roles-view-tabs-li-roles-edit").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 2d8989df1..fcd03bacb 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 @@ -1,7 +1,4 @@ + + \ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/user-grids.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/user-grids.html index 704cb068c..a812af8eb 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/user-grids.html +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/user-grids.html @@ -101,7 +101,7 @@