[SSE] Fix format settings for axis

This commit is contained in:
Julia Radzhabova 2020-12-08 12:09:16 +03:00
parent ca01b519f9
commit a5aadac49d
2 changed files with 10 additions and 3 deletions

View file

@ -1700,7 +1700,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
} }
}, },
linked: true, linked: true,
props : {format: fmt.getFormatCode(), formatInfo: fmt.getFormatCellsInfo(), langId: value, linked: fmt.getSourceLinked()} props : {format: fmt.getFormatCode(), formatInfo: fmt.getFormatCellsInfo(), langId: value, chartFormat: fmt}
})).on('close', function() { })).on('close', function() {
me._isEditFormat && me.chartSettings.cancelEditData(); me._isEditFormat && me.chartSettings.cancelEditData();
me._isEditFormat = false; me._isEditFormat = false;

View file

@ -262,8 +262,13 @@ define([
el: $('#format-settings-chk-linked'), el: $('#format-settings-chk-linked'),
labelText: this.textLinked labelText: this.textLinked
}).on ('change', function (field, newValue, oldValue, eOpts) { }).on ('change', function (field, newValue, oldValue, eOpts) {
if (field.getValue()=='checked') me.props.linked = (field.getValue()=='checked');
if (me.props.linked) {
me.props.chartFormat.putSourceLinked(true);
me.props.format = me.props.chartFormat.getFormatCode();
me.props.formatInfo = me.props.chartFormat.getFormatCellsInfo();
me._setDefaults(me.props); me._setDefaults(me.props);
}
}); });
this.chLinked.setVisible(this.linked); this.chLinked.setVisible(this.linked);
@ -339,7 +344,9 @@ define([
// for date/time - if props.format not in cmbType - setValue(this.api.asc_getLocaleExample(props.format, 38822)) // for date/time - if props.format not in cmbType - setValue(this.api.asc_getLocaleExample(props.format, 38822))
// for cmbNegative - if props.format not in cmbNegative - setValue(this.api.asc_getLocaleExample(props.format)) // for cmbNegative - if props.format not in cmbNegative - setValue(this.api.asc_getLocaleExample(props.format))
} }
props && this.chLinked.setValue(!!props.linked, true); if (props && props.chartFormat) {
this.chLinked.setValue(!!props.chartFormat.getSourceLinked(), true);
}
}, },
getSettings: function () { getSettings: function () {