[themes] refactoring. skip es6 syntax
This commit is contained in:
parent
6bc4ef744f
commit
b2777666b8
|
@ -249,12 +249,11 @@ define([
|
||||||
var theme_name = get_ui_theme_name(Common.localStorage.getItem('ui-theme'));
|
var theme_name = get_ui_theme_name(Common.localStorage.getItem('ui-theme'));
|
||||||
if ( !theme_name ) {
|
if ( !theme_name ) {
|
||||||
if ( !(Common.Utils.isIE10 || Common.Utils.isIE11) )
|
if ( !(Common.Utils.isIE10 || Common.Utils.isIE11) )
|
||||||
for (var i of document.body.classList.entries()) {
|
document.body.classList.forEach(function (classname, i, o) {
|
||||||
if ( i[1].startsWith('theme-') && !i[1].startsWith('theme-type-') ) {
|
if ( !theme_name && classname.startsWith('theme-') && !classname.startsWith('theme-type-') ) {
|
||||||
theme_name = i[1];
|
theme_name = classname;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !themes_map[theme_name] )
|
if ( !themes_map[theme_name] )
|
||||||
|
|
Loading…
Reference in a new issue