This commit is contained in:
Christophe Maudoux 2020-04-13 21:36:09 +02:00
parent 6fc460572e
commit 8afbd2214d
4 changed files with 8 additions and 7 deletions

View File

@ -301,8 +301,9 @@ $(window).on 'load', () ->
# 2 - first navigator.languages item that exists in window.availableLanguages
# 3 - first value of window.availableLanguages
queryString = window.location.search
console.log 'Parsed queryString:', queryString
urlParams = new URLSearchParams queryString if queryString
if queryString
console.log 'Parsed queryString:', queryString
urlParams = new URLSearchParams queryString
if urlParams
queryLang = urlParams.get('llnglanguage')
console.log 'Get lang from parameter' if queryLang
@ -341,7 +342,7 @@ $(window).on 'load', () ->
if queryLang
console.log 'Selected lang ->', queryLang
if setCookieLang
console.log 'Set lang ->', querylang
console.log 'Set lang ->', queryLang
setCookie 'llnglanguage', queryLang
translatePage(queryLang)
else

View File

@ -284,8 +284,8 @@ LemonLDAP::NG Portal jQuery scripts
$("p.removeOther a").attr("href", link);
}
queryString = window.location.search;
console.log('Parsed queryString:', queryString);
if (queryString) {
console.log('Parsed queryString:', queryString);
urlParams = new URLSearchParams(queryString);
}
if (urlParams) {
@ -352,7 +352,7 @@ LemonLDAP::NG Portal jQuery scripts
if (queryLang) {
console.log('Selected lang ->', queryLang);
if (setCookieLang) {
console.log('Set lang ->', querylang);
console.log('Set lang ->', queryLang);
setCookie('llnglanguage', queryLang);
}
translatePage(queryLang);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long