]> source.dussan.org Git - archiva.git/commitdiff
remove data-bind attribute as coming from user management fail
authorOlivier Lamy <olamy@apache.org>
Sat, 25 Feb 2012 20:45:59 +0000 (20:45 +0000)
committerOlivier Lamy <olamy@apache.org>
Sat, 25 Feb 2012 20:45:59 +0000 (20:45 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1293683 13f79535-47bb-0310-9956-ffa450edef68

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

index 3a2ab5b503ef6ad370955e114bc02e18f4f33eb2..7d19c1cd1727101bf1d8cc996570d0057696dc43 100644 (file)
@@ -41,23 +41,29 @@ $(function() {
     }
 
     displayProjectEntry=function(id){
-      $.log("displayProjectEntry:"+id);
-      var url = "restServices/archivaServices/browseService/versionsList/org.apache.maven/maven-archiver";
+      // value org.apache.maven/maven-archiver
+      // split this org.apache.maven and maven-archiver
+      var values = id.split(".");
+      var groupId="";
+      for (var i = 0;i<values.length-1;i++){
+        groupId+=values[i];
+        if (i<values.length-2)groupId+=".";
+      }
+      var artifactId=values[values.length-1];
+      $.log("displayProjectEntry:"+id+",groupId:artifactId:"+groupId+":"+artifactId);
 
-      $.ajax(url, {
+      $.ajax("restServices/archivaServices/browseService/projectVersionMetadata/"+groupId+"/"+artifactId, {
         type: "GET",
         dataType: 'json',
         success: function(data) {
 
-        }
-      });
-
-      url = "restServices/archivaServices/browseService/projectVersionMetadata/org.apache.maven/maven-archiver";
+          $.ajax("restServices/archivaServices/browseService/versionsList/"+groupId+"/"+artifactId, {
+            type: "GET",
+            dataType: 'json',
+            success: function(data) {
 
-      $.ajax(url, {
-        type: "GET",
-        dataType: 'json',
-        success: function(data) {
+            }
+          });
 
         }
       });
@@ -121,6 +127,7 @@ $(function() {
   displayBrowse=function(){
     clearUserMessages();
     var mainContent = $("#main-content");
+    mainContent.attr("data-bind","");
     mainContent.html($("#browse-tmpl" ).tmpl());
     mainContent.find("#browse_result").html(mediumSpinnerImg());
     $.ajax("restServices/archivaServices/browseService/rootGroups", {