[SSE] Sync with sdk api changes
This commit is contained in:
parent
7d4cdabdb3
commit
18ab148633
|
@ -153,7 +153,11 @@ define([
|
|||
|
||||
onCreateClick: function(btn, opts){
|
||||
if (this.api) {
|
||||
this.api.asc_insertPivot("Sheet1!B2:H13", this.createSheetName());
|
||||
var options = this.api.asc_getAddPivotTableOptions();
|
||||
if (options) {
|
||||
this.api.asc_insertPivotNewWorksheet(options.asc_getRange(), this.createSheetName());
|
||||
// this.api.asc_insertPivotExistingWorksheet(options.asc_getRange(), "Sheet1!B17:B17");
|
||||
}
|
||||
}
|
||||
Common.NotificationCenter.trigger('edit:complete', this);
|
||||
},
|
||||
|
|
|
@ -593,7 +593,8 @@ define([
|
|||
var win;
|
||||
if (me.api && !this._locked && me._state.field){
|
||||
if (me._state.field.type == 2) { // value field
|
||||
var field = me._originalProps.asc_getDataFields()[me._state.field.record.get('index')];
|
||||
var dataIndex = me._state.field.record.get('index');
|
||||
var field = me._originalProps.asc_getDataFields()[dataIndex];
|
||||
(new SSE.Views.ValueFieldSettingsDialog(
|
||||
{
|
||||
props: me._originalProps,
|
||||
|
@ -602,24 +603,25 @@ define([
|
|||
api: me.api,
|
||||
handler: function(result, value) {
|
||||
if (result == 'ok' && me.api && value) {
|
||||
field.asc_set(me.api, me._originalProps, value);
|
||||
field.asc_set(me.api, me._originalProps, dataIndex, value);
|
||||
}
|
||||
|
||||
Common.NotificationCenter.trigger('edit:complete', me);
|
||||
}
|
||||
})).show();
|
||||
} else {
|
||||
var pivotField = me._originalProps.asc_getPivotFields()[me._state.field.record.get('pivotIndex')];
|
||||
var pivotIndex = me._state.field.record.get('pivotIndex');
|
||||
var pivotField = me._originalProps.asc_getPivotFields()[pivotIndex];
|
||||
(new SSE.Views.FieldSettingsDialog(
|
||||
{
|
||||
props: me._originalProps,
|
||||
fieldIndex: me._state.field.record.get('pivotIndex'),
|
||||
fieldIndex: pivotIndex,
|
||||
names: me._state.names,
|
||||
api: me.api,
|
||||
type: me._state.field.type,
|
||||
handler: function(result, value) {
|
||||
if (result == 'ok' && me.api && value) {
|
||||
pivotField.asc_set(me.api, me._originalProps, value);
|
||||
pivotField.asc_set(me.api, me._originalProps, pivotIndex, value);
|
||||
}
|
||||
|
||||
Common.NotificationCenter.trigger('edit:complete', me);
|
||||
|
|
Loading…
Reference in a new issue