mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-02-10 18:05:32 +08:00
Fix bug when theme colors are not loaded
This commit is contained in:
@ -3634,6 +3634,7 @@ define([
|
||||
var clr;
|
||||
|
||||
var effectcolors = Common.Utils.ThemeColor.getEffectColors();
|
||||
if (!effectcolors) return;
|
||||
for (var i = 0; i < effectcolors.length; i++) {
|
||||
if (typeof(picker.currentColor) == 'object' &&
|
||||
clr === undefined &&
|
||||
@ -3652,7 +3653,7 @@ define([
|
||||
|
||||
updateColors(this.toolbar.mnuFontColorPicker, 1);
|
||||
if (this.toolbar.btnFontColor.currentColor===undefined || !this.toolbar.btnFontColor.currentColor.isAuto) {
|
||||
this.toolbar.btnFontColor.currentColor = this.toolbar.mnuFontColorPicker.currentColor.color || this.toolbar.mnuFontColorPicker.currentColor;
|
||||
this.toolbar.btnFontColor.currentColor = this.toolbar.mnuFontColorPicker.currentColor ? this.toolbar.mnuFontColorPicker.currentColor.color || this.toolbar.mnuFontColorPicker.currentColor : this.toolbar.mnuFontColorPicker.currentColor;
|
||||
this.toolbar.btnFontColor.setColor(this.toolbar.btnFontColor.currentColor);
|
||||
}
|
||||
if (this._state.clrtext_asccolor!==undefined) {
|
||||
@ -3662,7 +3663,7 @@ define([
|
||||
this._state.clrtext_asccolor = undefined;
|
||||
|
||||
updateColors(this.toolbar.mnuParagraphColorPicker, 0);
|
||||
this.toolbar.btnParagraphColor.currentColor = this.toolbar.mnuParagraphColorPicker.currentColor.color || this.toolbar.mnuParagraphColorPicker.currentColor;
|
||||
this.toolbar.btnParagraphColor.currentColor = this.toolbar.mnuParagraphColorPicker.currentColor ? this.toolbar.mnuParagraphColorPicker.currentColor.color || this.toolbar.mnuParagraphColorPicker.currentColor : this.toolbar.mnuParagraphColorPicker.currentColor;
|
||||
this.toolbar.btnParagraphColor.setColor(this.toolbar.btnParagraphColor.currentColor);
|
||||
if (this._state.clrshd_asccolor!==undefined) {
|
||||
this._state.clrback = undefined;
|
||||
|
||||
Reference in New Issue
Block a user