Refactoring

This commit is contained in:
AlexeyMatveev686 2021-04-16 16:33:38 +03:00
parent 6442423a03
commit fb037548a2
2 changed files with 7 additions and 7 deletions

View file

@ -101,7 +101,7 @@ define([
el: $window.find('#id-table-text-radio-semi'), el: $window.find('#id-table-text-radio-semi'),
labelText: this.textSemicolon, labelText: this.textSemicolon,
name: 'asc-radio-table-text-separator', name: 'asc-radio-table-text-separator',
value: ',' value: ';'
}).on('change', _.bind(this.onRadioSeparatorChange, this)); }).on('change', _.bind(this.onRadioSeparatorChange, this));
this.rbOther = new Common.UI.RadioBox({ this.rbOther = new Common.UI.RadioBox({
@ -166,7 +166,7 @@ define([
getSettings: function() { getSettings: function() {
var type = this.rbPara.getValue() ? 1 : (this.rbTabs.getValue() ? 2 : 3), 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'}; return {type: type, separator: separator, nested: this.chNested.getValue()==='checked'};
}, },

View file

@ -231,7 +231,7 @@ define([
el: $window.find('#id-text-table-radio-semi'), el: $window.find('#id-text-table-radio-semi'),
labelText: this.textSemicolon, labelText: this.textSemicolon,
name: 'asc-radio-text-table-separator', name: 'asc-radio-text-table-separator',
value: ',' value: ';'
}).on('change', _.bind(this.onRadioSeparatorChange, this)); }).on('change', _.bind(this.onRadioSeparatorChange, this));
this.rbOther = new Common.UI.RadioBox({ this.rbOther = new Common.UI.RadioBox({
@ -298,7 +298,7 @@ define([
break; break;
case 3: case 3:
val = String.fromCharCode(props.get_Separator()); val = String.fromCharCode(props.get_Separator());
if (val == ',') { if (val == ';') {
this.rbSemi.setValue(true, true); this.rbSemi.setValue(true, true);
this.inputOther.setDisabled(true); this.inputOther.setDisabled(true);
} else { } else {
@ -317,7 +317,7 @@ define([
this.rbFixed.getValue() && this.props.put_Fit(Common.Utils.Metric.fnRecalcToMM(this.spnWidth.getNumberValue())); this.rbFixed.getValue() && this.props.put_Fit(Common.Utils.Metric.fnRecalcToMM(this.spnWidth.getNumberValue()));
} }
return {props: this.props}; return this.props;
}, },
onDlgBtnClick: function(event) { onDlgBtnClick: function(event) {
@ -365,14 +365,14 @@ define([
if (newValue && this.props) { if (newValue && this.props) {
this.inputOther.setDisabled(value!==3); this.inputOther.setDisabled(value!==3);
if (typeof value === 'string') { if (typeof value === 'string') {
this.props.put_SeparatorType(3, true);
size = this.props.put_Separator(value.charCodeAt(0), true); size = this.props.put_Separator(value.charCodeAt(0), true);
} else { } else {
size = this.props.put_SeparatorType(value, true);
if (value==3) { if (value==3) {
if (this.inputOther.getValue()) if (this.inputOther.getValue())
size = this.props.put_Separator(this.inputOther.getValue().charCodeAt(0), true); size = this.props.put_Separator(this.inputOther.getValue().charCodeAt(0), true);
setTimeout(function(){ me.inputOther.focus(); }, 1); setTimeout(function(){ me.inputOther.focus(); }, 1);
} else {
size = this.props.put_SeparatorType(value, true);
} }
} }
if (size) { if (size) {