[SSE] Pivot: set grand totals.

This commit is contained in:
Julia Radzhabova 2017-07-21 10:35:19 +03:00
parent f1fdc3961b
commit d97670914b
3 changed files with 10 additions and 19 deletions

View file

@ -181,24 +181,10 @@ define([
onPivotGrandTotals: function(type){ onPivotGrandTotals: function(type){
if (this.api) { if (this.api) {
switch (type){ var props = this._originalProps.asc_clone();
case 0: props.asc_setColGrandTotals(type == 1 || type == 3);
// this._originalProps.asc_setColGrandTotals(false); props.asc_setRowGrandTotals(type == 1 || type == 2);
// this._originalProps.asc_setRowGrandTotals(false); this._originalProps.asc_set(this.api, props);
break;
case 1:
// this._originalProps.asc_setColGrandTotals(true);
// this._originalProps.asc_setRowGrandTotals(true);
break;
case 2:
// this._originalProps.asc_setColGrandTotals(false);
// this._originalProps.asc_setRowGrandTotals(true);
break;
case 3:
// this._originalProps.asc_setColGrandTotals(true);
// this._originalProps.asc_setRowGrandTotals(false);
break;
}
} }
Common.NotificationCenter.trigger('edit:complete', this); Common.NotificationCenter.trigger('edit:complete', this);
}, },

View file

@ -191,6 +191,7 @@ define([
api: me.api, api: me.api,
handler: function(result, value) { handler: function(result, value) {
if (result == 'ok' && me.api && value) { if (result == 'ok' && me.api && value) {
me._originalProps.asc_set(me.api, value);
} }
Common.NotificationCenter.trigger('edit:complete', me); Common.NotificationCenter.trigger('edit:complete', me);

View file

@ -216,7 +216,11 @@ define([ 'text!spreadsheeteditor/main/app/template/PivotSettingsAdvanced.temp
}, },
getSettings: function () { getSettings: function () {
return {}; var props = this.props.asc_clone();
props.asc_setColGrandTotals(this.chCols.getValue() == 'checked');
props.asc_setRowGrandTotals(this.chRows.getValue() == 'checked');
return props;
}, },
onDlgBtnClick: function(event) { onDlgBtnClick: function(event) {