mirror of https://github.com/apache/archiva.git
[MRM-1615] Artifact detail view
implements dependees tab. git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1304228 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f61e9b7ba9
commit
9b144cbe65
|
@ -217,13 +217,31 @@ $(function() {
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
var treeEntries = mapTreeEntries(data);
|
var treeEntries = mapTreeEntries(data);
|
||||||
treeContentDiv.html($("#dependency_tree_tmpl" ).tmpl({treeEntries: treeEntries}));//[data[0]]
|
treeContentDiv.html($("#dependency_tree_tmpl" ).tmpl({treeEntries: treeEntries}));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
if ($(e.target).attr("href")=="#artifact-details-used-by-content") {
|
if ($(e.target).attr("href")=="#artifact-details-used-by-content") {
|
||||||
$.log("#artifact-details-used-by-content");
|
var dependeesContentDiv=mainContent.find("#artifact-details-used-by-content" );
|
||||||
|
//if( $.trim(dependeesContentDiv.html()).length<1){
|
||||||
|
dependeesContentDiv.html(mediumSpinnerImg());
|
||||||
|
var dependeesUrl="restServices/archivaServices/browseService/dependees/"+encodeURIComponent(groupId);
|
||||||
|
dependeesUrl+="/"+encodeURIComponent(artifactId);
|
||||||
|
dependeesUrl+="/"+encodeURIComponent(version);
|
||||||
|
var selectedRepo=getSelectedBrowsingRepository();
|
||||||
|
if (selectedRepo){
|
||||||
|
dependeesUrl+="?repositoryId="+encodeURIComponent(selectedRepo);
|
||||||
|
}
|
||||||
|
$.ajax(dependeesUrl, {
|
||||||
|
type: "GET",
|
||||||
|
dataType: 'json',
|
||||||
|
success: function(data) {
|
||||||
|
var artifacts=mapArtifacts(data);
|
||||||
|
dependeesContentDiv.html($("#dependees_tmpl" ).tmpl({artifacts: artifacts}));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -610,9 +610,7 @@
|
||||||
<div id="artifact-details-dependency-tree-content" class="tab-pane">
|
<div id="artifact-details-dependency-tree-content" class="tab-pane">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="artifact-details-used-by-content" class="tab-pane">
|
<div id="artifact-details-used-by-content" class="tab-pane"></div>
|
||||||
used by
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="artifact-details-mailing-list-content" class="tab-pane">
|
<div id="artifact-details-mailing-list-content" class="tab-pane">
|
||||||
{{if projectVersionMetadata.mailingLists && projectVersionMetadata.mailingLists.length>0}}
|
{{if projectVersionMetadata.mailingLists && projectVersionMetadata.mailingLists.length>0}}
|
||||||
|
@ -699,4 +697,27 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script id="dependees_tmpl" type="text/html">
|
||||||
|
<ul>
|
||||||
|
{{each(i,artifact) artifacts}}
|
||||||
|
<li>
|
||||||
|
{{var entries=artifact.crumbEntries()}}
|
||||||
|
{{each(j,crumbEntry) entries}}
|
||||||
|
{{if j < entries.length - 2}}
|
||||||
|
<a href="#" onclick="generalDisplayGroup(encodeURIComponent('${crumbEntry.groupId}'))">${crumbEntry.displayValue}</a>
|
||||||
|
{{else j == entries.length - 2}}
|
||||||
|
<a href="#" onclick="generalDisplayArtifactDetailView(encodeURIComponent('${crumbEntry.groupId}'),encodeURIComponent('${crumbEntry.artifactId}'))">${crumbEntry.displayValue}</a>
|
||||||
|
{{else j == entries.length - 1}}
|
||||||
|
| <b>${$.i18n.prop('browse.artifact.version')}:</b>
|
||||||
|
<a href="#" onclick="generalDisplayArtifactVersionDetailViewModel(encodeURIComponent('${crumbEntry.groupId}'),encodeURIComponent('${crumbEntry.artifactId}'),encodeURIComponent('${crumbEntry.version}'))">${crumbEntry.version}</a>
|
||||||
|
{{/if}}
|
||||||
|
{{if j < entries.length - 2}}
|
||||||
|
/
|
||||||
|
{{/if}}
|
||||||
|
{{/each}}
|
||||||
|
</li>
|
||||||
|
{{/each}}
|
||||||
|
</ul>
|
||||||
</script>
|
</script>
|
Loading…
Reference in New Issue