From 6dc2d8e10ceb2e35e2849c1fd1adc85147a0e39a Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Fri, 10 Feb 2012 17:24:24 +0000 Subject: [PATCH] [MRM-1576] rewrite proxies connector page sourceRepoId and targetRepoId not editable on proxyConnector edition. git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1242864 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/webapp/js/archiva/proxy-connectors.js | 7 ++++++- .../webapp/js/archiva/templates/proxy-connectors.html | 10 +++++----- 2 files changed, 11 insertions(+), 6 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 ae0c71d3c..e1aa9fd3d 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 @@ -127,6 +127,10 @@ $(function() { this.update=update; this.modified=ko.observable(false); + isUpdate=function(){ + return self.update; + } + getSelectedPolicyOption=function(id){ $.log("getSelectedPolicyOption:"+id); @@ -270,6 +274,7 @@ $(function() { mainContent.find("#proxy-connectors-edit").html($("#proxy-connector-edit-form-tmpl").tmpl()); ko.applyBindings(proxyConnectorViewModel,mainContent.find("#proxy-connectors-edit").get(0)); activateProxyConnectorsEditTab(); + mainContent.find("#proxy-connectors-view-tabs-li-edit a").html($.i18n.prop("edit")); } deleteProxyConnector=function(proxyConnector){ clearUserMessages(); @@ -364,7 +369,7 @@ $(function() { } if ($(e.target).attr("href")=="#proxy-connectors-view") { $("#proxy-connectors-view-tabs-a-network-proxies-grid").html($.i18n.prop("proxy-connectors.grid.tab.title")); - + mainContent.find("#proxy-connectors-view-tabs-li-edit a").html($.i18n.prop("add")); } }); diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/proxy-connectors.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/proxy-connectors.html index b278748d2..2885b7582 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/proxy-connectors.html +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/proxy-connectors.html @@ -63,7 +63,7 @@ {{each(i, row) itemsOnCurrentPage()}} - + ${row.sourceRepoId()} ${row.targetRepoId()}-${row.order()}
- +
@@ -135,7 +135,7 @@
+ value: proxyConnector.targetRepoId,attr: {disabled: isUpdate() }">
-- 2.39.5