$.log("get #artifact:"+groupId+":"+artifactId);
goToBrowseArtifactDetail(groupId,artifactId,repositoryId);//,null,null);
return;
-
});
this.get('#artifact/:groupId/:artifactId/:version',function(context){
var artifactId= this.params.artifactId;
var version= this.params.version;
generalDisplayArtifactDetailsVersionView(groupId,artifactId,version,repositoryId);
-
});
this.get('#artifact~:repositoryId/:groupId/:artifactId/:version',function(context){
var artifactId= this.params.artifactId;
var version= this.params.version;
generalDisplayArtifactDetailsVersionView(groupId,artifactId,version,repositoryId);
+ });
+
+ 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;
+ generalDisplayArtifactDetailsVersionView(groupId,artifactId,version,repositoryId,function(){$("#main-content #artifact-details-dependencies-content-a").tab('show')});
});
+
+ this.get('#artifact-dependencies~:repositoryId/: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;
+ generalDisplayArtifactDetailsVersionView(groupId,artifactId,version,repositoryId,function(){$("#main-content #artifact-details-dependencies-content-a").tab('show')});
+
+ });
+
this.get('#browse/:groupId',function(context){
var groupId = this.params.groupId;
if (groupId){
return entries;
}
- this.display=function(){
+ this.display=function(afterCallbackFn){
mainContent.find("#browse_breadcrumb").hide("slide", {}, 300,function(){
mainContent.find("#browse_artifact").hide("slide", {}, 300,function(){
+
mainContent.find("#browse_artifact_detail").show();
mainContent.find("#browse_artifact_detail").html(mediumSpinnerImg());
mainContent.find("#browse_breadcrumb" ).show();
mainContent.find("#browse-autocomplete-divider" ).hide();
mainContent.find("#artifact-details-tabs").on('show', function (e) {
+ if ($(e.target).attr("data-target")=="#artifact-details-dependencies-content") {
+ var location ="#artifact-dependencies";
+ if (self.repositoryId){
+ location+="~"+self.repositoryId;
+ }
+ location+="/"+self.groupId+"/"+self.artifactId+"/"+self.version;
+
+ window.sammyArchivaApplication.setLocation(location);
+ }
+
if ($(e.target).attr("href")=="#artifact-details-dependency-tree-content") {
var treeContentDiv=mainContent.find("#artifact-details-dependency-tree-content" );
if( $.trim(treeContentDiv.html()).length<1){
displayArtifactFilesContent(self);
}
});
+ if(afterCallbackFn){
+ afterCallbackFn();
+ }
}
+
});
});
$.i18n.prop('artifact.delete.confirm.title'),
$.i18n.prop('artifact.delete.confirm.save'));
-
-
}
this.deleteKarma = hasKarma('archiva-delete-artifact');
}
}
- generalDisplayArtifactDetailsVersionView=function(groupId,artifactId,version,repositoryId){
+ generalDisplayArtifactDetailsVersionView=function(groupId,artifactId,version,repositoryId,afterCallbackFn){
var mainContent=$("#main-content");
mainContent.html($("#browse-tmpl" ).tmpl());
mainContent.find("#browse_result" ).hide();
function(data) {
mainContent.find("#selected_repository" ).html($("#selected_repository_tmpl" ).tmpl({repositories:data,selected:repositoryId}));
var artifactVersionDetailViewModel=new ArtifactVersionDetailViewModel(groupId,artifactId,version,repositoryId);
- artifactVersionDetailViewModel.display();
+ artifactVersionDetailViewModel.display(afterCallbackFn);
}
);
<a data-toggle="tab" href="#artifact-details-info-content">${$.i18n.prop('artifact.detail.tab.header.info')}</a>
</li>
<li>
- <a data-toggle="tab" href="#artifact-details-dependencies-content">${$.i18n.prop('artifact.detail.tab.header.dependencies')}</a>
+ <a data-toggle="tab" id="artifact-details-dependencies-content-a" data-target="#artifact-details-dependencies-content" href="#artifact-details-dependencies-content">${$.i18n.prop('artifact.detail.tab.header.dependencies')}</a>
</li>
<li>
- <a data-toggle="tab" href="#artifact-details-dependency-tree-content">${$.i18n.prop('artifact.detail.tab.header.dependency.tree')}</a>
+ <a data-toggle="tab" id="artifact-details-dependency-tree-content-a" data-target="#artifact-details-dependency-tree-content" href="#artifact-details-dependency-tree-content">${$.i18n.prop('artifact.detail.tab.header.dependency.tree')}</a>
</li>
<li>
<a data-toggle="tab" href="#artifact-details-files-content">${$.i18n.prop('artifact.detail.tab.header.file.content')}</a>