]> source.dussan.org Git - archiva.git/commitdiff
[MRM-1578] delete network proxy implemented
authorOlivier Lamy <olamy@apache.org>
Thu, 26 Jan 2012 22:58:15 +0000 (22:58 +0000)
committerOlivier Lamy <olamy@apache.org>
Thu, 26 Jan 2012 22:58:15 +0000 (22:58 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1236439 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 77b9a7c4094f5dc9b849cac79828f88034bb4771..b717fe9cd5e4210c8d581fae411586856b649266 100644 (file)
@@ -116,7 +116,25 @@ $(function() {
     }
 
     removeNetworkProxy=function(networkProxy){
-
+      openDialogConfirm(
+          function(){$.ajax("restServices/archivaServices/networkProxyService/deleteNetworkProxy/"+encodeURIComponent(networkProxy.id()),
+              {
+                type: "get",
+                success: function(data) {
+                  self.networkProxies.remove(networkProxy);
+                  clearUserMessages();
+                  displaySuccessMessage($.i18n.prop('networkproxy.deleted'));
+                  activateNetworkProxiesGridTab();
+                },
+                error: function(data) {
+                  var res = $.parseJSON(data.responseText);
+                  displayRestError(res);
+                },
+                complete: function(){
+                  closeDialogConfirm();
+                }
+              }
+            )}, $.i18n.prop('ok'), $.i18n.prop('cancel'), $.i18n.prop('networkproxy.delete.confirm',networkProxy.id()),null);
     }
   }
 
index 50cf35e43334013ffb5f85975450d8e020c34f00..f66e64d7354081355956be64523786fd89f38721 100644 (file)
@@ -47,7 +47,9 @@
             <a href="#" data-bind="click: function(){ editNetworkProxy(row) }">${$.i18n.prop('edit')}</a>
         </td>
         <td>
-            <a href="#" data-bind="click: function(){ removeNetworkProxy(row) }">${$.i18n.prop('delete')}</a>
+            <a href="#" data-bind="click: function(){ removeNetworkProxy(row) }">
+              <img src="images/edit-cut.png" title="${$.i18n.prop('delete')}"/>
+            </a>
         </td>
     </tr>
     {{/each}}