no need to ask server datas, dependency tree and dependees are immutable

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1304958 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-03-24 22:59:42 +00:00
parent 0b77f79f84
commit d16f7f0098
1 changed files with 4 additions and 4 deletions

View File

@ -203,7 +203,7 @@ $(function() {
mainContent.find("#artifact-details-tabs").on('show', function (e) { mainContent.find("#artifact-details-tabs").on('show', function (e) {
if ($(e.target).attr("href")=="#artifact-details-dependency-tree-content") { if ($(e.target).attr("href")=="#artifact-details-dependency-tree-content") {
var treeContentDiv=mainContent.find("#artifact-details-dependency-tree-content" ); var treeContentDiv=mainContent.find("#artifact-details-dependency-tree-content" );
//if( $.trim(treeContentDiv.html()).length<1){ if( $.trim(treeContentDiv.html()).length<1){
treeContentDiv.html(mediumSpinnerImg()); treeContentDiv.html(mediumSpinnerImg());
var treeDependencyUrl="restServices/archivaServices/browseService/treeEntries/"+encodeURIComponent(groupId); var treeDependencyUrl="restServices/archivaServices/browseService/treeEntries/"+encodeURIComponent(groupId);
treeDependencyUrl+="/"+encodeURIComponent(artifactId); treeDependencyUrl+="/"+encodeURIComponent(artifactId);
@ -220,11 +220,11 @@ $(function() {
treeContentDiv.html($("#dependency_tree_tmpl" ).tmpl({treeEntries: treeEntries})); 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") {
var dependeesContentDiv=mainContent.find("#artifact-details-used-by-content" ); var dependeesContentDiv=mainContent.find("#artifact-details-used-by-content" );
//if( $.trim(dependeesContentDiv.html()).length<1){ if( $.trim(dependeesContentDiv.html()).length<1){
dependeesContentDiv.html(mediumSpinnerImg()); dependeesContentDiv.html(mediumSpinnerImg());
var dependeesUrl="restServices/archivaServices/browseService/dependees/"+encodeURIComponent(groupId); var dependeesUrl="restServices/archivaServices/browseService/dependees/"+encodeURIComponent(groupId);
dependeesUrl+="/"+encodeURIComponent(artifactId); dependeesUrl+="/"+encodeURIComponent(artifactId);
@ -241,7 +241,7 @@ $(function() {
dependeesContentDiv.html($("#dependees_tmpl" ).tmpl({artifacts: artifacts})); dependeesContentDiv.html($("#dependees_tmpl" ).tmpl({artifacts: artifacts}));
} }
}); });
//} }
} }
}); });