]> source.dussan.org Git - archiva.git/commitdiff
cleanup name and open a dialog confirm for managed repositories bulk save
authorOlivier Lamy <olamy@apache.org>
Mon, 6 Feb 2012 09:14:10 +0000 (09:14 +0000)
committerOlivier Lamy <olamy@apache.org>
Mon, 6 Feb 2012 09:14:10 +0000 (09:14 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1240941 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/repositories.js
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/network-proxies.html

index 99a798a7d3a825924930304e74c5e26d814a52b0..2a29838a5cdaeb12d035803587458216b19da080 100644 (file)
@@ -77,6 +77,7 @@ releases=Releases
 stageRepoNeeded=Staging Repository
 cronExpression.notvalid=Cron Expression not valid
 managedrepository.updated=Managed Repository {0} updated.
+managed.repository.bulk.save.confirm=Are you sure to update {0} Managed Repository(ies)
 
 
 # remote repositories screen
index 988e6ebe815fc24e5f0291dfc07ab599f901c78b..6c12f773ddccb594cf4ea07bb471cdfe6ea6af21 100644 (file)
@@ -145,11 +145,9 @@ $(function() {
           });
       return prx;
     }
-    updateModifiedManagedRepositories=function(){
 
-    }
 
-    updateModifiedNetworkProxy=function(){
+    updateModifiedNetworkProxies=function(){
       var modifiedNetworkProxies = getModifiedNetworkProxies();
 
       openDialogConfirm(function(){
index 19d30d19e7ad59e662ef393a44919ee78b9cf626..b906848e1112bb20f8ec457f5c68b038f4e9ab3c 100644 (file)
@@ -396,9 +396,17 @@ $(function() {
     }
     updateModifiedManagedRepositories=function(){
       var repos = getModifiedManagedRepositories();
-      for (i=0;i<repos.length;i++){
-        updateManagedRepository(repos[i]);
-      }
+
+      openDialogConfirm(function(){
+                          for (i=0;i<repos.length;i++){
+                            updateManagedRepository(repos[i]);
+                          }
+                          closeDialogConfirm();
+                        },
+                        $.i18n.prop('ok'),
+                        $.i18n.prop('cancel'),
+                        $.i18n.prop('bulk.save.confirm.title'),
+                        $.i18n.prop('managed.repository.bulk.save.confirm',repos.length));
     }
 
     showStats=function(managedRepository){
index ad83f56e442d154cc8f74bd6ac44b8a04314a490..d0f9a2e788ebb97fc391a7ec96c3b80afdaba1ff 100644 (file)
 
 <script id="network-proxies-bulk-save-tmpl" type='text/x-jquery-tmpl'>
   {{if bulkSave()}}
-    <button data-bind="click: updateModifiedNetworkProxy" class="btn">${$.i18n.prop('save.all')}</button>
+    <button data-bind="click: updateModifiedNetworkProxies" class="btn">${$.i18n.prop('save.all')}</button>
   {{/if}}
 </script>
\ No newline at end of file