[SSE] Use c_oAscSparklineType.
This commit is contained in:
parent
5924e4ff82
commit
fee0e4362e
|
@ -789,17 +789,15 @@ define([
|
|||
|
||||
onSelectSpark: function(picker, item, record, e) {
|
||||
if (!this.editMode) return;
|
||||
var me = this, info = me.api.asc_getCellInfo();
|
||||
if (info.asc_getFlags().asc_getSelectionType()!=Asc.c_oAscSelectionType.RangeImage) {
|
||||
var win, props;
|
||||
var me = this, info = me.api.asc_getCellInfo(), type = info.asc_getFlags().asc_getSelectionType();
|
||||
if (type==Asc.c_oAscSelectionType.RangeCells || type==Asc.c_oAscSelectionType.RangeCol ||
|
||||
type==Asc.c_oAscSelectionType.RangeRow || type==Asc.c_oAscSelectionType.RangeMax) {
|
||||
var props;
|
||||
if (me.api){
|
||||
var ischartedit = ( info.asc_getFlags().asc_getSelectionType() == Asc.c_oAscSelectionType.RangeChart || info.asc_getFlags().asc_getSelectionType() == Asc.c_oAscSelectionType.RangeChartText);
|
||||
if (!ischartedit) {
|
||||
props = me.api.asc_getChartObject();
|
||||
if (props) {
|
||||
props.putType(record.get('type'));
|
||||
me.api.asc_addChartDrawingObject(props);
|
||||
}
|
||||
props = me.api.asc_getChartObject();
|
||||
if (props) {
|
||||
props.putType(record.get('type'));
|
||||
me.api.asc_addChartDrawingObject(props);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -248,9 +248,9 @@ define([
|
|||
{ id: 'menu-chart-group-sparkwin', caption: me.textWinLossSpark }
|
||||
]),
|
||||
store: new Common.UI.DataViewStore([
|
||||
{ group: 'menu-chart-group-sparkcolumn', type: Asc.ESparklineType.Column, allowSelected: true, iconCls: 'spark-column'},
|
||||
{ group: 'menu-chart-group-sparkline', type: Asc.ESparklineType.Line, allowSelected: true, iconCls: 'spark-line'},
|
||||
{ group: 'menu-chart-group-sparkwin', type: Asc.ESparklineType.Stacked, allowSelected: true, iconCls: 'spark-win'}
|
||||
{ group: 'menu-chart-group-sparkcolumn', type: Asc.c_oAscSparklineType.Column, allowSelected: true, iconCls: 'spark-column'},
|
||||
{ group: 'menu-chart-group-sparkline', type: Asc.c_oAscSparklineType.Line, allowSelected: true, iconCls: 'spark-line'},
|
||||
{ group: 'menu-chart-group-sparkwin', type: Asc.c_oAscSparklineType.Stacked, allowSelected: true, iconCls: 'spark-win'}
|
||||
]),
|
||||
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist <%= iconCls %>"></div>')
|
||||
});
|
||||
|
|
|
@ -827,9 +827,9 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
|
|||
{ id: 'menu-chart-group-sparkwin', caption: me.textWinLossSpark }
|
||||
]),
|
||||
store: new Common.UI.DataViewStore([
|
||||
{ group: 'menu-chart-group-sparkcolumn', type: Asc.ESparklineType.Column, allowSelected: true, iconCls: 'spark-column', selected: true},
|
||||
{ group: 'menu-chart-group-sparkline', type: Asc.ESparklineType.Line, allowSelected: true, iconCls: 'spark-line'},
|
||||
{ group: 'menu-chart-group-sparkwin', type: Asc.ESparklineType.Stacked, allowSelected: true, iconCls: 'spark-win'}
|
||||
{ group: 'menu-chart-group-sparkcolumn', type: Asc.c_oAscSparklineType.Column, allowSelected: true, iconCls: 'spark-column', selected: true},
|
||||
{ group: 'menu-chart-group-sparkline', type: Asc.c_oAscSparklineType.Line, allowSelected: true, iconCls: 'spark-line'},
|
||||
{ group: 'menu-chart-group-sparkwin', type: Asc.c_oAscSparklineType.Stacked, allowSelected: true, iconCls: 'spark-win'}
|
||||
]),
|
||||
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist <%= iconCls %>"></div>')
|
||||
});
|
||||
|
|
|
@ -736,9 +736,9 @@ define([
|
|||
{ id: 'menu-chart-group-sparkwin', caption: me.textWinLossSpark }
|
||||
]),
|
||||
store: new Common.UI.DataViewStore([
|
||||
{ group: 'menu-chart-group-sparkcolumn', type: Asc.ESparklineType.Column, allowSelected: true, iconCls: 'spark-column'},
|
||||
{ group: 'menu-chart-group-sparkline', type: Asc.ESparklineType.Line, allowSelected: true, iconCls: 'spark-line'},
|
||||
{ group: 'menu-chart-group-sparkwin', type: Asc.ESparklineType.Stacked, allowSelected: true, iconCls: 'spark-win'}
|
||||
{ group: 'menu-chart-group-sparkcolumn', type: Asc.c_oAscSparklineType.Column, allowSelected: true, iconCls: 'spark-column'},
|
||||
{ group: 'menu-chart-group-sparkline', type: Asc.c_oAscSparklineType.Line, allowSelected: true, iconCls: 'spark-line'},
|
||||
{ group: 'menu-chart-group-sparkwin', type: Asc.c_oAscSparklineType.Stacked, allowSelected: true, iconCls: 'spark-win'}
|
||||
]),
|
||||
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist <%= iconCls %>"></div>')
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue