From: Olivier Lamy Date: Tue, 31 Jan 2012 10:17:45 +0000 (+0000) Subject: fix i18n when updating network proxy X-Git-Tag: archiva-1.4-M3~1421 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=79af448a38e6631ef94bc7a6e521ba9067962aa2;p=archiva.git fix i18n when updating network proxy git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1238361 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties b/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties index 1405a573e..308dc330f 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties +++ b/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties @@ -57,4 +57,7 @@ remoterepository.downloadremoteindex.now=Download Remote Index Now #proxy connector proxy-connectors.grid.remoterepo.settings.popover.title=Settings -proxy-connectors.remoterepo.settings.networkproxy=Network Proxy \ No newline at end of file +proxy-connectors.remoterepo.settings.networkproxy=Network Proxy + +#network proxy +networkproxy.updated=Network Proxy '{0}' updated. diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/network-proxies.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/network-proxies.js index 32e3f9fca..8f5f8544d 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/network-proxies.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/network-proxies.js @@ -67,7 +67,7 @@ $(function() { data: "{\"networkProxy\": " + ko.toJSON(networkProxy)+"}", dataType: 'json', success: function(data) { - displaySuccessMessage($.i18n.prop('networkproxy.updated')); + displaySuccessMessage($.i18n.prop('networkproxy.updated',self.networkProxy.id())); self.networkProxy.modified(false); activateNetworkProxiesGridTab(); }, @@ -163,9 +163,11 @@ $(function() { var viewModel = new NetworkProxyViewModel(new NetworkProxy(),false,networkProxiesViewModel); ko.applyBindings(viewModel,$("#main-content #network-proxies-edit").get(0)); activateNetworkProxyFormValidation(); + clearUserMessages(); } if ($(e.target).attr("href")=="#network-proxies-view") { $("#main-content #network-proxies-view-tabs-li-edit a").html($.i18n.prop("add")); + clearUserMessages(); } }); @@ -236,6 +238,7 @@ $(function() { $("#main-content #network-proxies-view-tabs-li-grid").addClass("active"); $("#main-content #network-proxies-view").addClass("active"); $("#main-content #network-proxies-view-tabs-li-edit a").html($.i18n.prop("add")); + } activateNetworkProxyEditTab=function(){ @@ -244,7 +247,6 @@ $(function() { $("#main-content #network-proxies-view-tabs-li-edit").addClass("active"); $("#main-content #network-proxies-edit").addClass("active"); - } mapNetworkProxy=function(data){