mirror of
https://github.com/unraid/webgui.git
synced 2026-01-04 16:40:21 -06:00
Display: reset dashboard tiles when switching language
This commit is contained in:
@@ -23,13 +23,6 @@ $(function(){$('.nav-item.LanguageButton').hide();});
|
||||
|
||||
function LanguageButton() {
|
||||
var locale = '<?=$locale?>';
|
||||
if (locale) {
|
||||
switchLanguage('');
|
||||
$.cookie('locale',locale);
|
||||
} else {
|
||||
switchLanguage($.cookie('locale'));
|
||||
$.removeCookie('locale');
|
||||
}
|
||||
// reset dashboard tiles when switching language
|
||||
if (locale != ($.cookie('locale')||'')) {
|
||||
$.removeCookie('db-box1');
|
||||
@@ -38,6 +31,13 @@ function LanguageButton() {
|
||||
$.removeCookie('inactive_content');
|
||||
$.removeCookie('hidden_content');
|
||||
}
|
||||
if (locale) {
|
||||
switchLanguage('');
|
||||
$.cookie('locale',locale);
|
||||
} else {
|
||||
switchLanguage($.cookie('locale'));
|
||||
$.removeCookie('locale');
|
||||
}
|
||||
}
|
||||
|
||||
function switchLanguage(lang) {
|
||||
|
||||
Reference in New Issue
Block a user