From 37df45af5a56ef89b0cb24dd559e29c84cc7631b Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 28 Feb 2019 11:31:15 +0300 Subject: [PATCH] [SSE] Add min, max to status bar --- apps/spreadsheeteditor/main/app/controller/Statusbar.js | 2 ++ apps/spreadsheeteditor/main/app/template/StatusBar.template | 2 ++ apps/spreadsheeteditor/main/app/view/Statusbar.js | 6 ++++++ apps/spreadsheeteditor/main/locale/en.json | 2 ++ 4 files changed, 12 insertions(+) diff --git a/apps/spreadsheeteditor/main/app/controller/Statusbar.js b/apps/spreadsheeteditor/main/app/controller/Statusbar.js index 4efacb407..125b233af 100644 --- a/apps/spreadsheeteditor/main/app/controller/Statusbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Statusbar.js @@ -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(); diff --git a/apps/spreadsheeteditor/main/app/template/StatusBar.template b/apps/spreadsheeteditor/main/app/template/StatusBar.template index 2b7c8a8d7..4c979f33b 100644 --- a/apps/spreadsheeteditor/main/app/template/StatusBar.template +++ b/apps/spreadsheeteditor/main/app/template/StatusBar.template @@ -23,6 +23,8 @@
+ +
diff --git a/apps/spreadsheeteditor/main/app/view/Statusbar.js b/apps/spreadsheeteditor/main/app/view/Statusbar.js index c7f0feeb2..3bb5f5239 100644 --- a/apps/spreadsheeteditor/main/app/view/Statusbar.js +++ b/apps/spreadsheeteditor/main/app/view/Statusbar.js @@ -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 || {})); diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 2248b0179..88e68b933 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -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",