fix javascript bean mapping

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1418232 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-12-07 09:27:59 +00:00
parent acf3a0bb3f
commit 4c77e91a19
1 changed files with 17 additions and 3 deletions

View File

@ -1159,8 +1159,16 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
}
mapArchivaRuntimeConfiguration=function(data){
return new ArchivaRuntimeConfiguration(data.userManagerImpl,mapArchivaLdapConfiguration(data.archivaLdapConfiguration,data.migratedFromRedbackConfiguration,
data.configurationProperties));
var configurationProperties = data.configurationProperties == null ? []: $.each(data.configurationProperties,function(item){
return new Entry(item.key, item.value);
});
if (!$.isArray(configurationProperties)){
configurationProperties=[];
}
return new ArchivaRuntimeConfiguration(data.userManagerImpl,mapArchivaLdapConfiguration(data.archivaLdapConfiguration),data.migratedFromRedbackConfiguration,
configurationProperties);
}
ArchivaLdapConfiguration=function(hostName,port,ssl,baseDn,contextFactory,bindDn,password,authenticationMethod,
@ -1195,8 +1203,14 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
mapArchivaLdapConfiguration=function(data){
if(data){
var extraProperties = data.extraProperties == null ? []: $.each(data.extraProperties,function(item){
return new Entry(item.key, item.value);
});
if (!$.isArray(extraProperties)){
extraProperties=[];
}
return new ArchivaLdapConfiguration(data.hostName,data.port,data.ssl,data.baseDn,data.contextFactory,data.bindDn,data.password,
data.authenticationMethod,data.extraProperties);
data.authenticationMethod,extraProperties);
}
return null;
}