]> source.dussan.org Git - archiva.git/commitdiff
repository browse accessible directly via queryparam: http://localhost:9091/archiva...
authorOlivier Lamy <olamy@apache.org>
Sat, 18 Feb 2012 00:18:07 +0000 (00:18 +0000)
committerOlivier Lamy <olamy@apache.org>
Sat, 18 Feb 2012 00:18:07 +0000 (00:18 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1245815 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/users.js

index a4d238cb378759d223f9c5770cb62ce337e2d08e..3a039693d8272474473031e79c4c64adc93a2b59 100644 (file)
@@ -162,6 +162,11 @@ $(function() {
     if (validateMeId) {
       validateKey(validateMeId);
     }
+
+    var browse = $.urlParam('browse');
+    if (browse){
+      displayBrowseGroupId(browse);
+    }
   });
 
   startArchivaApplication = function(){
index b0fcc066aa374fe9d0482d9fd32d268c05a9daf1..d27f338e432652fcfb3ad88340278e1cc39468a3 100644 (file)
@@ -57,9 +57,7 @@ $(function() {
 
   }
 
-  findParentGroupId=function(browseViewModel){
-    return browseViewModel.groupId;
-  }
+
 
   displayGroupDetail=function(groupId,parentBrowseViewModel,restUrl){
     var mainContent = $("#main-content");
@@ -108,6 +106,23 @@ $(function() {
     });
   }
 
+  /**
+   * called if browser url contains queryParam browse=groupId
+   * @param groupId
+   */
+  displayBrowseGroupId=function(groupId){
+    clearUserMessages();
+    var mainContent = $("#main-content");
+    mainContent.html($("#browse-tmpl" ).tmpl());
+    mainContent.find("#browse_result").html(mediumSpinnerImg());
+    var parentBrowseViewModel=new BrowseViewModel(null,null,null);
+    displayGroupDetail(groupId,parentBrowseViewModel,null)
+  }
+
+  function BrowseResultEntry(a, b){
+
+  }
+
   mapbrowseResultEntries=function(data){
     if (data.browseResult && data.browseResult.browseResultEntries) {
       return $.isArray(data.browseResult.browseResultEntries) ?
index 6494ebce15f5b8cd99bdb9a14c1de5553161826a..96638b4d1ec13b9ba9ce3560ee274110fc049dd1 100644 (file)
@@ -287,23 +287,7 @@ $(function() {
     $("#users-view-tabs-li-user-edit").addClass("active");
   }
 
-  /**
-   * not used as we don't have the mapping in web.xml
-   * but why to handle such urls which go directly to a view
-   */
-  $(document).ready(function() {
-    // url ends with /users/list
-    // and current has archiva-manage-users karma
-    // so display users list
-    var pathContent = window.location.pathname.split("/");
-    var usersIndex = $.inArray("users", pathContent);
-    if (usersIndex>=0 && pathContent[usersIndex+1]=="list") {
-      if ($.inArray("archiva-manage-users",window.redbackModel.operatioNames)>=0){
-        displayUsersGrid();
-      }
-    }
 
-  });