From 6e393c757aee081b3e74d69d45574ff0ec8c43ea Mon Sep 17 00:00:00 2001 From: Vitaly Litvak Date: Sat, 23 Apr 2016 12:29:22 +0300 Subject: [PATCH] For #546 - fixed incorrect relocation from mobile version to desktop if locale is set to 'en' --- src/main/webapp/m/js/traccar-mobile.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/m/js/traccar-mobile.js b/src/main/webapp/m/js/traccar-mobile.js index 68da97ed..f711184c 100644 --- a/src/main/webapp/m/js/traccar-mobile.js +++ b/src/main/webapp/m/js/traccar-mobile.js @@ -143,7 +143,13 @@ myApp.onPageInit('login-screen', function (page) { // set up open desktop version action pageContainer.find('.open-desktop-version').on('click', function() { - window.location = '../?' + (locale == null ? '' : 'locale=' + locale + '&') + 'nomobileredirect=1'; + var localeParam = locale == null ? '' + : locale == 'en' ? 'default' + : locale; + if (localeParam != '') { + localeParam = 'locale=' + localeParam + '&'; + } + window.location = '../?' + localeParam + 'nomobileredirect=1'; }); pageContainer.find('#form-login').on('submit', function(e) {