]> source.dussan.org Git - archiva.git/commitdiff
network proxy edition: activate button only if something has changed
authorOlivier Lamy <olamy@apache.org>
Thu, 9 Feb 2012 00:10:31 +0000 (00:10 +0000)
committerOlivier Lamy <olamy@apache.org>
Thu, 9 Feb 2012 00:10:31 +0000 (00:10 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1242188 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/network-proxies.js
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/network-proxies.html

index f8b78d1c9fdc82cd21f0aba37574a6f9f7f960fa..ac66d285b225ad38e3a4d390e0e2de13396b87d2 100644 (file)
@@ -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(){
index d0f9a2e788ebb97fc391a7ec96c3b80afdaba1ff..3e8867e39563e57d6f5affd0ed7433e18a40c16a 100644 (file)
           </div>
 
       </fieldset>
-      <button data-bind="click: save" class="btn">${$.i18n.prop('save')}</button>
+      <button id="network-proxy-btn-save" data-bind="click: save" class="btn">${$.i18n.prop('save')}</button>
+      {{if networkProxy.modified()}}
+       ${("#network-proxy-btn-save").button('reset')}
+      {{/if}}
       <button data-bind="click: displayGrid" class="btn">${$.i18n.prop('cancel')}</button>
     </form>
 </script>