From: Olivier Lamy Date: Thu, 22 Jan 2015 11:20:46 +0000 (+1100) Subject: fix changing repository with chrome X-Git-Tag: archiva-2.2.0~33 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=623a5f45045fc1cfacdf6b34aeed4582e88d066c;p=archiva.git fix changing repository with chrome --- diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/search.js b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/search.js index eefdfefa3..c2dd6d780 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/search.js +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/search.js @@ -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