From: Olivier Lamy Date: Sat, 31 Dec 2011 13:55:25 +0000 (+0000) Subject: role description is now updatable X-Git-Tag: archiva-1.4-M3~1667 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=507a6593d3afe734ecc0d734e7b739d331627bf5;p=archiva.git role description is now updatable git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1226091 13f79535-47bb-0310-9956-ffa450edef68 --- 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 10c37d57a..4bdb74a59 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 @@ -64,6 +64,29 @@ $(function() { ); } + saveRoleDescription=function(){ + var roleName = $("#editRoleTable #role-edit-name").html(); + var description = $("#editRoleTable #role-edit-description").val(); + clearUserMessages(); + var url = "restServices/redbackServices/roleManagementService/updateRoleDescription?"; + url += "roleName="+encodeURIComponent(roleName); + url += "&roleDescription="+encodeURIComponent(description); + $.ajax(url, + { + type: "GET", + dataType: 'json', + success: function(data) { + $.log("role description updated"); + displaySuccessMessage($.i18n.prop("role.updated",roleName)); + }, + error: function(data){ + displayErrorMessage("error updating role description"); + } + } + ); + + } + /** * @param data Role response from redback rest api */ 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 4b242335d..6401cd91f 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 @@ -50,11 +50,18 @@ ${$.i18n.prop('name')}: - ${name} + ${name} ${$.i18n.prop('description')}: - ${description} + + + + +
+ +
+