From acf3a0bb3fb38d5fcaf5addc415bdb9fd33dae63 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Fri, 7 Dec 2012 09:27:20 +0000 Subject: [PATCH] add new javascript bean properties git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1418231 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/webapp/js/archiva/general-admin.js | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/general-admin.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/general-admin.js index ba6de649b..a5c909c65 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/general-admin.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/general-admin.js @@ -1151,9 +1151,16 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout" } - ArchivaRuntimeConfiguration=function(userManagerImpl,archivaLdapConfiguration){ + ArchivaRuntimeConfiguration=function(userManagerImpl,archivaLdapConfiguration,migratedFromRedbackConfiguration,configurationProperties){ this.userManagerImpl=ko.observable(userManagerImpl); this.archivaLdapConfiguration=ko.observable(archivaLdapConfiguration); + this.migratedFromRedbackConfiguration=ko.observable(migratedFromRedbackConfiguration); + this.configurationProperties=ko.observableArray(configurationProperties?configurationProperties:[]); + } + + mapArchivaRuntimeConfiguration=function(data){ + return new ArchivaRuntimeConfiguration(data.userManagerImpl,mapArchivaLdapConfiguration(data.archivaLdapConfiguration,data.migratedFromRedbackConfiguration, + data.configurationProperties)); } ArchivaLdapConfiguration=function(hostName,port,ssl,baseDn,contextFactory,bindDn,password,authenticationMethod, @@ -1186,6 +1193,14 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout" this.extraProperties=ko.observableArray(extraProperties); } + mapArchivaLdapConfiguration=function(data){ + if(data){ + return new ArchivaLdapConfiguration(data.hostName,data.port,data.ssl,data.baseDn,data.contextFactory,data.bindDn,data.password, + data.authenticationMethod,data.extraProperties); + } + return null; + } + ArchivaRuntimeConfigurationViewModel=function(archivaRuntimeConfiguration,userManagerImplementationInformations){ this.archivaRuntimeConfiguration=ko.observable(archivaRuntimeConfiguration); this.userManagerImplementationInformations=ko.observable(userManagerImplementationInformations); @@ -1268,8 +1283,6 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout" } - mapArchivaRuntimeConfiguration=function(data){ - return new ArchivaRuntimeConfiguration(data.userManagerImpl); - } + }); \ No newline at end of file