[SSE] Sort dialog: add empty level when cells are not sorted
This commit is contained in:
parent
308aab692f
commit
ad4f70949f
|
@ -218,8 +218,9 @@ define([ 'text!spreadsheeteditor/main/app/template/SortDialog.template',
|
||||||
|
|
||||||
refreshList: function(levels) {
|
refreshList: function(levels) {
|
||||||
this.levels = [];
|
this.levels = [];
|
||||||
|
|
||||||
|
var arr = [];
|
||||||
if (levels) {
|
if (levels) {
|
||||||
var arr = [];
|
|
||||||
for (var i=0; i<levels.length; i++) {
|
for (var i=0; i<levels.length; i++) {
|
||||||
var level = levels[i],
|
var level = levels[i],
|
||||||
levelProps = this.props.asc_getLevelProps(level.asc_getIndex()),
|
levelProps = this.props.asc_getLevelProps(level.asc_getIndex()),
|
||||||
|
@ -254,9 +255,17 @@ define([ 'text!spreadsheeteditor/main/app/template/SortDialog.template',
|
||||||
color_data: color_data
|
color_data: color_data
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
this.sortList.store.reset(arr);
|
} else {
|
||||||
(this.sortList.store.length>0) && this.sortList.selectByIndex(0);
|
arr.push({
|
||||||
|
columnIndex: null,
|
||||||
|
levelIndex: 0,
|
||||||
|
sort: Asc.c_oAscSortOptions.ByValue,
|
||||||
|
order: Asc.c_oAscSortOptions.Ascending
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
this.sortList.store.reset(arr);
|
||||||
|
(this.sortList.store.length>0) && this.sortList.selectByIndex(0);
|
||||||
|
|
||||||
this.updateButtons();
|
this.updateButtons();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue