From 2c49627bb0cf49423fa9c9be4822282674df2039 Mon Sep 17 00:00:00 2001
From: Bill Erickson <berickxx@gmail.com>
Date: Wed, 23 May 2018 11:13:16 -0400
Subject: [PATCH] LP#1560805 Webstaff locale picker repair

Make the locale picker less finicky by replacing the search/replace
regex with a simple static URL for applying the locale.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
---
 Open-ILS/web/js/ui/default/staff/services/navbar.js | 7 ++-----
 1 file changed, 2 insertions(+), 5 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 2702fc05f0..b6ff1d31fe 100644
--- a/Open-ILS/web/js/ui/default/staff/services/navbar.js
+++ b/Open-ILS/web/js/ui/default/staff/services/navbar.js
@@ -66,11 +66,8 @@ angular.module('egCoreMod')
                     // URL, since it creates an intermediate path change.
                     // Instead, use the ham-fisted approach of killing any
                     // search args and applying the args we want.
-                    $window.location.href = 
-                        $window.location.href.replace(
-                            /(\?|\&).*/,
-                            '?set_eg_locale=' + encodeURIComponent(locale)
-                        );
+                    $window.location.href = egCore.env.basePath +
+                        '?set_eg_locale=' + encodeURIComponent(locale);
                 }
 
                 $scope.changeOperatorUndo = function() {
-- 
2.11.0