]> source.dussan.org Git - archiva.git/commitdiff
[MRM-1576] rewrite proxies connector page
authorOlivier Lamy <olamy@apache.org>
Fri, 10 Feb 2012 17:25:04 +0000 (17:25 +0000)
committerOlivier Lamy <olamy@apache.org>
Fri, 10 Feb 2012 17:25:04 +0000 (17:25 +0000)
add confirm dialog for proxy connector delete.

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1242866 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties
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/proxy-connectors.js

index 06156c7a5251fc8744b8eddc0a9bc832b95a7e22..cd8b3f94edc0d5d02655213190a363257369187c 100644 (file)
@@ -142,4 +142,5 @@ proxyconnector.updated=ProxyConnector updated.
 proxy-connectors.grid.remoterepo.settings.popover.title=Proxy Connector Settings
 proxy-connectors.remoterepo.settings.networkproxy=Network Proxy
 proxy.connector.bulk.save.confirm=Are you sure to update {0} Proxy Connector(s)
+proxyconnector.delete.confirm=Are you sure to delete the Proxy Connector
 
index ac66d285b225ad38e3a4d390e0e2de13396b87d2..40985831661b28026fcf6ee77babb715c66c457f 100644 (file)
@@ -175,7 +175,8 @@ $(function() {
 
     removeNetworkProxy=function(networkProxy){
       openDialogConfirm(
-          function(){$.ajax("restServices/archivaServices/networkProxyService/deleteNetworkProxy/"+encodeURIComponent(networkProxy.id()),
+          function(){
+            $.ajax("restServices/archivaServices/networkProxyService/deleteNetworkProxy/"+encodeURIComponent(networkProxy.id()),
               {
                 type: "get",
                 success: function(data) {
index 42ff63b800a24b4c728835364fc2ad2e8787deb9..7dcd1f6d9824965fc2a4877b88177e61763c978a 100644 (file)
@@ -311,12 +311,15 @@ $(function() {
       mainContent.find("#proxy-connectors-view-tabs-li-edit a").html($.i18n.prop("edit"));
     }
     deleteProxyConnector=function(proxyConnector){
-      clearUserMessages();
-      removeProxyConnector(proxyConnector,function(){
-        displaySuccessMessage($.i18n.prop('proxyconnector.removed'));
-        self.proxyConnectors.remove(proxyConnector);
-        //self.displayGrid();
-      });
+
+      openDialogConfirm(
+          function(){
+            clearUserMessages();
+            removeProxyConnector(proxyConnector,function(){
+            displaySuccessMessage($.i18n.prop('proxyconnector.removed'));
+            self.proxyConnectors.remove(proxyConnector);
+            closeDialogConfirm();
+          })}, $.i18n.prop('ok'), $.i18n.prop('cancel'), $.i18n.prop('proxyconnector.delete.confirm'),null);
 
 
     }