From ad4f70949f785357038f544dc8ee1764bd451a20 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 28 Nov 2019 16:00:41 +0300 Subject: [PATCH] [SSE] Sort dialog: add empty level when cells are not sorted --- .../spreadsheeteditor/main/app/view/SortDialog.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/SortDialog.js b/apps/spreadsheeteditor/main/app/view/SortDialog.js index fd8ad26eb..3d6a42f32 100644 --- a/apps/spreadsheeteditor/main/app/view/SortDialog.js +++ b/apps/spreadsheeteditor/main/app/view/SortDialog.js @@ -218,8 +218,9 @@ define([ 'text!spreadsheeteditor/main/app/template/SortDialog.template', refreshList: function(levels) { this.levels = []; + + var arr = []; if (levels) { - var arr = []; for (var i=0; i0) && this.sortList.selectByIndex(0); + } else { + 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(); },