more navigation history

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1370965 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-08-08 21:00:15 +00:00
parent a4f6bdf679
commit f65b6aee2a
2 changed files with 60 additions and 15 deletions

View File

@ -197,8 +197,16 @@ define("archiva.search",["jquery","i18n","jquery.tmpl","choosen","knockout","kno
} }
displayParent=function(){ displayParent=function(){
displayArtifactVersionDetailViewModel(self.projectVersionMetadata.mavenFacet.parent.groupId,self.projectVersionMetadata.mavenFacet.parent.artifactId, var selectedRepo=getSelectedBrowsingRepository();
self.projectVersionMetadata.mavenFacet.parent.version); var location ="#artifact";
if (selectedRepo){
location+="~"+selectedRepo;
}
location+="/"+self.projectVersionMetadata.mavenFacet.parent.groupId+"/"+self.projectVersionMetadata.mavenFacet.parent.artifactId;
location+="/"+self.projectVersionMetadata.mavenFacet.parent.version;
window.sammyArchivaApplication.setLocation(location);
} }
breadCrumbEntries=function(){ breadCrumbEntries=function(){
@ -316,8 +324,6 @@ define("archiva.search",["jquery","i18n","jquery.tmpl","choosen","knockout","kno
}); });
return; return;
} }
if ($(e.target).attr("href")=="#artifact-details-files-content") { if ($(e.target).attr("href")=="#artifact-details-files-content") {
displayArtifactFilesContent(self); displayArtifactFilesContent(self);
} }
@ -332,17 +338,37 @@ define("archiva.search",["jquery","i18n","jquery.tmpl","choosen","knockout","kno
displayGroup=function(groupId){ displayGroup=function(groupId){
var parentBrowseViewModel=new BrowseViewModel(null,null,null); var selectedRepo=getSelectedBrowsingRepository();
displayGroupDetail(groupId,parentBrowseViewModel,null); var location ="#browse";
if (selectedRepo){
location+="~"+selectedRepo;
}
location+="/"+groupId;
window.sammyArchivaApplication.setLocation(location);
} }
displayArtifactDetailView=function(groupId, artifactId){ displayArtifactDetailView=function(groupId, artifactId){
displayArtifactDetail(groupId, artifactId); var selectedRepo=getSelectedBrowsingRepository();
var location ="#artifact";
if (selectedRepo){
location+="~"+selectedRepo;
}
location+="/"+groupId+"/"+artifactId;
window.sammyArchivaApplication.setLocation(location);
} }
displayArtifactVersionDetailViewModel=function(groupId,artifactId,version){ displayArtifactVersionDetailViewModel=function(groupId,artifactId,version){
var artifactVersionDetailViewModel = new ArtifactVersionDetailViewModel (groupId,artifactId,version) var selectedRepo=getSelectedBrowsingRepository();
artifactVersionDetailViewModel.display(); var location ="#artifact";
if (selectedRepo){
location+="~"+selectedRepo;
}
location+="/"+groupId+"/"+artifactId+"/"+version;
window.sammyArchivaApplication.setLocation(location);
} }
@ -594,8 +620,15 @@ define("archiva.search",["jquery","i18n","jquery.tmpl","choosen","knockout","kno
* @param groupId * @param groupId
*/ */
generalDisplayGroup=function(groupId) { generalDisplayGroup=function(groupId) {
var parentBrowseViewModel=new BrowseViewModel(null,null,null); $.log("generalDisplayGroup");
displayGroupDetail(groupId,parentBrowseViewModel,null); var selectedRepo=getSelectedBrowsingRepository();
var location ="#browse";
if (selectedRepo){
location+="~"+selectedRepo;
}
location+="/"+groupId;
window.sammyArchivaApplication.setLocation(location);
} }
/** /**
@ -604,7 +637,14 @@ define("archiva.search",["jquery","i18n","jquery.tmpl","choosen","knockout","kno
* @param artifactId * @param artifactId
*/ */
generalDisplayArtifactDetailView=function(groupId, artifactId){ generalDisplayArtifactDetailView=function(groupId, artifactId){
displayArtifactDetail(groupId, artifactId); var selectedRepo=getSelectedBrowsingRepository();
var location ="#artifact";
if (selectedRepo){
location+="~"+selectedRepo;
}
location+="/"+groupId+"/"+artifactId;
window.sammyArchivaApplication.setLocation(location);
} }
/** /**
@ -614,8 +654,14 @@ define("archiva.search",["jquery","i18n","jquery.tmpl","choosen","knockout","kno
* @param version * @param version
*/ */
generalDisplayArtifactVersionDetailViewModel=function(groupId,artifactId,version){ generalDisplayArtifactVersionDetailViewModel=function(groupId,artifactId,version){
var artifactVersionDetailViewModel = new ArtifactVersionDetailViewModel (groupId,artifactId,version) var selectedRepo=getSelectedBrowsingRepository();
artifactVersionDetailViewModel.display(); var location ="#artifact";
if (selectedRepo){
location+="~"+selectedRepo;
}
location+="/"+groupId+"/"+artifactId+"/"+version;
window.sammyArchivaApplication.setLocation(location);
} }
goToBrowseArtifactDetail=function(groupId, artifactId,repositoryId){ goToBrowseArtifactDetail=function(groupId, artifactId,repositoryId){

View File

@ -371,7 +371,6 @@
<script id="search-results-view-grid-tmpl" type="text/html"> <script id="search-results-view-grid-tmpl" type="text/html">
<thead> <thead>
<tr> <tr>
<th title="${$.i18n.prop('search.artifact.results.groupId')}">${$.i18n.prop('search.artifact.results.groupId')}</th> <th title="${$.i18n.prop('search.artifact.results.groupId')}">${$.i18n.prop('search.artifact.results.groupId')}</th>
<th title="${$.i18n.prop('search.artifact.results.artifactId')}">${$.i18n.prop('search.artifact.results.artifactId')}</th> <th title="${$.i18n.prop('search.artifact.results.artifactId')}">${$.i18n.prop('search.artifact.results.artifactId')}</th>
<th title="${$.i18n.prop('search.artifact.results.version')}">${$.i18n.prop('search.artifact.results.version')}</th> <th title="${$.i18n.prop('search.artifact.results.version')}">${$.i18n.prop('search.artifact.results.version')}</th>