From 4a2a5036bdb03aa4c472f0247fca2e83f5333aaa Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Wed, 8 Feb 2012 17:44:06 +0000 Subject: [PATCH] [MRM-1576] rewrite proxies connector page fix selection of defaultOption in add mode as no policies exists. git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1242006 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/webapp/js/archiva/proxy-connectors.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/proxy-connectors.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/proxy-connectors.js index 2c05664f5..2b3f5e401 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/proxy-connectors.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/proxy-connectors.js @@ -101,10 +101,21 @@ $(function() { this.proxyConnectorsViewModel=proxyConnectorsViewModel; this.update=update; getSelectedPolicyOption=function(id){ + if (!update){ + // we are on add mode so use default option + var policyInformations=self.proxyConnectorsViewModel.policyInformations(); + for (i=0;i