[all] fix bug 49030
This commit is contained in:
parent
a214a9d75b
commit
ecc19e0c62
|
@ -18,6 +18,9 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
THEME_LIGHT_ID: 'theme-light',
|
||||||
|
THEME_DARK_ID: 'theme-dark',
|
||||||
|
|
||||||
init: function (api) {
|
init: function (api) {
|
||||||
var me = this;
|
var me = this;
|
||||||
$(window).on('storage', function (e) {
|
$(window).on('storage', function (e) {
|
||||||
|
@ -49,7 +52,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
current: function () {
|
current: function () {
|
||||||
return Common.localStorage.getItem('ui-theme', 'theme-light');
|
return Common.localStorage.getItem('ui-theme') || 'theme-light';
|
||||||
},
|
},
|
||||||
|
|
||||||
isDarkTheme: function () {
|
isDarkTheme: function () {
|
||||||
|
|
|
@ -465,8 +465,8 @@ define([
|
||||||
editable : false,
|
editable : false,
|
||||||
cls : 'input-group-nr',
|
cls : 'input-group-nr',
|
||||||
data : [
|
data : [
|
||||||
{ value: 'theme-light', displayValue: this.txtThemeLight },
|
{ value: Common.UI.Themes.THEME_LIGHT_ID, displayValue: this.txtThemeLight },
|
||||||
{ value: 'theme-dark', displayValue: this.txtThemeDark }
|
{ value: Common.UI.Themes.THEME_DARK_ID, displayValue: this.txtThemeDark }
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -601,7 +601,7 @@ define([
|
||||||
this.chPaste.setValue(Common.Utils.InternalSettings.get("de-settings-paste-button"));
|
this.chPaste.setValue(Common.Utils.InternalSettings.get("de-settings-paste-button"));
|
||||||
|
|
||||||
item = this.cmbTheme.store.findWhere({value: Common.UI.Themes.current()});
|
item = this.cmbTheme.store.findWhere({value: Common.UI.Themes.current()});
|
||||||
this.cmbTheme.setValue(item ? item.get('value') : 0);
|
this.cmbTheme.setValue(item ? item.get('value') : Common.UI.Themes.THEME_LIGHT_ID);
|
||||||
},
|
},
|
||||||
|
|
||||||
applySettings: function() {
|
applySettings: function() {
|
||||||
|
|
|
@ -404,8 +404,8 @@ define([
|
||||||
editable : false,
|
editable : false,
|
||||||
cls : 'input-group-nr',
|
cls : 'input-group-nr',
|
||||||
data : [
|
data : [
|
||||||
{ value: 'theme-light', displayValue: this.txtThemeLight },
|
{ value: Common.UI.Themes.THEME_LIGHT_ID, displayValue: this.txtThemeLight },
|
||||||
{ value: 'theme-dark', displayValue: this.txtThemeDark }
|
{ value: Common.UI.Themes.THEME_DARK_ID, displayValue: this.txtThemeDark }
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -530,7 +530,7 @@ define([
|
||||||
this.chPaste.setValue(Common.Utils.InternalSettings.get("pe-settings-paste-button"));
|
this.chPaste.setValue(Common.Utils.InternalSettings.get("pe-settings-paste-button"));
|
||||||
|
|
||||||
item = this.cmbTheme.store.findWhere({value: Common.UI.Themes.current()});
|
item = this.cmbTheme.store.findWhere({value: Common.UI.Themes.current()});
|
||||||
this.cmbTheme.setValue(item ? item.get('value') : 0);
|
this.cmbTheme.setValue(item ? item.get('value') : Common.UI.Themes.THEME_LIGHT_ID);
|
||||||
},
|
},
|
||||||
|
|
||||||
applySettings: function() {
|
applySettings: function() {
|
||||||
|
|
|
@ -1010,8 +1010,8 @@ define([
|
||||||
editable : false,
|
editable : false,
|
||||||
cls : 'input-group-nr',
|
cls : 'input-group-nr',
|
||||||
data : [
|
data : [
|
||||||
{ value: 'theme-light', displayValue: this.txtThemeLight },
|
{ value: Common.UI.Themes.THEME_LIGHT_ID, displayValue: this.txtThemeLight },
|
||||||
{ value: 'theme-dark', displayValue: this.txtThemeDark }
|
{ value: Common.UI.Themes.THEME_DARK_ID, displayValue: this.txtThemeDark }
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1176,7 +1176,7 @@ define([
|
||||||
this.chPaste.setValue(Common.Utils.InternalSettings.get("sse-settings-paste-button"));
|
this.chPaste.setValue(Common.Utils.InternalSettings.get("sse-settings-paste-button"));
|
||||||
|
|
||||||
item = this.cmbTheme.store.findWhere({value: Common.UI.Themes.current()});
|
item = this.cmbTheme.store.findWhere({value: Common.UI.Themes.current()});
|
||||||
this.cmbTheme.setValue(item ? item.get('value') : 0);
|
this.cmbTheme.setValue(item ? item.get('value') : Common.UI.Themes.THEME_LIGHT_ID);
|
||||||
},
|
},
|
||||||
|
|
||||||
applySettings: function() {
|
applySettings: function() {
|
||||||
|
|
Loading…
Reference in a new issue