]> source.dussan.org Git - archiva.git/commitdiff
browse screen display root implementation
authorOlivier Lamy <olamy@apache.org>
Fri, 17 Feb 2012 17:40:23 +0000 (17:40 +0000)
committerOlivier Lamy <olamy@apache.org>
Fri, 17 Feb 2012 17:40:23 +0000 (17:40 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1245679 13f79535-47bb-0310-9956-ffa450edef68

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/archiva/templates/search.html

index f64adada008d7568a1c5fb2a201a288423a78a1c..313061e9cc68f45d2da77c9b6c1b671070f8eacb 100644 (file)
@@ -34,7 +34,7 @@ $(function() {
 
 
 
-  displayGroupDetail=function(groupId,parentGroupdId){
+  displayGroupDetail=function(groupId,parentGroupdId,restUrl){
     var mainContent = $("#main-content");
     var browseResult=mainContent.find("#browse_result");
     var browseBreadCrumb=mainContent.find("#browse_breadcrumb");
@@ -43,7 +43,7 @@ $(function() {
           browseResult.html(mediumSpinnerImg());
           browseBreadCrumb.html(smallSpinnerImg());
           mainContent.find("#main_browse_result_content" ).show();
-          var url = "restServices/archivaServices/browseService/browseGroupId/"+encodeURIComponent(groupId);
+          var url = restUrl ? restUrl : "restServices/archivaServices/browseService/browseGroupId/"+encodeURIComponent(groupId);
           $.ajax(url, {
             type: "GET",
             dataType: 'json',
@@ -56,7 +56,10 @@ $(function() {
          });
         }
     );
+  }
 
+  browseRoot=function(){
+    displayGroupDetail(null,null,"restServices/archivaServices/browseService/rootGroups");
   }
 
   /**
index deefe1da086190190cc1511875a5e710cac0b954..c80b4d3ea398a41a9f0c8d66ce4a303526ea9b64 100644 (file)
@@ -54,7 +54,7 @@
 
 <script id="browse-breadcrumb-tmpl" type="text/html">
   <ul class="breadcrumb">
-    <li><a href="#"><i class="icon-home"/>&nbsp;</a>&nbsp;<span class="divider">/</span></li>
+    <li><a href="#" data-bind="click: function(){ browseRoot()}"><i class="icon-home"/>&nbsp;</a>&nbsp;<span class="divider">/</span></li>
     <li><a href="#">org</a>&nbsp;<span class="divider">/</span></li>
   </ul>
 </script>
\ No newline at end of file