[DE] For Bug 48107

This commit is contained in:
Julia Radzhabova 2020-12-25 16:46:01 +03:00
parent 35daa006d6
commit afff49e838
2 changed files with 8 additions and 5 deletions

View file

@ -1015,13 +1015,13 @@ define([
onChangeSdtGlobalSettings: function() {
var show = this.api.asc_GetGlobalContentControlShowHighlight();
this.toolbar.mnuNoControlsColor.setChecked(!show, true);
this.toolbar.mnuControlsColorPicker.clearSelection();
this.toolbar.mnuNoControlsColor && this.toolbar.mnuNoControlsColor.setChecked(!show, true);
this.toolbar.mnuControlsColorPicker && this.toolbar.mnuControlsColorPicker.clearSelection();
if (show){
var clr = this.api.asc_GetGlobalContentControlHighlightColor();
if (clr) {
clr = Common.Utils.ThemeColor.getHexColor(clr.get_r(), clr.get_g(), clr.get_b());
this.toolbar.mnuControlsColorPicker.selectByRGB(clr, true);
this.toolbar.mnuControlsColorPicker && this.toolbar.mnuControlsColorPicker.selectByRGB(clr, true);
}
}
},
@ -3101,6 +3101,7 @@ define([
me.toolbar.addTab(tab, $panel, 4);
me.toolbar.setVisible('forms', true);
Array.prototype.push.apply(me.toolbar.toolbarControls, forms.getView('FormsTab').getButtons());
me.onChangeSdtGlobalSettings();
}
}
},

View file

@ -204,7 +204,8 @@ define([
me.mnuNoFormsColor = new Common.UI.MenuItem({
id: 'id-toolbar-menu-no-highlight-form',
caption: me.textNoHighlight,
checkable: true
checkable: true,
checked: me.btnHighlight.currentColor === null
}),
{caption: '--'},
{template: _.template('<div id="id-toolbar-menu-form-color" style="width: 169px; height: 94px; margin: 10px;"></div>')},
@ -217,7 +218,8 @@ define([
'808000', '00FF00', '008080', '0000FF', '666699', '808080', 'FF0000', 'FF9900', '99CC00', '339966',
'33CCCC', '3366FF', '800080', '999999', 'FF00FF', 'FFCC00', 'FFFF00', '00FF00', '00FFFF', '00CCFF',
'993366', 'C0C0C0', 'FF99CC', 'FFCC99', 'FFFF99', 'CCFFCC', 'CCFFFF', '99CCFF', 'CC99FF', 'FFFFFF'
]
],
value: me.btnHighlight.currentColor
});
var colorVal = $('<div class="btn-color-value-line"></div>');
$('button:first-child', me.btnHighlight.cmpEl).append(colorVal);