take care of hash with already a repositoryUd

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1370426 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-08-07 18:39:13 +00:00
parent ae610b03b7
commit 816988abf0
1 changed files with 5 additions and 5 deletions

View File

@ -758,12 +758,12 @@ define("archiva.search",["jquery","i18n","jquery.tmpl","choosen","knockout","kno
// #browse~internal/org.apache.maven
// or #artifact~snapshots/org.apache.maven.plugins/maven-compiler-plugin
var currentHash=window.location.hash;
$.log("currentHash:"+currentHash);
var newLocation = currentHash.substringBeforeFirst("/");// "#browse";
var newLocation = currentHash.substringBeforeFirst("/");
// maybe the current hash contains a repositoryId so remove it
if (newLocation.indexOf("~")>-1){
newLocation=currentHash.substringBeforeFirst("");
}
if (selectedRepository){
newLocation+="~"+selectedRepository;
}