[SSE] Fix changing char type
This commit is contained in:
parent
24f8ec1bc8
commit
acc4cca3a0
|
@ -1379,6 +1379,14 @@ define([
|
||||||
config.msg = this.errorStockChart;
|
config.msg = this.errorStockChart;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case Asc.c_oAscError.ID.MaxDataSeriesError:
|
||||||
|
config.msg = this.getApplication().getController('Toolbar').errorMaxRows;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Asc.c_oAscError.ID.ComboSeriesError:
|
||||||
|
config.msg = this.getApplication().getController('Toolbar').errorComboSeries;
|
||||||
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscError.ID.DataRangeError:
|
case Asc.c_oAscError.ID.DataRangeError:
|
||||||
config.msg = this.errorDataRange;
|
config.msg = this.errorDataRange;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1088,32 +1088,36 @@ define([
|
||||||
var ischartedit = ( seltype == Asc.c_oAscSelectionType.RangeChart || seltype == Asc.c_oAscSelectionType.RangeChartText);
|
var ischartedit = ( seltype == Asc.c_oAscSelectionType.RangeChart || seltype == Asc.c_oAscSelectionType.RangeChartText);
|
||||||
props = me.api.asc_getChartObject(true); // don't lock chart object
|
props = me.api.asc_getChartObject(true); // don't lock chart object
|
||||||
if (props) {
|
if (props) {
|
||||||
(ischartedit) ? props.changeType(type) : props.putType(type);
|
if (ischartedit)
|
||||||
var range = props.getRange(),
|
props.changeType(type);
|
||||||
isvalid = (!_.isEmpty(range)) ? me.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Chart, range, true, props.getInRows(), props.getType()) : Asc.c_oAscError.ID.No;
|
else {
|
||||||
if (isvalid == Asc.c_oAscError.ID.No) {
|
props.putType(type);
|
||||||
!ischartedit && me.api.asc_addChartDrawingObject(props);
|
var range = props.getRange(),
|
||||||
} else {
|
isvalid = (!_.isEmpty(range)) ? me.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Chart, range, true, props.getInRows(), props.getType()) : Asc.c_oAscError.ID.No;
|
||||||
var msg = me.txtInvalidRange;
|
if (isvalid == Asc.c_oAscError.ID.No) {
|
||||||
switch (isvalid) {
|
me.api.asc_addChartDrawingObject(props);
|
||||||
case isvalid == Asc.c_oAscError.ID.StockChartError:
|
} else {
|
||||||
msg = me.errorStockChart;
|
var msg = me.txtInvalidRange;
|
||||||
break;
|
switch (isvalid) {
|
||||||
case isvalid == Asc.c_oAscError.ID.MaxDataSeriesError:
|
case Asc.c_oAscError.ID.StockChartError:
|
||||||
msg = me.errorMaxRows;
|
msg = me.errorStockChart;
|
||||||
break;
|
break;
|
||||||
case isvalid == Asc.c_oAscError.ID.ComboSeriesError:
|
case Asc.c_oAscError.ID.MaxDataSeriesError:
|
||||||
msg = me.errorComboSeries;
|
msg = me.errorMaxRows;
|
||||||
break;
|
break;
|
||||||
}
|
case Asc.c_oAscError.ID.ComboSeriesError:
|
||||||
Common.UI.warning({
|
msg = me.errorComboSeries;
|
||||||
msg: msg,
|
break;
|
||||||
callback: function() {
|
|
||||||
_.defer(function(btn) {
|
|
||||||
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
});
|
Common.UI.warning({
|
||||||
|
msg: msg,
|
||||||
|
callback: function() {
|
||||||
|
_.defer(function(btn) {
|
||||||
|
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue