[MRM-1721] Chaining user manager implementations.

fix json update.

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1419571 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-12-10 16:36:47 +00:00
parent 8534cdcb6a
commit 166d6359ed
1 changed files with 10 additions and 1 deletions

View File

@ -1270,6 +1270,15 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
var userMessages=$("#user-messages"); var userMessages=$("#user-messages");
userMessages.html(mediumSpinnerImg()); userMessages.html(mediumSpinnerImg());
$("#repository-group-save" ).button('loading'); $("#repository-group-save" ).button('loading');
self.archivaRuntimeConfiguration().userManagerImpls=ko.observableArray([]);
$.log("length:"+self.usedUserManagerImpls().length);
for(var i=0;i<self.usedUserManagerImpls().length;i++){
var beanId=self.usedUserManagerImpls()[i].beanId;
$.log("beanId:"+beanId);
self.archivaRuntimeConfiguration().userManagerImpls.push(beanId);
}
$.log("length:"+self.archivaRuntimeConfiguration().userManagerImpls().length);
$.log("json:"+ko.toJSON(self.archivaRuntimeConfiguration));
$.ajax("restServices/archivaServices/archivaRuntimeConfigurationService/archivaRuntimeConfiguration", $.ajax("restServices/archivaServices/archivaRuntimeConfigurationService/archivaRuntimeConfiguration",
{ {
type: "PUT", type: "PUT",
@ -1277,7 +1286,7 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
data:ko.toJSON(self.archivaRuntimeConfiguration), data:ko.toJSON(self.archivaRuntimeConfiguration),
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
var message=$.i18n.prop('archiva-runtime-configuration.updated',self.archivaRuntimeConfiguration().userManagerImpl()); var message=$.i18n.prop('archiva-runtime-configuration.updated');//,self.archivaRuntimeConfiguration().userManagerImpl());
displaySuccessMessage(message); displaySuccessMessage(message);
}, },
error: function(data) { error: function(data) {