[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,12 +789,11 @@ 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'));
@ -802,7 +801,6 @@ define([
}
}
}
}
if (e.type !== 'click')
me.toolbar.btnInsertChart.menu.hide();
Common.NotificationCenter.trigger('edit:complete', this.toolbar);

View file

@ -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>')
});

View file

@ -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>')
});

View file

@ -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>')
})