From c8ac02d78e89fa9f30b16876a73c57396a7d11fd Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Thu, 5 Jan 2012 22:23:03 +0000 Subject: [PATCH] use a pills/tabs mode to switch from users list to update mode git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1227874 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/webapp/js/redback/roles.js | 6 +- .../js/redback/templates/roles-tmpl.html | 72 +++++++++++-------- 2 files changed, 46 insertions(+), 32 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 da7922d59..54eed7d79 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 @@ -113,7 +113,7 @@ $(function() { this.editRole=function(role){ $("#main-content #roles-view-tabs-content #role-edit").html(mediumSpinnerImg()); // load missing attributes - $.ajax("restServices/redbackServices/roleManagementService/getRole/"+role.name(), + $.ajax("restServices/redbackServices/roleManagementService/getRole/"+encodeURIComponent(role.name()), { type: "GET", dataType: 'json', @@ -127,6 +127,8 @@ $(function() { var viewModel = new RoleViewModel(role); ko.applyBindings(viewModel,$("#main-content #roles-view-tabs-content #role-edit").get(0)); activateRoleEditTab(); + $("#role-edit-users-tabs").tabs(); + $("#role-edit-users-tabs-content #role-view-users").addClass("active"); } } ); @@ -143,7 +145,7 @@ $(function() { window.redbackModel.rolesViewModel.loadRoles(); $("#main-content").html($("#rolesTabs").tmpl()); ko.applyBindings(window.redbackModel.rolesViewModel,jQuery("#main-content").get(0)); - $("#roles-view-tabs").tabs(); + $("#roles-view-tabs").pills(); activateRolesGridTab(); removeMediumSpinnerImg(); } 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 63dfdc29f..7f1ed50c3 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 @@ -116,38 +116,50 @@ {{/if}} - -
- {{if $data.users}} -