archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1397493 - in /archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva: main.js repositories.js
Date Fri, 12 Oct 2012 09:30:46 GMT
Author: olamy
Date: Fri Oct 12 09:30:46 2012
New Revision: 1397493

URL: http://svn.apache.org/viewvc?rev=1397493&view=rev
Log:
add direct url to edit managed repository

Modified:
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js
    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/main.js
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js?rev=1397493&r1=1397492&r2=1397493&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js
Fri Oct 12 09:30:46 2012
@@ -649,6 +649,12 @@ function(jquery,ui,sammy,tmpl) {
           goToRedbackRestDoc(target);
         });
 
+        this.get("#managedrepositoryedit/:repositoryId",function(){
+          var repositoryId=this.params.repositoryId;
+          $.log("edit managed repository:"+repositoryId);
+          displayRepositoriesGrid(function(managedRepositoriesViewModel){managedRepositoriesViewModel.editManagedRepositoryWithId(repositoryId)});
+        });
+
       });
   };
 

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=1397493&r1=1397492&r2=1397493&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 Oct 12 09:30:46 2012
@@ -335,6 +335,14 @@ define("archiva.repositories",["jquery",
       activatePopoverDoc();
     }
 
+    this.editManagedRepositoryWithId=function(managedRepositoryId){
+      $.each(self.managedRepositories(), function(index, value) {
+        if(value.id()==managedRepositoryId){
+          editManagedRepository(value);
+        }
+      });
+    }
+
     scanNow=function(managedRepository){
       clearUserMessages();
       openDialogConfirm(
@@ -985,7 +993,12 @@ define("archiva.repositories",["jquery",
   // Screen loading
   //---------------------------
 
-  displayRepositoriesGrid=function(){
+   /**
+    *
+    * @param successFnManagedRepositories function called on managedRepositoriesViewModel
when managed repositories grid has been displayed
+    * @param successFnRemoteRepositories  function called on remoteRepositoriesViewModel
when remote repositories grid has been displayed
+    */
+  displayRepositoriesGrid=function(successFnManagedRepositories,successFnRemoteRepositories){
     screenChange();
     var mainContent = $("#main-content");
     mainContent.html(mediumSpinnerImg());
@@ -1039,6 +1052,9 @@ define("archiva.repositories",["jquery",
             mainContent.find("#managed-repositories-pills #managed-repositories-view-a").tab('show');
             removeMediumSpinnerImg("#main-content #managed-repositories-content");
             activateManagedRepositoriesGridTab();
+            if(successFnManagedRepositories){
+              successFnManagedRepositories(managedRepositoriesViewModel);
+            }
           });
 
           loadRemoteRepositories(function(data) {
@@ -1075,6 +1091,9 @@ define("archiva.repositories",["jquery",
             mainContent.find("#remote-repositories-pills #remote-repositories-view-a").tab('show')
             removeMediumSpinnerImg("#main-content #remote-repositories-content");
             activatePopoverDoc();
+            if(successFnRemoteRepositories){
+              successFnRemoteRepositories();
+            }
           });
         }
     }



Mime
View raw message