From 6949209a440bae1d3d6b2bad6267e8e6f39979a3 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Thu, 9 Feb 2012 00:10:31 +0000 Subject: [PATCH] network proxy edition: activate button only if something has changed git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1242188 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/webapp/js/archiva/network-proxies.js | 2 ++ .../main/webapp/js/archiva/templates/network-proxies.html | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) 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 f8b78d1c9..ac66d285b 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 @@ -133,6 +133,8 @@ $(function() { ko.applyBindings(viewModel,mainContent.find("#network-proxies-edit").get(0)); activateNetworkProxyFormValidation(); activateNetworkProxyEditTab(); + mainContent.find("#network-proxy-btn-save").attr("disabled","true"); + mainContent.find("#network-proxy-btn-save").button('toggle'); } this.bulkSave=function(){ diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/network-proxies.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/network-proxies.html index d0f9a2e78..3e8867e39 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/network-proxies.html +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/network-proxies.html @@ -149,7 +149,10 @@ - + + {{if networkProxy.modified()}} + ${("#network-proxy-btn-save").button('reset')} + {{/if}} -- 2.39.5