From: Mike Rylander Date: Thu, 23 Apr 2015 21:09:34 +0000 (-0400) Subject: webstaff: Just build the path directly, we know our base X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ac94d1d42122c436508524a71c061fcc0d4e493c;p=evergreen%2Fmasslnc.git webstaff: Just build the path directly, we know our base Signed-off-by: Mike Rylander Signed-off-by: Galen Charlton Signed-off-by: Jason Stephenson --- diff --git a/Open-ILS/web/js/ui/default/staff/services/navbar.js b/Open-ILS/web/js/ui/default/staff/services/navbar.js index 6a32056bf4..67c117d36d 100644 --- a/Open-ILS/web/js/ui/default/staff/services/navbar.js +++ b/Open-ILS/web/js/ui/default/staff/services/navbar.js @@ -30,14 +30,10 @@ angular.module('egCoreMod') function($scope , $window , $location , $timeout , hotkeys , egCore) { function navTo(path) { - // $location.path() does not want a leading ".", - // which 's will have. - // Note: avoid using $location.path() to derive the new - // URL, since it creates an intermediate path change. - path = path.replace(/^\./,''); + // Strip the leading "./" if any. + path = path.replace(/^\.\//,''); var reg = new RegExp($location.path()); - $window.location.href = - $window.location.href.replace(reg, path); + $window.location.href = egCore.env.basePath + path; } // adds a keyboard shortcut