From 2c5cecd31b3e7e21e27887093b6755594ad214ac Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 4 Aug 2021 18:08:17 +0300 Subject: [PATCH 1/2] [DE] Fix Bug 51727 --- apps/documenteditor/main/app/controller/Toolbar.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index 4975e0dcd..488da7081 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -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') { From 9d9ae009e38453bac5ac753e447ca8c2b942e4b6 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 4 Aug 2021 19:18:26 +0300 Subject: [PATCH 2/2] [DE] Fix Bug 51724 --- apps/documenteditor/main/app/view/TextToTableDialog.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/documenteditor/main/app/view/TextToTableDialog.js b/apps/documenteditor/main/app/view/TextToTableDialog.js index 8f6d0153e..a1d69eea2 100644 --- a/apps/documenteditor/main/app/view/TextToTableDialog.js +++ b/apps/documenteditor/main/app/view/TextToTableDialog.js @@ -247,7 +247,7 @@ define([ maxLength: 1, validateOnChange: true, validateOnBlur: false, - value: '-' + value: Common.Utils.InternalSettings.get("de-text-to-table-separator") || '-' }).on ('changing', function(input, newValue) { if (me.props && newValue) { me.props.put_SeparatorType(3, true); @@ -315,6 +315,7 @@ define([ if (this.props) { this.props.put_AutoFitType(this.rbFixed.getValue() ? 1 : (this.rbContents.getValue() ? 2 : 3)); this.rbFixed.getValue() && this.props.put_Fit(Common.Utils.Metric.fnRecalcToMM(this.spnWidth.getNumberValue())); + this.rbOther.getValue() && Common.Utils.InternalSettings.set("de-text-to-table-separator", String.fromCharCode(this.props.get_Separator())); } return this.props;