var checkArtifactDetailContent=function(groupId,artifactId,version,repositoryId,tabToActivate,idContentToCheck,contentDisplayFn){
// no need to recalculate all stuff just activate the tab
var htmlId = idContentToCheck?idContentToCheck:"browse_artifact_detail";
- var htmlIdSelect = $("#main-content #"+htmlId );
+ var htmlIdSelect = $("#main-content").find("#"+htmlId );
if(htmlIdSelect.html()!=null){
if( $.trim(htmlIdSelect.html().length)>0){
$("#main-content #"+tabToActivate).tab('show');
+ $.log("checkArtifactDetailContent " + htmlId + " html not empty no calculation");
return;
}
}
checkArtifactDetailContent(groupId,artifactId,version,repositoryId,"artifact-details-dependencies-content-a");
});
+ this.get('#artifact-details-files-content/: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,null,"artifact-details-files-content-a","artifact-details-files-content",
+ function(groupId,artifactId,version,artifactVersionDetailViewModel){
+ displayArtifactFilesContent(artifactVersionDetailViewModel);
+ });
+
+ });
+
+ this.get('#artifact-details-files-content~: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;
+ checkArtifactDetailContent(groupId,artifactId,version,repositoryId,"artifact-details-files-content-a","artifact-details-files-content",
+ function(groupId,artifactId,version,artifactVersionDetailViewModel){
+ displayArtifactFilesContent(artifactVersionDetailViewModel);
+ });
+ });
+
+
this.get('#artifact-dependency-tree/:groupId/:artifactId/:version',function(context){
</table>
</div>
- <div id="artifact-details-dependency-tree-content" class="tab-pane">
- </div>
+ <div id="artifact-details-dependency-tree-content" class="tab-pane"></div>
- <div id="artifact-details-files-content" class="tab-pane">
- </div>
+ <div id="artifact-details-files-content" class="tab-pane"></div>
- <div id="artifact-details-download-content" class="tab-pane">
- </div>
+ <div id="artifact-details-download-content" class="tab-pane"></div>
<div id="artifact-details-used-by-content" class="tab-pane"></div>
<script id="artifact-details-files-content_tmpl" type="text/html">
<div class="row-fluid">
<div class="span5">
- <ul id="artifact-content-list-files">
+ <ul id="artifact-content-list-files" class="package-list">
{{each artifactDownloadInfos}}
<li id="${$value.classifier}:${$value.version}:${$value.packaging}">
<a href="#">${$value.packaging}:${$value.version} - ${$value.size}</a>