From 75f8c7b32ad86ede3126ff3492bb6455cc8a9eda Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Mon, 29 Apr 2013 12:21:40 +0000 Subject: [PATCH] fix message display when updating ldap git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1476988 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/webapp/js/archiva/general-admin.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/general-admin.js b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/general-admin.js index 9e07b3dd4..184cbb263 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/general-admin.js +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/general-admin.js @@ -1641,14 +1641,16 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout" //save modified ldap group mappings if any if(self.modifiesLdapGroupMappings().length>0){ $.log("save modifiesLdapGroupMappings"); + var message=$.i18n.prop('redback-runtime-ldap-group-mapping.updated'); + var userMessages=$("#user-messages"); $.each(self.modifiesLdapGroupMappings(),function(idx,item){ if(!(item.automatic&item.roleNames().length<2)){ + + userMessages.empty(); $.log("update mapping for group:"+item.group()); var mainContent=$("#main-content"); var saveButton = mainContent.find("#redback-runtime-configuration-save" ); saveButton.button('loading'); - clearUserMessages(); - var userMessages=$("#user-messages"); userMessages.html(mediumSpinnerImg()); $.ajax("restServices/redbackServices/ldapGroupMappingService", { @@ -1657,8 +1659,7 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout" data:ko.toJSON(item), dataType: 'json', success: function(data) { - var message=$.i18n.prop('redback-runtime-ldap-group-mapping.updated'); - displaySuccessMessage(message); + userMessages.html($.tmpl($("#alert-message-success").html(), { "message" : message })); }, error: function(data) { var res = $.parseJSON(data.responseText); -- 2.39.5