use new bean mapping in js

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1447169 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2013-02-18 09:30:13 +00:00
parent e807e6d869
commit f127c7f705
1 changed files with 6 additions and 6 deletions

View File

@ -1622,24 +1622,24 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
};
}
UserManagerImplementationInformation=function(beanId,descriptionKey,readOnly){
ManagerImplementationInformation=function(beanId,descriptionKey,readOnly){
this.beanId=beanId;
this.descriptionKey=descriptionKey;
this.description= $.i18n.prop(descriptionKey);
this.readOnly=readOnly;
}
mapUserManagerImplementationInformations=function(data){
mapManagerImplementationInformations=function(data){
return $.map(data, function(item) {
return mapUserManagerImplementationInformation(item);
return mapManagerImplementationInformation(item);
});
}
mapUserManagerImplementationInformation=function(data){
mapManagerImplementationInformation=function(data){
if(data==null){
return null;
}
return new UserManagerImplementationInformation(data.beanId,data.descriptionKey,data.readOnly);
return new ManagerImplementationInformation(data.beanId,data.descriptionKey,data.readOnly);
}
activateRedbackRuntimeGeneralFormValidation=function(){
@ -1701,7 +1701,7 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
type: "GET",
dataType: 'json',
success: function(data) {
var userManagerImplementationInformations=mapUserManagerImplementationInformations(data);
var userManagerImplementationInformations=mapManagerImplementationInformations(data);
$.ajax("restServices/archivaServices/redbackRuntimeConfigurationService/redbackRuntimeConfiguration", {
type: "GET",
dataType: 'json',