archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1388405 - /archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js
Date Fri, 21 Sep 2012 10:38:47 GMT
Author: olamy
Date: Fri Sep 21 10:38:47 2012
New Revision: 1388405

URL: http://svn.apache.org/viewvc?rev=1388405&view=rev
Log:
reload all repositories after adding one with staged as a new one is automatically created

Modified:
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js?rev=1388405&r1=1388404&r2=1388405&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js
Fri Sep 21 10:38:47 2012
@@ -244,8 +244,17 @@ define("archiva.repositories",["jquery",
           data: dataJson,
           dataType: 'json',
           success: function(data) {
-            curManagedRepository.location(data.location);
-            self.managedRepositoriesViewModel.managedRepositories.push(curManagedRepository);
+            if (managedRepository.stageRepoNeeded()){
+              $.log("stageRepoNeeded:"+managedRepository.stageRepoNeeded());
+              // reload all to see the new staged repo
+              loadManagedRepositories(function(data){
+                self.managedRepositoriesViewModel.managedRepositories(mapManagedRepositories(data));
+              });
+            } else {
+              curManagedRepository.location(data.location);
+              self.managedRepositoriesViewModel.managedRepositories.push(curManagedRepository);
+            }
+
             displaySuccessMessage($.i18n.prop('managedrepository.added',curManagedRepository.id()));
             curManagedRepository.modified(false);
             activateManagedRepositoriesGridTab();



Mime
View raw message