[SSE] Pivot: set grand totals.
This commit is contained in:
parent
f1fdc3961b
commit
d97670914b
|
@ -181,24 +181,10 @@ define([
|
|||
|
||||
onPivotGrandTotals: function(type){
|
||||
if (this.api) {
|
||||
switch (type){
|
||||
case 0:
|
||||
// this._originalProps.asc_setColGrandTotals(false);
|
||||
// this._originalProps.asc_setRowGrandTotals(false);
|
||||
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;
|
||||
}
|
||||
var props = this._originalProps.asc_clone();
|
||||
props.asc_setColGrandTotals(type == 1 || type == 3);
|
||||
props.asc_setRowGrandTotals(type == 1 || type == 2);
|
||||
this._originalProps.asc_set(this.api, props);
|
||||
}
|
||||
Common.NotificationCenter.trigger('edit:complete', this);
|
||||
},
|
||||
|
|
|
@ -191,6 +191,7 @@ define([
|
|||
api: me.api,
|
||||
handler: function(result, value) {
|
||||
if (result == 'ok' && me.api && value) {
|
||||
me._originalProps.asc_set(me.api, value);
|
||||
}
|
||||
|
||||
Common.NotificationCenter.trigger('edit:complete', me);
|
||||
|
|
|
@ -216,7 +216,11 @@ define([ 'text!spreadsheeteditor/main/app/template/PivotSettingsAdvanced.temp
|
|||
},
|
||||
|
||||
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) {
|
||||
|
|
Loading…
Reference in a new issue