[SSE] Use c_oAscSparklineType.

This commit is contained in:
Julia Radzhabova 2016-09-16 16:24:46 +03:00
parent 5924e4ff82
commit fee0e4362e
4 changed files with 17 additions and 19 deletions

View file

@ -789,17 +789,15 @@ define([
onSelectSpark: function(picker, item, record, e) { onSelectSpark: function(picker, item, record, e) {
if (!this.editMode) return; if (!this.editMode) return;
var me = this, info = me.api.asc_getCellInfo(); var me = this, info = me.api.asc_getCellInfo(), type = info.asc_getFlags().asc_getSelectionType();
if (info.asc_getFlags().asc_getSelectionType()!=Asc.c_oAscSelectionType.RangeImage) { if (type==Asc.c_oAscSelectionType.RangeCells || type==Asc.c_oAscSelectionType.RangeCol ||
var win, props; type==Asc.c_oAscSelectionType.RangeRow || type==Asc.c_oAscSelectionType.RangeMax) {
var props;
if (me.api){ if (me.api){
var ischartedit = ( info.asc_getFlags().asc_getSelectionType() == Asc.c_oAscSelectionType.RangeChart || info.asc_getFlags().asc_getSelectionType() == Asc.c_oAscSelectionType.RangeChartText); props = me.api.asc_getChartObject();
if (!ischartedit) { if (props) {
props = me.api.asc_getChartObject(); props.putType(record.get('type'));
if (props) { me.api.asc_addChartDrawingObject(props);
props.putType(record.get('type'));
me.api.asc_addChartDrawingObject(props);
}
} }
} }
} }

View file

@ -248,9 +248,9 @@ define([
{ id: 'menu-chart-group-sparkwin', caption: me.textWinLossSpark } { id: 'menu-chart-group-sparkwin', caption: me.textWinLossSpark }
]), ]),
store: new Common.UI.DataViewStore([ store: new Common.UI.DataViewStore([
{ group: 'menu-chart-group-sparkcolumn', type: Asc.ESparklineType.Column, allowSelected: true, iconCls: 'spark-column'}, { group: 'menu-chart-group-sparkcolumn', type: Asc.c_oAscSparklineType.Column, allowSelected: true, iconCls: 'spark-column'},
{ group: 'menu-chart-group-sparkline', type: Asc.ESparklineType.Line, allowSelected: true, iconCls: 'spark-line'}, { group: 'menu-chart-group-sparkline', type: Asc.c_oAscSparklineType.Line, allowSelected: true, iconCls: 'spark-line'},
{ group: 'menu-chart-group-sparkwin', type: Asc.ESparklineType.Stacked, allowSelected: true, iconCls: 'spark-win'} { 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>') itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist <%= iconCls %>"></div>')
}); });

View file

@ -827,9 +827,9 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
{ id: 'menu-chart-group-sparkwin', caption: me.textWinLossSpark } { id: 'menu-chart-group-sparkwin', caption: me.textWinLossSpark }
]), ]),
store: new Common.UI.DataViewStore([ 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-sparkcolumn', type: Asc.c_oAscSparklineType.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-sparkline', type: Asc.c_oAscSparklineType.Line, allowSelected: true, iconCls: 'spark-line'},
{ group: 'menu-chart-group-sparkwin', type: Asc.ESparklineType.Stacked, allowSelected: true, iconCls: 'spark-win'} { 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>') itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist <%= iconCls %>"></div>')
}); });

View file

@ -736,9 +736,9 @@ define([
{ id: 'menu-chart-group-sparkwin', caption: me.textWinLossSpark } { id: 'menu-chart-group-sparkwin', caption: me.textWinLossSpark }
]), ]),
store: new Common.UI.DataViewStore([ store: new Common.UI.DataViewStore([
{ group: 'menu-chart-group-sparkcolumn', type: Asc.ESparklineType.Column, allowSelected: true, iconCls: 'spark-column'}, { group: 'menu-chart-group-sparkcolumn', type: Asc.c_oAscSparklineType.Column, allowSelected: true, iconCls: 'spark-column'},
{ group: 'menu-chart-group-sparkline', type: Asc.ESparklineType.Line, allowSelected: true, iconCls: 'spark-line'}, { group: 'menu-chart-group-sparkline', type: Asc.c_oAscSparklineType.Line, allowSelected: true, iconCls: 'spark-line'},
{ group: 'menu-chart-group-sparkwin', type: Asc.ESparklineType.Stacked, allowSelected: true, iconCls: 'spark-win'} { 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>') itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist <%= iconCls %>"></div>')
}) })