From fb037548a21f93110ba577a7596ed76fc2b46cab Mon Sep 17 00:00:00 2001 From: AlexeyMatveev686 Date: Fri, 16 Apr 2021 16:33:38 +0300 Subject: [PATCH] Refactoring --- apps/documenteditor/main/app/view/TableToTextDialog.js | 4 ++-- apps/documenteditor/main/app/view/TextToTableDialog.js | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/documenteditor/main/app/view/TableToTextDialog.js b/apps/documenteditor/main/app/view/TableToTextDialog.js index 0cc4e2ca3..40ac3fa2a 100644 --- a/apps/documenteditor/main/app/view/TableToTextDialog.js +++ b/apps/documenteditor/main/app/view/TableToTextDialog.js @@ -101,7 +101,7 @@ define([ el: $window.find('#id-table-text-radio-semi'), labelText: this.textSemicolon, name: 'asc-radio-table-text-separator', - value: ',' + value: ';' }).on('change', _.bind(this.onRadioSeparatorChange, this)); this.rbOther = new Common.UI.RadioBox({ @@ -166,7 +166,7 @@ define([ getSettings: function() { var type = this.rbPara.getValue() ? 1 : (this.rbTabs.getValue() ? 2 : 3), - separator = this.rbSemi.getValue() ? ','.charCodeAt(0) : (this.rbOther.getValue() ? this.inputOther.getValue().charCodeAt(0) : undefined); + separator = this.rbSemi.getValue() ? ';'.charCodeAt(0) : (this.rbOther.getValue() ? this.inputOther.getValue().charCodeAt(0) : undefined); return {type: type, separator: separator, nested: this.chNested.getValue()==='checked'}; }, diff --git a/apps/documenteditor/main/app/view/TextToTableDialog.js b/apps/documenteditor/main/app/view/TextToTableDialog.js index 823fe422f..8a83b4238 100644 --- a/apps/documenteditor/main/app/view/TextToTableDialog.js +++ b/apps/documenteditor/main/app/view/TextToTableDialog.js @@ -231,7 +231,7 @@ define([ el: $window.find('#id-text-table-radio-semi'), labelText: this.textSemicolon, name: 'asc-radio-text-table-separator', - value: ',' + value: ';' }).on('change', _.bind(this.onRadioSeparatorChange, this)); this.rbOther = new Common.UI.RadioBox({ @@ -298,7 +298,7 @@ define([ break; case 3: val = String.fromCharCode(props.get_Separator()); - if (val == ',') { + if (val == ';') { this.rbSemi.setValue(true, true); this.inputOther.setDisabled(true); } else { @@ -317,7 +317,7 @@ define([ this.rbFixed.getValue() && this.props.put_Fit(Common.Utils.Metric.fnRecalcToMM(this.spnWidth.getNumberValue())); } - return {props: this.props}; + return this.props; }, onDlgBtnClick: function(event) { @@ -365,14 +365,14 @@ define([ if (newValue && this.props) { this.inputOther.setDisabled(value!==3); if (typeof value === 'string') { - this.props.put_SeparatorType(3, true); size = this.props.put_Separator(value.charCodeAt(0), true); } else { - size = this.props.put_SeparatorType(value, true); if (value==3) { if (this.inputOther.getValue()) size = this.props.put_Separator(this.inputOther.getValue().charCodeAt(0), true); setTimeout(function(){ me.inputOther.focus(); }, 1); + } else { + size = this.props.put_SeparatorType(value, true); } } if (size) {