[themes] refactoring. skip es6 syntax
This commit is contained in:
parent
9dbdea07c3
commit
e0f1100dbf
|
@ -228,13 +228,14 @@ define([
|
||||||
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()) {
|
for (var i of document.body.classList.entries()) {
|
||||||
if ( i[1].startsWith('theme-') && !i[1].startsWith('theme-type-') ) {
|
document.body.classList.forEach(function (classname, i, o) {
|
||||||
if ( themes_map[i[1]] ) {
|
if ( !theme_name && classname.startsWith('theme-') &&
|
||||||
theme_name = i[1];
|
!classname.startsWith('theme-type-') && themes_map[classname] )
|
||||||
|
{
|
||||||
|
theme_name = classname;
|
||||||
Common.localStorage.setItem('ui-theme-id', theme_name);
|
Common.localStorage.setItem('ui-theme-id', theme_name);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue