[DE] Fix forms highlight color

This commit is contained in:
Julia Radzhabova 2020-10-07 16:22:59 +03:00
parent fa3b68e212
commit 31b4d48f45
2 changed files with 8 additions and 2 deletions

View file

@ -175,17 +175,20 @@ define([
},
onChangeSdtGlobalSettings: function() {
var show = this.api.asc_GetGlobalContentControlShowHighlight();
if (this.view && this.view.mnuFormsColorPicker) {
var show = this.api.asc_GetGlobalContentControlShowHighlight(),
clr;
this.view.mnuNoFormsColor.setChecked(!show, true);
this.view.mnuFormsColorPicker.clearSelection();
if (show){
var clr = this.api.asc_GetGlobalContentControlHighlightColor();
clr = this.api.asc_GetGlobalContentControlHighlightColor();
if (clr) {
clr = Common.Utils.ThemeColor.getHexColor(clr.get_r(), clr.get_g(), clr.get_b());
this.view.mnuFormsColorPicker.selectByRGB(clr, true);
}
}
this.view.btnHighlight.currentColor = clr;
$('.btn-color-value-line', this.view.btnHighlight.cmpEl).css('background-color', clr ? '#' + clr : 'transparent');
}
},

View file

@ -214,6 +214,9 @@ define([
me.mnuFormsColorPicker = new Common.UI.ThemeColorPalette({
el: $('#id-toolbar-menu-form-color')
});
var colorVal = $('<div class="btn-color-value-line"></div>');
$('button:first-child', me.btnHighlight.cmpEl).append(colorVal);
colorVal.css('background-color', me.btnHighlight.currentColor || 'transparent');
} else {
me.btnHighlight.cmpEl.parents('.group').hide().prev('.separator').hide();
}