diff --git a/apps/spreadsheeteditor/main/app/controller/PivotTable.js b/apps/spreadsheeteditor/main/app/controller/PivotTable.js
index 0d62cab59..b8c29c3c2 100644
--- a/apps/spreadsheeteditor/main/app/controller/PivotTable.js
+++ b/apps/spreadsheeteditor/main/app/controller/PivotTable.js
@@ -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'));
diff --git a/apps/spreadsheeteditor/main/app/view/PivotTable.js b/apps/spreadsheeteditor/main/app/view/PivotTable.js
index af16a3d15..7189ee148 100644
--- a/apps/spreadsheeteditor/main/app/view/PivotTable.js
+++ b/apps/spreadsheeteditor/main/app/view/PivotTable.js
@@ -63,6 +63,10 @@ define([
'' +
'' +
'
' +
+ '' +
+ '' +
+ '
' +
+ '' +
'' +
'
' +
'' +
@@ -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 || {}));
});
\ No newline at end of file