[SSE] Add min, max to status bar

This commit is contained in:
Julia Radzhabova 2019-02-28 11:31:15 +03:00
parent 9b4f84cf89
commit 37df45af5a
4 changed files with 12 additions and 0 deletions

View file

@ -184,6 +184,8 @@ define([
this.statusbar.setMathInfo({
count : info.asc_getCount(),
average : info.asc_getAverage(),
min : info.asc_getMin(),
max : info.asc_getMax(),
sum : info.asc_getSum()
});
this.statusbar.updateTabbarBorders();

View file

@ -23,6 +23,8 @@
<div class="separator short" style="margin-right: 12px;" />
<label id="status-math-average">AVERAGE: 10</label>
<label id="status-math-count">COUNT: 3</label>
<label id="status-math-min">MIN: 1</label>
<label id="status-math-max">MAX: 5</label>
<label id="status-math-sum">SUM: 5</label>
</div>
<div id="status-filtered-box" class="status-group">

View file

@ -276,6 +276,8 @@ define([
this.labelSum = $('#status-math-sum', this.boxMath);
this.labelCount = $('#status-math-count', this.boxMath);
this.labelAverage = $('#status-math-average', this.boxMath);
this.labelMin = $('#status-math-min', this.boxMath);
this.labelMax = $('#status-math-max', this.boxMath);
this.boxMath.hide();
this.boxFiltered = $('#status-filtered-box', this.el);
@ -366,6 +368,8 @@ define([
if (info.count>1) {
if (!this.boxMath.is(':visible')) this.boxMath.show();
this.labelCount.text(this.textCount + ': ' + info.count);
this.labelMin.text((info.min && info.min.length) ? (this.textMin + ': ' + info.min) : '');
this.labelMax.text((info.max && info.max.length) ? (this.textMax + ': ' + info.max) : '');
this.labelSum.text((info.sum && info.sum.length) ? (this.textSum + ': ' + info.sum) : '');
this.labelAverage.text((info.average && info.average.length) ? (this.textAverage + ': ' + info.average) : '');
} else {
@ -544,6 +548,8 @@ define([
textSum : 'SUM',
textCount : 'COUNT',
textAverage : 'AVERAGE',
textMin : 'MIN',
textMax : 'MAX',
filteredRecordsText : '{0} of {1} records filtered',
filteredText : 'Filter mode'
}, SSE.Views.Statusbar || {}));

View file

@ -1951,6 +1951,8 @@
"SSE.Views.Statusbar.RenameDialog.labelSheetName": "Sheet Name",
"SSE.Views.Statusbar.textAverage": "AVERAGE",
"SSE.Views.Statusbar.textCount": "COUNT",
"SSE.Views.Statusbar.textMin": "MIN",
"SSE.Views.Statusbar.textMax": "MAX",
"SSE.Views.Statusbar.textNewColor": "Add New Custom Color",
"SSE.Views.Statusbar.textNoColor": "No Color",
"SSE.Views.Statusbar.textSum": "SUM",