fix browsing when click on an artifact in dependencies tab

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1390776 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-09-26 23:27:42 +00:00
parent 8a58f4f5f4
commit 0705e92bd4
2 changed files with 11 additions and 1 deletions

View File

@ -327,6 +327,9 @@ function(jquery,ui,sammy,tmpl) {
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";
// olamy: cause some issues when browsing so desactivate this fix until more check
// navigating from dependencies list or dependency or used by of an artifact to fix in search.js
/*
var htmlIdSelect = $("#main-content").find("#"+htmlId );
if(htmlIdSelect.html()!=null){
if( $.trim(htmlIdSelect.html().length)>0){
@ -335,7 +338,7 @@ function(jquery,ui,sammy,tmpl) {
return;
}
}
*/
var artifactAvailableUrl="restServices/archivaServices/browseService/artifactAvailable/"+encodeURIComponent(groupId)+"/"+encodeURIComponent(artifactId);
artifactAvailableUrl+="/"+encodeURIComponent(version);

View File

@ -224,6 +224,7 @@ define("archiva.search",["jquery","i18n","jquery.tmpl","choosen","knockout","kno
}
displayArtifactVersionDetailViewModel=function(groupId,artifactId,version){
$.log("displayArtifactVersionDetailViewModel:"+groupId+":"+artifactId+":"+version);
var artifactVersionDetailViewModel = new ArtifactVersionDetailViewModel (groupId,artifactId,version)
artifactVersionDetailViewModel.display();
}
@ -444,6 +445,7 @@ define("archiva.search",["jquery","i18n","jquery.tmpl","choosen","knockout","kno
}
displayArtifactVersionDetailViewModel=function(groupId,artifactId,version){
$.log("ArtifactVersionDetailViewModel#displayArtifactVersionDetailViewModel:"+groupId+":"+artifactId+":"+version);
var selectedRepo=getSelectedBrowsingRepository();
var location ="#artifact";
if (selectedRepo){
@ -451,6 +453,11 @@ define("archiva.search",["jquery","i18n","jquery.tmpl","choosen","knockout","kno
}
location+="/"+groupId+"/"+artifactId+"/"+version;
self.groupId=groupId;
self.artifactId=artifactId;
self.version=version;
$("#main-content" ).find("#browse_artifact_detail" ).html("");
window.sammyArchivaApplication.setLocation(location);
}