From 84aef0d10b1410c0aaa22f21ba115f12c4c272e2 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 21 Jul 2017 17:41:40 +0300 Subject: [PATCH] [SSE] Remove pivot field. --- apps/spreadsheeteditor/main/app/view/PivotSettings.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/PivotSettings.js b/apps/spreadsheeteditor/main/app/view/PivotSettings.js index 241b08cec..1f6fa0996 100644 --- a/apps/spreadsheeteditor/main/app/view/PivotSettings.js +++ b/apps/spreadsheeteditor/main/app/view/PivotSettings.js @@ -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 || {})); }); \ No newline at end of file