[SSE] Refresh pivot table.
This commit is contained in:
parent
c0bb96eb7a
commit
43f716beed
|
@ -58,6 +58,7 @@ define([
|
|||
// comments handlers
|
||||
'pivottable:rowscolumns': _.bind(this.onCheckTemplateChange, this),
|
||||
'pivottable:create': _.bind(this.onCreateClick, this),
|
||||
'pivottable:refresh': _.bind(this.onRefreshClick, this),
|
||||
'pivottable:style': _.bind(this.onPivotStyleSelect, this),
|
||||
'pivottable:layout': _.bind(this.onPivotLayout, this),
|
||||
'pivottable:blankrows': _.bind(this.onPivotBlankRows, this),
|
||||
|
@ -138,6 +139,10 @@ define([
|
|||
Common.NotificationCenter.trigger('edit:complete', this);
|
||||
},
|
||||
|
||||
onRefreshClick: function(btn, opts){
|
||||
Common.NotificationCenter.trigger('edit:complete', this);
|
||||
},
|
||||
|
||||
onPivotStyleSelect: function(record){
|
||||
if (this.api) {
|
||||
this._originalProps.asc_getStyleInfo().asc_setName(this.api, this._originalProps, record.get('name'));
|
||||
|
|
|
@ -63,6 +63,10 @@ define([
|
|||
'<span id="slot-btn-pivot-grand-totals" class="btn-slot text x-huge"></span>' +
|
||||
'</div>' +
|
||||
'<div class="separator long"/>' +
|
||||
'<div class="group">' +
|
||||
'<span id="slot-btn-refresh-pivot" class="btn-slot text x-huge"></span>' +
|
||||
'</div>' +
|
||||
'<div class="separator long"/>' +
|
||||
'<div class="group">' +
|
||||
'<div class="elset">' +
|
||||
'<span class="btn-slot text" id="slot-chk-header-row"></span>' +
|
||||
|
@ -106,6 +110,10 @@ define([
|
|||
me.fireEvent('pivottable:grandtotals', [item.value]);
|
||||
});
|
||||
|
||||
this.btnRefreshPivot.on('click', function (e) {
|
||||
me.fireEvent('pivottable:refresh');
|
||||
});
|
||||
|
||||
this.chRowHeader.on('change', function (field, value) {
|
||||
me.fireEvent('pivottable:rowscolumns', [0, value]);
|
||||
});
|
||||
|
@ -222,6 +230,13 @@ define([
|
|||
});
|
||||
this.lockedControls.push(this.btnPivotGrandTotals);
|
||||
|
||||
this.btnRefreshPivot = new Common.UI.Button({
|
||||
cls: 'btn-toolbar x-huge icon-top',
|
||||
iconCls: 'btn-ic-docspell',
|
||||
caption: this.txtRefresh
|
||||
});
|
||||
// this.lockedControls.push(this.btnRefreshPivot);
|
||||
|
||||
this.pivotStyles = new Common.UI.ComboDataView({
|
||||
cls : 'combo-pivot-template',
|
||||
enableKeyEvents : true,
|
||||
|
@ -248,10 +263,11 @@ define([
|
|||
accept();
|
||||
})).then(function(){
|
||||
me.btnAddPivot.updateHint(me.tipCreatePivot);
|
||||
me.btnRefreshPivot.updateHint(me.tipRefresh);
|
||||
me.btnPivotLayout.updateHint(me.capLayout);
|
||||
me.btnPivotBlankRows.updateHint(me.capBlankRows);
|
||||
me.btnPivotSubtotals.updateHint(me.capSubtotals);
|
||||
me.btnPivotGrandTotals.updateHint(me.capGrandTotals);
|
||||
me.btnPivotSubtotals.updateHint(me.tipSubtotals);
|
||||
me.btnPivotGrandTotals.updateHint(me.tipGrandTotals);
|
||||
|
||||
setEvents.call(me);
|
||||
});
|
||||
|
@ -266,6 +282,7 @@ define([
|
|||
this.chColBanded.render(this.$el.find('#slot-chk-banded-column'));
|
||||
|
||||
this.btnAddPivot.render(this.$el.find('#slot-btn-add-pivot'));
|
||||
this.btnRefreshPivot.render(this.$el.find('#slot-btn-refresh-pivot'));
|
||||
this.btnPivotLayout.render(this.$el.find('#slot-btn-pivot-report-layout'));
|
||||
this.btnPivotBlankRows.render(this.$el.find('#slot-btn-pivot-blank-rows'));
|
||||
this.btnPivotSubtotals.render(this.$el.find('#slot-btn-pivot-subtotals'));
|
||||
|
@ -314,8 +331,11 @@ define([
|
|||
mniLayoutNoRepeat: 'Don\'t Repeat All Item Labels',
|
||||
mniNoSubtotals: 'Don\'t Show Subtotals',
|
||||
mniBottomSubtotals: 'Show all Subtotals at Bottom of Group',
|
||||
mniTopSubtotals: 'Show all Subtotals at Top of Group'
|
||||
|
||||
mniTopSubtotals: 'Show all Subtotals at Top of Group',
|
||||
txtRefresh: 'Refresh',
|
||||
tipRefresh: 'Update the information from data source',
|
||||
tipGrandTotals: 'Show or hide grand totals',
|
||||
tipSubtotals: 'Show or hide subtotals'
|
||||
}
|
||||
}()), SSE.Views.PivotTable || {}));
|
||||
});
|
Loading…
Reference in a new issue