From: Olivier Lamy Date: Fri, 6 Jan 2012 15:01:08 +0000 (+0000) Subject: correctly clear user messages X-Git-Tag: archiva-1.4-M3~1631 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=69357199e10f97a9d682270ecc92226c7d8a678e;p=archiva.git correctly clear user messages git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1228216 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 bd113eda6..1c12cc81d 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 @@ -41,10 +41,11 @@ $(function() { type: "GET", dataType: 'json', success: function(data) { - $.log("role description updated"); + clearUserMessages(); displaySuccessMessage($.i18n.prop("role.updated",roleName)); }, error: function(data){ + clearUserMessages(); displayErrorMessage("error updating role description"); } } @@ -60,9 +61,11 @@ $(function() { contentType: 'application/json', data: "{\"role\": " + ko.toJSON(self)+"}", success: function(data) { + clearUserMessages(); displaySuccessMessage($.i18n.prop("role.users.updated",this.name)); }, error: function(data){ + clearUserMessages(); displayErrorMessage("error updating users role"); } }