From ac94d1d42122c436508524a71c061fcc0d4e493c Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Thu, 23 Apr 2015 17:09:34 -0400 Subject: [PATCH] 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 --- Open-ILS/web/js/ui/default/staff/services/navbar.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) 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 -- 2.43.2