[SSE] Remove pivot field.

This commit is contained in:
Julia Radzhabova 2017-07-21 17:41:40 +03:00
parent 55e13bde14
commit 84aef0d10b

View file

@ -497,7 +497,7 @@ define([
caption : this.txtRemove,
checkable : false
});
// this.miRemove.on('click', _.bind(this.onRemove, this));
this.miRemove.on('click', _.bind(this.onRemove, this));
this.miFieldSettings = new Common.UI.MenuItem({
caption : this.txtFieldSettings,
@ -627,6 +627,12 @@ define([
}
},
onRemove: function() {
if (this.api && !this._locked && this._state.field){
this._originalProps.asc_removeField(this.api, this._state.field.record.get('pivotIndex'));
}
},
disableControls: function(disable) {
if (this._initSettings) return;
@ -661,7 +667,7 @@ define([
txtAddFilter: 'Add to Filters',
txtAddRow: 'Add to Rows',
txtAddColumn: 'Add to Columns',
txtAddValues: 'Add to Values',
txtAddValues: 'Add to Values'
}, SSE.Views.PivotSettings || {}));
});