[DE] Fix Bug 51727

This commit is contained in:
Julia Radzhabova 2021-08-04 18:08:17 +03:00
parent 7211050c0d
commit 2c5cecd31b

View file

@ -323,6 +323,7 @@ define([
toolbar.btnShowHidenChars.on('toggle', _.bind(this.onNonPrintingToggle, this));
toolbar.mnuTablePicker.on('select', _.bind(this.onTablePickerSelect, this));
toolbar.mnuInsertTable.on('item:click', _.bind(this.onInsertTableClick, this));
toolbar.mnuInsertTable.on('show:after', _.bind(this.onInsertTableShow, this));
toolbar.mnuInsertImage.on('item:click', _.bind(this.onInsertImageClick, this));
toolbar.btnInsertText.on('click', _.bind(this.onBtnInsertTextClick, this));
toolbar.btnInsertShape.menu.on('hide:after', _.bind(this.onInsertShapeHide, this));
@ -1525,6 +1526,11 @@ define([
Common.component.Analytics.trackEvent('ToolBar', 'Table');
},
onInsertTableShow: function(menu) {
var selected = this.api.asc_GetSelectedText();
menu.items[4].setDisabled(!selected || selected.length<1);
},
onInsertTableClick: function(menu, item, e) {
var me = this;
if (item.value === 'custom') {