Skip to content

Commit

Permalink
For #546 - fixed incorrect relocation from mobile version to desktop …
Browse files Browse the repository at this point in the history
…if locale is set to 'en'
  • Loading branch information
vitalidze committed Apr 23, 2016
1 parent 93e23ee commit 6e393c7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/webapp/m/js/traccar-mobile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 6e393c7

Please sign in to comment.