Commit 1eae40c6 authored by Julia Radzhabova's avatar Julia Radzhabova

[SSE] Fix Bug 19709.

parent ee4cb06c
......@@ -104,6 +104,7 @@ define([
this.api.asc_registerCallback('asc_onWorksheetLocked', _.bind(this.onWorksheetLocked, this));
/** coauthoring end **/
this.api.asc_registerCallback('asc_onError', _.bind(this.onError, this));
this.api.asc_registerCallback('asc_onFilterInfo', _.bind(this.onApiFilterInfo , this));
this.statusbar.setApi(api);
},
......@@ -185,6 +186,11 @@ define([
this.statusbar.updateTabbarBorders();
},
onApiFilterInfo: function(countFilter, countRecords) {
this.statusbar.setFilteredInfo(countFilter, countRecords);
this.statusbar.updateTabbarBorders();
},
onApiEditCell: function(state) {
var disableAdd = (state == Asc.c_oAscCellEditorState.editFormula),
disable = (state != Asc.c_oAscCellEditorState.editEnd),
......
......@@ -1936,6 +1936,7 @@ define([
need_disable = this._state.controlsdisabled.filters || !filterInfo || (filterInfo.asc_getIsApplyAutoFilter()!==true);
toolbar.lockToolbar(SSE.enumLock.ruleDelFilter, need_disable, {array:[toolbar.btnClearAutofilter,toolbar.mnuitemClearFilter]});
this.getApplication().getController('Statusbar').onApiFilterInfo(!need_disable);
this._state.multiselect = info.asc_getFlags().asc_getMultiselect();
toolbar.lockToolbar(SSE.enumLock.multiselect, this._state.multiselect, { array: [toolbar.btnTableTemplate, toolbar.btnInsertHyperlink]});
......
......@@ -39,6 +39,10 @@
<label id="status-math-count">COUNT: 3</label>
<label id="status-math-sum">SUM: 5</label>
</div>
<div id="status-filtered-box" class="status-group">
<div class="separator short" style="margin-right: 12px;" />
<label id="status-filtered-records"></label>
</div>
<div id="status-sheets-bar-box">
<div id="status-sheets-bar" class="status-group">
</div>
......
......@@ -323,6 +323,10 @@ define([
this.labelAverage = $('#status-math-average', this.boxMath);
this.boxMath.hide();
this.boxFiltered = $('#status-filtered-box', this.el);
this.labelFiltered = $('#status-filtered-records', this.boxFiltered);
this.boxFiltered.hide();
this.boxZoom = $('#status-zoom-box', this.el);
this.boxZoom.find('.separator').css('border-left-color','transparent');
......@@ -426,6 +430,23 @@ define([
},30);
},
setFilteredInfo: function(countFilter, countRecords) {
if (countFilter>0 && countRecords>0) {//filter is applied
if (!this.boxFiltered.is(':visible')) this.boxFiltered.show();
this.labelFiltered.text(Common.Utils.String.format(this.filteredRecordsText, countFilter, countRecords));
} else if (countFilter) {// filter mode
if (!this.boxFiltered.is(':visible')) this.boxFiltered.show();
this.labelFiltered.text(this.filteredText);
} else {
if (this.boxFiltered.is(':visible')) this.boxFiltered.hide();
}
var me = this;
_.delay(function(){
me.onTabInvisible(undefined, me.tabbar.checkInvisible(true));
},30);
},
/** coauthoring begin **/
onUsersClick: function() {
this.panelUsers.removeClass('open');
......@@ -600,6 +621,11 @@ define([
visible = true;
}
if (this.boxFiltered.is(':visible')) {
right += parseInt(this.boxFiltered.css('width'));
visible = true;
}
if (this.panelUsers.is(':visible')) {
right += parseInt(this.panelUsers.css('width'));
visible = true;
......@@ -645,7 +671,9 @@ define([
tipUsers : 'Document is currently being edited by several users.',
tipAccessRights : 'Manage document access rights',
tipViewUsers : 'View users and manage document access rights',
txAccessRights : 'Change access rights'
txAccessRights : 'Change access rights',
filteredRecordsText : '{0} of {1} records filtered',
filteredText : 'Filter mode'
}, SSE.Views.Statusbar || {}));
......
......@@ -119,7 +119,8 @@
height: 25px;
}
#status-math-box {
#status-math-box,
#status-filtered-box {
float: right;
padding-top: 6px;
padding-right: 14px;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment