]> source.dussan.org Git - archiva.git/commitdiff
fix changing repository with chrome
authorOlivier Lamy <olamy@apache.org>
Thu, 22 Jan 2015 11:20:46 +0000 (22:20 +1100)
committerOlivier Lamy <olamy@apache.org>
Thu, 22 Jan 2015 11:20:46 +0000 (22:20 +1100)
archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/search.js

index eefdfefa3408ba050d9745122b70ffd855e9668c..c2dd6d780bbcf58b59365f576a0f644cf8739f83 100644 (file)
@@ -1398,8 +1398,9 @@ define("archiva.search",["jquery","jquery.ui","i18n","jquery.tmpl","select2","kn
     // #browse~internal/org.apache.maven
     // or #artifact~snapshots/org.apache.maven.plugins/maven-compiler-plugin
     var currentHash=window.location.hash;
-    $.log("currentHash:"+currentHash);
+    //$.log("currentHash:"+currentHash);
     var newLocation = currentHash.substringBeforeFirst("/");
+    //$.log("changeBrowseRepository newLocation:"+newLocation);
     // maybe the current hash contains a repositoryId so remove it
     if (newLocation.indexOf("~")>-1){
       newLocation=currentHash.substringBeforeFirst("~");
@@ -1407,7 +1408,7 @@ define("archiva.search",["jquery","jquery.ui","i18n","jquery.tmpl","select2","kn
     if (selectedRepository){
       newLocation+="~"+selectedRepository;
     }
-    if (currentHash.contains("/")) {
+    if (currentHash.indexOf("/")>-1) {
         // MRM-1767 
         // from all to internal
         // #browse -> #browse~internal