Author: olamy
Date: Tue Dec 18 14:20:31 2012
New Revision: 1423442

URL: http://svn.apache.org/viewvc?rev=1423442&view=rev
Log:
if classifier from the search we must download the artifact with this classifier

Modified:
    
archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/BrowseService.java
    
archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java
    
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/search.js

Modified: 
archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/BrowseService.java
URL: 
http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/BrowseService.java?rev=1423442&r1=1423441&r2=1423442&view=diff
==============================================================================
--- 
archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/BrowseService.java
 (original)
+++ 
archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/BrowseService.java
 Tue Dec 18 14:20:31 2012
@@ -45,61 +45,59 @@ import java.util.List;
  * @author Olivier Lamy
  * @since 1.4-M3
  */
-@Path ("/browseService/")
+@Path("/browseService/")
 public interface BrowseService
 {
-    @Path ("rootGroups")
+    @Path("rootGroups")
     @GET
-    @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    @RedbackAuthorization (noPermission = true, noRestriction = true)
-    BrowseResult getRootGroups( @QueryParam ("repositoryId") String 
repositoryId )
+    @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+    @RedbackAuthorization(noPermission = true, noRestriction = true)
+    BrowseResult getRootGroups( @QueryParam("repositoryId") String 
repositoryId )
         throws ArchivaRestServiceException;
 
     /**
-     * @param groupId groupId to browse
+     * @param groupId      groupId to browse
      * @param repositoryId optionnal (repository to browse if 
<code>null</code> all available user repositories are used)
      */
-    @Path ("browseGroupId/{groupId}")
+    @Path("browseGroupId/{groupId}")
     @GET
-    @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    @RedbackAuthorization (noPermission = true, noRestriction = true)
-    BrowseResult browseGroupId( @PathParam ("groupId") String groupId,
-                                @QueryParam ("repositoryId") String 
repositoryId )
+    @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+    @RedbackAuthorization(noPermission = true, noRestriction = true)
+    BrowseResult browseGroupId( @PathParam("groupId") String groupId, 
@QueryParam("repositoryId") String repositoryId )
         throws ArchivaRestServiceException;
 
-    @Path ("versionsList/{g}/{a}")
+    @Path("versionsList/{g}/{a}")
     @GET
-    @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    @RedbackAuthorization (noPermission = true, noRestriction = true)
-    VersionsList getVersionsList( @PathParam ("g") String groupId, @PathParam 
("a") String artifactId,
-                                  @QueryParam ("repositoryId") String 
repositoryId )
+    @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+    @RedbackAuthorization(noPermission = true, noRestriction = true)
+    VersionsList getVersionsList( @PathParam("g") String groupId, 
@PathParam("a") String artifactId,
+                                  @QueryParam("repositoryId") String 
repositoryId )
         throws ArchivaRestServiceException;
 
-    @Path ("projectVersionMetadata/{g}/{a}")
+    @Path("projectVersionMetadata/{g}/{a}")
     @GET
-    @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    @RedbackAuthorization (noPermission = true, noRestriction = true)
-    ProjectVersionMetadata getProjectVersionMetadata( @PathParam ("g") String 
groupId,
-                                                      @PathParam ("a") String 
artifactId,
-                                                      @QueryParam 
("repositoryId") String repositoryId )
+    @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+    @RedbackAuthorization(noPermission = true, noRestriction = true)
+    ProjectVersionMetadata getProjectVersionMetadata( @PathParam("g") String 
groupId, @PathParam("a") String artifactId,
+                                                      
@QueryParam("repositoryId") String repositoryId )
         throws ArchivaRestServiceException;
 
-    @Path ("projectVersionMetadata/{g}/{a}/{v}")
+    @Path("projectVersionMetadata/{g}/{a}/{v}")
     @GET
-    @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    @RedbackAuthorization (noPermission = true, noRestriction = true)
-    ProjectVersionMetadata getProjectMetadata( @PathParam ("g") String 
groupId, @PathParam ("a") String artifactId,
-                                               @PathParam ("v") String version,
-                                               @QueryParam ("repositoryId") 
String repositoryId )
+    @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+    @RedbackAuthorization(noPermission = true, noRestriction = true)
+    ProjectVersionMetadata getProjectMetadata( @PathParam("g") String groupId, 
@PathParam("a") String artifactId,
+                                               @PathParam("v") String version,
+                                               @QueryParam("repositoryId") 
String repositoryId )
         throws ArchivaRestServiceException;
 
     /**
      * @return List of managed repositories current user can read
      */
-    @Path ("userRepositories")
+    @Path("userRepositories")
     @GET
-    @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    @RedbackAuthorization (noPermission = true, noRestriction = true)
+    @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+    @RedbackAuthorization(noPermission = true, noRestriction = true)
     List<ManagedRepository> getUserRepositories()
         throws ArchivaRestServiceException;
 
@@ -107,115 +105,130 @@ public interface BrowseService
      * return the dependency Tree for an artifacts
      * <b>the List result has only one entry</b>
      */
-    @Path ("treeEntries/{g}/{a}/{v}")
+    @Path("treeEntries/{g}/{a}/{v}")
     @GET
-    @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    @RedbackAuthorization (noPermission = true, noRestriction = true)
-    List<TreeEntry> getTreeEntries( @PathParam ("g") String groupId, 
@PathParam ("a") String artifactId,
-                                    @PathParam ("v") String version, 
@QueryParam ("repositoryId") String repositoryId )
+    @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+    @RedbackAuthorization(noPermission = true, noRestriction = true)
+    List<TreeEntry> getTreeEntries( @PathParam("g") String groupId, 
@PathParam("a") String artifactId,
+                                    @PathParam("v") String version, 
@QueryParam("repositoryId") String repositoryId )
         throws ArchivaRestServiceException;
 
     /**
      * List of artifacts using the artifact passed in parameter.
      */
-    @Path ("dependees/{g}/{a}/{v}")
+    @Path("dependees/{g}/{a}/{v}")
     @GET
-    @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    @RedbackAuthorization (noPermission = true, noRestriction = true)
-    List<Artifact> getDependees( @PathParam ("g") String groupId, @PathParam 
("a") String artifactId,
-                                 @PathParam ("v") String version, @QueryParam 
("repositoryId") String repositoryId )
+    @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+    @RedbackAuthorization(noPermission = true, noRestriction = true)
+    List<Artifact> getDependees( @PathParam("g") String groupId, 
@PathParam("a") String artifactId,
+                                 @PathParam("v") String version, 
@QueryParam("repositoryId") String repositoryId )
         throws ArchivaRestServiceException;
 
-    @Path ("metadatas/{g}/{a}/{v}")
+    @Path("metadatas/{g}/{a}/{v}")
     @GET
-    @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    @RedbackAuthorization (noPermission = true, noRestriction = true)
-    List<Entry> getMetadatas( @PathParam ("g") String groupId, @PathParam 
("a") String artifactId,
-                              @PathParam ("v") String version, @QueryParam 
("repositoryId") String repositoryId )
+    @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+    @RedbackAuthorization(noPermission = true, noRestriction = true)
+    List<Entry> getMetadatas( @PathParam("g") String groupId, @PathParam("a") 
String artifactId,
+                              @PathParam("v") String version, 
@QueryParam("repositoryId") String repositoryId )
         throws ArchivaRestServiceException;
 
-    @Path ("metadata/{g}/{a}/{v}/{key}/{value}")
+    @Path("metadata/{g}/{a}/{v}/{key}/{value}")
     @PUT
-    @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    @RedbackAuthorization (noPermission = false, noRestriction = false, 
permissions = "archiva-add-metadata")
-    Boolean addMetadata( @PathParam ("g") String groupId, @PathParam ("a") 
String artifactId,
-                         @PathParam ("v") String version, @PathParam ("key") 
String key,
-                         @PathParam ("value") String value, @QueryParam 
("repositoryId") String repositoryId )
+    @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+    @RedbackAuthorization(noPermission = false, noRestriction = false, 
permissions = "archiva-add-metadata")
+    Boolean addMetadata( @PathParam("g") String groupId, @PathParam("a") 
String artifactId,
+                         @PathParam("v") String version, @PathParam("key") 
String key, @PathParam("value") String value,
+                         @QueryParam("repositoryId") String repositoryId )
         throws ArchivaRestServiceException;
 
-    @Path ("metadata/{g}/{a}/{v}/{key}")
+    @Path("metadata/{g}/{a}/{v}/{key}")
     @DELETE
-    @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    @RedbackAuthorization (noPermission = false, noRestriction = false, 
permissions = "archiva-add-metadata")
-    Boolean deleteMetadata( @PathParam ("g") String groupId, @PathParam ("a") 
String artifactId,
-                            @PathParam ("v") String version, @PathParam 
("key") String key,
-                            @QueryParam ("repositoryId") String repositoryId )
+    @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+    @RedbackAuthorization(noPermission = false, noRestriction = false, 
permissions = "archiva-add-metadata")
+    Boolean deleteMetadata( @PathParam("g") String groupId, @PathParam("a") 
String artifactId,
+                            @PathParam("v") String version, @PathParam("key") 
String key,
+                            @QueryParam("repositoryId") String repositoryId )
         throws ArchivaRestServiceException;
 
-    @Path( "importMetadata" )
+    @Path("importMetadata")
     @POST
-    @RedbackAuthorization( noPermission = false, noRestriction = false, 
permissions = "archiva-add-metadata")
-    Boolean importMetadata( MetadataAddRequest metadataAddRequest, @QueryParam 
("repository") String repository )
+    @RedbackAuthorization(noPermission = false, noRestriction = false, 
permissions = "archiva-add-metadata")
+    Boolean importMetadata( MetadataAddRequest metadataAddRequest, 
@QueryParam("repository") String repository )
         throws ArchivaRestServiceException;
 
-    @Path ("artifactContentEntries/{g}/{a}/{v}")
+    @Path("artifactContentEntries/{g}/{a}/{v}")
     @GET
-    @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    @RedbackAuthorization (noPermission = true, noRestriction = true)
-    List<ArtifactContentEntry> getArtifactContentEntries( @PathParam ("g") 
String groupId,
-                                                          @PathParam ("a") 
String artifactId,
-                                                          @PathParam ("v") 
String version,
-                                                          @QueryParam ("c") 
String classifier,
-                                                          @QueryParam ("t") 
String type, @QueryParam ("p") String path,
-                                                          @QueryParam 
("repositoryId") String repositoryId )
+    @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+    @RedbackAuthorization(noPermission = true, noRestriction = true)
+    List<ArtifactContentEntry> getArtifactContentEntries( @PathParam("g") 
String groupId,
+                                                          @PathParam("a") 
String artifactId,
+                                                          @PathParam("v") 
String version,
+                                                          @QueryParam("c") 
String classifier,
+                                                          @QueryParam("t") 
String type, @QueryParam("p") String path,
+                                                          
@QueryParam("repositoryId") String repositoryId )
         throws ArchivaRestServiceException;
 
-    @Path ("artifactDownloadInfos/{g}/{a}/{v}")
+    @Path("artifactDownloadInfos/{g}/{a}/{v}")
     @GET
-    @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    @RedbackAuthorization (noPermission = true, noRestriction = true)
-    List<Artifact> getArtifactDownloadInfos( @PathParam ("g") String groupId, 
@PathParam ("a") String artifactId,
-                                             @PathParam ("v") String version,
-                                             @QueryParam ("repositoryId") 
String repositoryId )
+    @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+    @RedbackAuthorization(noPermission = true, noRestriction = true)
+    List<Artifact> getArtifactDownloadInfos( @PathParam("g") String groupId, 
@PathParam("a") String artifactId,
+                                             @PathParam("v") String version,
+                                             @QueryParam("repositoryId") 
String repositoryId )
         throws ArchivaRestServiceException;
 
     /**
      * if path is empty content of the file is returned (for pom view)
      */
-    @Path ("artifactContentText/{g}/{a}/{v}")
+    @Path("artifactContentText/{g}/{a}/{v}")
     @GET
-    @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    @RedbackAuthorization (noPermission = true, noRestriction = true)
-    ArtifactContent getArtifactContentText( @PathParam ("g") String groupId, 
@PathParam ("a") String artifactId,
-                                            @PathParam ("v") String version, 
@QueryParam ("c") String classifier,
-                                            @QueryParam ("t") String type, 
@QueryParam ("p") String path,
-                                            @QueryParam ("repositoryId") 
String repositoryId )
+    @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+    @RedbackAuthorization(noPermission = true, noRestriction = true)
+    ArtifactContent getArtifactContentText( @PathParam("g") String groupId, 
@PathParam("a") String artifactId,
+                                            @PathParam("v") String version, 
@QueryParam("c") String classifier,
+                                            @QueryParam("t") String type, 
@QueryParam("p") String path,
+                                            @QueryParam("repositoryId") String 
repositoryId )
         throws ArchivaRestServiceException;
 
     /**
      * verify if an artifact is available locally if not download from proxies 
will be try
+     *
      * @since 1.4-M3
      */
-    @Path ("artifactAvailable/{g}/{a}/{v}")
+    @Path("artifactAvailable/{g}/{a}/{v}")
     @GET
-    @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    @RedbackAuthorization (noPermission = true, noRestriction = true)
-    Boolean artifactAvailable( @PathParam ("g") String groupId, @PathParam 
("a") String artifactId,
-                               @PathParam ("v") String version, @QueryParam 
("repositoryId") String repositoryId )
+    @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+    @RedbackAuthorization(noPermission = true, noRestriction = true)
+    Boolean artifactAvailable( @PathParam("g") String groupId, @PathParam("a") 
String artifactId,
+                               @PathParam("v") String version, 
@QueryParam("repositoryId") String repositoryId )
         throws ArchivaRestServiceException;
 
     /**
+     * verify if an artifact is available locally if not download from proxies 
will be try
      *
+     * @since 1.4-M4
+     */
+    @Path( "artifactAvailable/{g}/{a}/{v}/{c}" )
+    @GET
+    @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
+    @RedbackAuthorization( noPermission = true, noRestriction = true )
+    Boolean artifactAvailable( @PathParam( "g" ) String groupId, @PathParam( 
"a" ) String artifactId,
+                               @PathParam( "v" ) String version, @PathParam( 
"c" ) String classifier,
+                               @QueryParam( "repositoryId" ) String 
repositoryId )
+        throws ArchivaRestServiceException;
+
+    /**
      * return List of all artifacts from this repository
+     *
      * @param repositoryId
      * @return
      * @throws ArchivaRestServiceException
      * @since 1.4-M3
      */
-    @Path ("artifacts/{r}")
+    @Path("artifacts/{r}")
     @GET
-    @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    @RedbackAuthorization (noPermission = true, noRestriction = true)
-    List<Artifact> getArtifacts( @PathParam ( "r" ) String repositoryId )
+    @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+    @RedbackAuthorization(noPermission = true, noRestriction = true)
+    List<Artifact> getArtifacts( @PathParam("r") String repositoryId )
         throws ArchivaRestServiceException;
 }

Modified: 
archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java
URL: 
http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java?rev=1423442&r1=1423441&r2=1423442&view=diff
==============================================================================
--- 
archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java
 (original)
+++ 
archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java
 Tue Dec 18 14:20:31 2012
@@ -62,6 +62,8 @@ import org.springframework.stereotype.Se
 
 import javax.inject.Inject;
 import javax.inject.Named;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.QueryParam;
 import javax.ws.rs.core.Response;
 import java.io.File;
 import java.io.IOException;
@@ -771,7 +773,8 @@ public class DefaultBrowseService
         return new ArtifactContent();
     }
 
-    public Boolean artifactAvailable( String groupId, String artifactId, 
String version, String repositoryId )
+    public Boolean artifactAvailable( String groupId, String artifactId, 
String version, String classifier,
+                                      String repositoryId )
         throws ArchivaRestServiceException
     {
         List<String> selectedRepos = getSelectedRepos( repositoryId );
@@ -793,8 +796,10 @@ public class DefaultBrowseService
                 ManagedRepositoryContent managedRepositoryContent =
                     repositoryContentFactory.getManagedRepositoryContent( 
repoId );
                 // FIXME default to jar which can be wrong for war zip etc....
-                ArchivaArtifact archivaArtifact =
-                    new ArchivaArtifact( groupId, artifactId, version, "", 
"jar", repoId );
+                ArchivaArtifact archivaArtifact = new ArchivaArtifact( 
groupId, artifactId, version,
+                                                                       
StringUtils.isEmpty( classifier )
+                                                                           ? ""
+                                                                           : 
classifier, "jar", repoId );
                 File file = managedRepositoryContent.toFile( archivaArtifact );
 
                 if ( file != null && file.exists() )
@@ -831,6 +836,12 @@ public class DefaultBrowseService
         return false;
     }
 
+    public Boolean artifactAvailable( String groupId, String artifactId, 
String version, String repositoryId )
+        throws ArchivaRestServiceException
+    {
+        return artifactAvailable( groupId, artifactId, version, null, 
repositoryId );
+    }
+
     public List<Artifact> getArtifacts( String repositoryId )
         throws ArchivaRestServiceException
     {

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=1423442&r1=1423441&r2=1423442&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
 Tue Dec 18 14:20:31 2012
@@ -350,7 +350,8 @@ function(jquery,ui,sammy,tmpl,i18n,jquer
           
goToBrowseArtifactDetail(groupId,artifactId,repositoryId);//,null,null);
         });
 
-        var 
checkArtifactDetailContent=function(groupId,artifactId,version,repositoryId,tabToActivate,idContentToCheck,contentDisplayFn){
+
+        var 
checkArtifactDetailContent=function(groupId,artifactId,version,repositoryId,tabToActivate,idContentToCheck,contentDisplayFn,classifier){
           self.activeMenuId("browse");
           // no need to recalculate all stuff just activate the tab
           var htmlId = 
idContentToCheck?idContentToCheck:"browse_artifact_detail";
@@ -369,6 +370,10 @@ function(jquery,ui,sammy,tmpl,i18n,jquer
 
           var 
artifactAvailableUrl="restServices/archivaServices/browseService/artifactAvailable/"+encodeURIComponent(groupId)+"/"+encodeURIComponent(artifactId);
           artifactAvailableUrl+="/"+encodeURIComponent(version);
+          if(classifier){
+            artifactAvailableUrl+="/"+encodeURIComponent(classifier);
+          }
+
           var selectedRepo=getSelectedBrowsingRepository();
           if (selectedRepo){
             
artifactAvailableUrl+="?repositoryId="+encodeURIComponent(selectedRepo);
@@ -412,6 +417,24 @@ function(jquery,ui,sammy,tmpl,i18n,jquer
           
checkArtifactDetailContent(groupId,artifactId,version,repositoryId,"artifact-details-info-content-a");
         });
 
+        
this.get('#artifact/:groupId/:artifactId/:version/:classifier',function(context){
+          var groupId= this.params.groupId;
+          var artifactId= this.params.artifactId;
+          var version= this.params.version;
+          var classifier= this.params.classifier;
+          
checkArtifactDetailContent(groupId,artifactId,version,null,"artifact-details-info-content-a",null,null,classifier);
+        });
+
+        
this.get('#artifact~:repositoryId/:groupId/:artifactId/:version/:classifier',function(context){
+
+          var repositoryId = this.params.repositoryId;
+          var groupId= this.params.groupId;
+          var artifactId= this.params.artifactId;
+          var version= this.params.version;
+          var classifier= this.params.classifier;
+          
checkArtifactDetailContent(groupId,artifactId,version,repositoryId,"artifact-details-info-content-a",null,null,classifier);
+        });
+
         
this.get('#artifact-dependencies/:groupId/:artifactId/:version',function(context){
 
           var repositoryId = this.params.repositoryId;
@@ -423,6 +446,16 @@ function(jquery,ui,sammy,tmpl,i18n,jquer
 
         });
 
+        
this.get('#artifact-dependencies/:groupId/:artifactId/:version',function(context){
+
+          var repositoryId = this.params.repositoryId;
+          var groupId= this.params.groupId;
+          var artifactId= this.params.artifactId;
+          var version= this.params.version;
+          
checkArtifactDetailContent(groupId,artifactId,version,repositoryId,"artifact-details-dependencies-content-a");
+
+        });
+
         
this.get('#artifact-dependencies~:repositoryId/:groupId/:artifactId/:version',function(context){
 
           var repositoryId = this.params.repositoryId;

Modified: 
archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js
URL: 
http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js?rev=1423442&r1=1423441&r2=1423442&view=diff
==============================================================================
--- 
archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js
 (original)
+++ 
archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js
 Tue Dec 18 14:20:31 2012
@@ -964,6 +964,7 @@ define("archiva.search",["jquery","i18n"
    * @param artifactId
    * @param parentBrowseViewModel
    * @param restUrl
+   * @param repositoryId
    */
   
displayArtifactDetail=function(groupId,artifactId,parentBrowseViewModel,restUrl,repositoryId){
     $.log("displayArtifactDetail:"+groupId+":"+artifactId);
@@ -1758,6 +1759,10 @@ define("archiva.search",["jquery","i18n"
       }
       
location+="/"+artifact.groupId+"/"+artifact.artifactId+"/"+artifact.version;
 
+      if(artifact.classifier){
+        location+="/"+artifact.classifier;
+      }
+
       window.sammyArchivaApplication.setLocation(location);
     }
   }


Reply via email to