From a787389a391ad6673d76ad4c3d397c59dc5055e7 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Tue, 28 Aug 2012 09:54:11 +0000 Subject: [PATCH] make mailing list tab navigable git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1378047 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/webapp/js/archiva/main.js | 20 ++++++++++++++++++- .../src/main/webapp/js/archiva/search.js | 12 ++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) 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 16e18e79c..50fa14dbd 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 @@ -315,7 +315,7 @@ function(jquery,ui,sammy,tmpl) { if(htmlIdSelect.html()!=null){ if( $.trim(htmlIdSelect.html().length)>0){ $("#main-content #"+tabToActivate).tab('show'); - $.log("checkArtifactDetailContent " + htmlId + " html not empty no calculation"); + $.log("checkArtifactDetailContent " + htmlId + " html not empty no calculation, tabToActivate:"+tabToActivate); return; } } @@ -438,6 +438,24 @@ function(jquery,ui,sammy,tmpl) { checkArtifactDetailContent(groupId,artifactId,version,repositoryId,"artifact-details-dependency-tree-content-a"); }); + this.get('#artifact-mailing-list/: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-mailing-list-content-a"); + }); + + this.get('#artifact-mailing-list~: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-mailing-list-content-a"); + }); + var calculateUsedBy=function(groupId,artifactId,version){ var dependeesContentDiv=$("#main-content" ).find("#artifact-details-used-by-content" ); 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 cc19e38d7..ad77e8230 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 @@ -271,7 +271,7 @@ define("archiva.search",["jquery","i18n","jquery.tmpl","choosen","knockout","kno mainContent.find("#artifact-details-tabs").on('show', function (e) { - + $.log("e.target:"+e.target); if ($(e.target).attr("data-target")=="#artifact-details-info-content") { var location ="#artifact"; if (self.repositoryId){ @@ -345,6 +345,16 @@ define("archiva.search",["jquery","i18n","jquery.tmpl","choosen","knockout","kno } location+="/"+self.groupId+"/"+self.artifactId+"/"+self.version; + window.sammyArchivaApplication.setLocation(location); + return; + } + if ($(e.target).attr("href")=="#artifact-details-mailing-list-content") { + var location ="#artifact-mailing-list"; + if (self.repositoryId){ + location+="~"+self.repositoryId; + } + location+="/"+self.groupId+"/"+self.artifactId+"/"+self.version; + window.sammyArchivaApplication.setLocation(location); return; }