From 0705e92bd4ddc33996ab8c21fdbfc5e4e5bf4e8e Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Wed, 26 Sep 2012 23:27:42 +0000 Subject: [PATCH] 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 --- .../archiva-webapp-js/src/main/webapp/js/archiva/main.js | 5 ++++- .../archiva-webapp-js/src/main/webapp/js/archiva/search.js | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js index 218a11efe..bf8afae60 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js @@ -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); diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js index 74473ed77..0f9051484 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js @@ -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); } -- 2.39.5