}
+ displayArtifactVersionDetailViewModel=function(groupId,artifactId,version){
+ var artifactVersionDetailViewModel = new ArtifactVersionDetailViewModel (groupId,artifactId,version)
+ artifactVersionDetailViewModel.display();
+ }
+
ArtifactVersionDetailViewModel=function(groupId,artifactId,version){
var mainContent = $("#main-content");
var self=this;
this.version=version;
this.projectVersionMetadata=null;
+
displayGroupId=function(groupId){
displayGroupDetail(groupId,null);
}
+ displayParent=function(){
+ displayArtifactVersionDetailViewModel(self.projectVersionMetadata.mavenFacet.parent.groupId,self.projectVersionMetadata.mavenFacet.parent.artifactId,
+ self.projectVersionMetadata.mavenFacet.parent.version);
+ }
+
breadCrumbEntries=function(){
var entries = calculateBreadCrumbEntries(self.groupId);
var artifactBreadCrumbEntry = new BreadCrumbEntry(self.groupId,self.artifactId);
if( $.isArray(data.facetList)){
for (var i=0;i<data.facetList.length;i++){
if(data.facetList[i].facetId=='org.apache.archiva.metadata.repository.storage.maven2.project'){
- projectVersionMetadata.mavenFacet=new MavenFacet(data.facetList[i].packaging);
+ projectVersionMetadata.mavenFacet=new MavenFacet(data.facetList[i].packaging,data.facetList[i].parent);
}
}
} else {
if(data.facetList.facetId=='org.apache.archiva.metadata.repository.storage.maven2.project'){
- projectVersionMetadata.mavenFacet=new MavenFacet(data.facetList.packaging);
+ projectVersionMetadata.mavenFacet=new MavenFacet(data.facetList.packaging,data.facetList.parent);
}
}
}
return null;
}
- MavenFacet=function(packaging){
+ MavenFacet=function(packaging,parent){
this.packaging=packaging;
+ if(parent){
+ this.parent={groupId:parent.groupId,artifactId:parent.artifactId,version:parent.version};
+ }
+
}
ProjectVersionMetadata=function(id,url,name,description,organization,issueManagement,scm,ciManagement,licenses,