[SSE] Add pivot table from the right panel
This commit is contained in:
parent
8d69e3e642
commit
e536772dcb
|
@ -66,6 +66,9 @@ define([
|
||||||
'pivottable:blankrows': _.bind(this.onPivotBlankRows, this),
|
'pivottable:blankrows': _.bind(this.onPivotBlankRows, this),
|
||||||
'pivottable:subtotals': _.bind(this.onPivotSubtotals, this),
|
'pivottable:subtotals': _.bind(this.onPivotSubtotals, this),
|
||||||
'pivottable:grandtotals': _.bind(this.onPivotGrandTotals, this)
|
'pivottable:grandtotals': _.bind(this.onPivotGrandTotals, this)
|
||||||
|
},
|
||||||
|
'TableSettings': {
|
||||||
|
'pivottable:create': _.bind(this.onCreateClick, this)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -88,6 +88,11 @@
|
||||||
<button type="button" class="btn btn-text-default" id="table-btn-slicer" style="width:100%;"><%= scope.textSlicer %></button>
|
<button type="button" class="btn btn-text-default" id="table-btn-slicer" style="width:100%;"><%= scope.textSlicer %></button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr class="pivot-only">
|
||||||
|
<td class="padding-small" colspan=2>
|
||||||
|
<button type="button" class="btn btn-text-default" id="table-btn-pivot" style="width:100%;"><%= scope.textPivot %></button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="padding-small" colspan=2>
|
<td class="padding-small" colspan=2>
|
||||||
<div class="separator horizontal"></div>
|
<div class="separator horizontal"></div>
|
||||||
|
|
|
@ -266,6 +266,7 @@ define([
|
||||||
this.mode = mode;
|
this.mode = mode;
|
||||||
this.imageSettings && this.imageSettings.setMode(mode);
|
this.imageSettings && this.imageSettings.setMode(mode);
|
||||||
this.shapeSettings && this.shapeSettings.setMode(mode);
|
this.shapeSettings && this.shapeSettings.setMode(mode);
|
||||||
|
this.tableSettings && this.tableSettings.setMode(mode);
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -184,6 +184,10 @@ define([
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
setMode: function(mode) {
|
||||||
|
this.mode = mode;
|
||||||
|
},
|
||||||
|
|
||||||
createDelayedControls: function() {
|
createDelayedControls: function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
this.chHeader = new Common.UI.CheckBox({
|
this.chHeader = new Common.UI.CheckBox({
|
||||||
|
@ -312,6 +316,14 @@ define([
|
||||||
this.btnSlicer.on('click', _.bind(this.onInsertSlicerClick, this));
|
this.btnSlicer.on('click', _.bind(this.onInsertSlicerClick, this));
|
||||||
this.lockedControls.push(this.btnSlicer);
|
this.lockedControls.push(this.btnSlicer);
|
||||||
|
|
||||||
|
this.btnPivot = new Common.UI.Button({
|
||||||
|
el: $('#table-btn-pivot')
|
||||||
|
});
|
||||||
|
this.btnPivot.on('click', _.bind(this.onInsertPivotClick, this));
|
||||||
|
this.lockedControls.push(this.btnPivot);
|
||||||
|
|
||||||
|
this.$el.find('.pivot-only').toggleClass('hidden', !this.mode.canFeaturePivot);
|
||||||
|
|
||||||
$(this.el).on('click', '#table-advanced-link', _.bind(this.openAdvancedSettings, this));
|
$(this.el).on('click', '#table-advanced-link', _.bind(this.openAdvancedSettings, this));
|
||||||
|
|
||||||
this._initSettings = false;
|
this._initSettings = false;
|
||||||
|
@ -551,6 +563,10 @@ define([
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onInsertPivotClick: function() {
|
||||||
|
this.fireEvent('pivottable:create');
|
||||||
|
},
|
||||||
|
|
||||||
onApiEditCell: function(state) {
|
onApiEditCell: function(state) {
|
||||||
this.isEditCell = (state != Asc.c_oAscCellEditorState.editEnd);
|
this.isEditCell = (state != Asc.c_oAscCellEditorState.editEnd);
|
||||||
if ( state == Asc.c_oAscCellEditorState.editStart || state == Asc.c_oAscCellEditorState.editEnd)
|
if ( state == Asc.c_oAscCellEditorState.editStart || state == Asc.c_oAscCellEditorState.editEnd)
|
||||||
|
@ -609,7 +625,8 @@ define([
|
||||||
textLongOperation: 'Long operation',
|
textLongOperation: 'Long operation',
|
||||||
warnLongOperation: 'The operation you are about to perform might take rather much time to complete.<br>Are you sure you want to continue?',
|
warnLongOperation: 'The operation you are about to perform might take rather much time to complete.<br>Are you sure you want to continue?',
|
||||||
textRemDuplicates: 'Remove duplicates',
|
textRemDuplicates: 'Remove duplicates',
|
||||||
textSlicer: 'Insert slicer'
|
textSlicer: 'Insert slicer',
|
||||||
|
textPivot: 'Insert pivot table'
|
||||||
|
|
||||||
}, SSE.Views.TableSettings || {}));
|
}, SSE.Views.TableSettings || {}));
|
||||||
});
|
});
|
|
@ -2479,6 +2479,7 @@
|
||||||
"SSE.Views.TableSettings.textTotal": "Total",
|
"SSE.Views.TableSettings.textTotal": "Total",
|
||||||
"SSE.Views.TableSettings.warnLongOperation": "The operation you are about to perform might take rather much time to complete.<br>Are you sure you want to continue?",
|
"SSE.Views.TableSettings.warnLongOperation": "The operation you are about to perform might take rather much time to complete.<br>Are you sure you want to continue?",
|
||||||
"SSE.Views.TableSettings.textSlicer": "Insert slicer",
|
"SSE.Views.TableSettings.textSlicer": "Insert slicer",
|
||||||
|
"SSE.Views.TableSettings.textPivot": "Insert pivot table",
|
||||||
"SSE.Views.TableSettingsAdvanced.textAlt": "Alternative Text",
|
"SSE.Views.TableSettingsAdvanced.textAlt": "Alternative Text",
|
||||||
"SSE.Views.TableSettingsAdvanced.textAltDescription": "Description",
|
"SSE.Views.TableSettingsAdvanced.textAltDescription": "Description",
|
||||||
"SSE.Views.TableSettingsAdvanced.textAltTip": "The alternative text-based representation of the visual object information, which will be read to the people with vision or cognitive impairments to help them better understand what information there is in the image, autoshape, chart or table.",
|
"SSE.Views.TableSettingsAdvanced.textAltTip": "The alternative text-based representation of the visual object information, which will be read to the people with vision or cognitive impairments to help them better understand what information there is in the image, autoshape, chart or table.",
|
||||||
|
|
Loading…
Reference in a new issue