[SSE] Add slicer from the right panel
This commit is contained in:
parent
56c88cca61
commit
4f8a48e635
|
@ -83,6 +83,11 @@
|
||||||
<button type="button" class="btn btn-text-default" id="table-btn-rem-duplicates" style="width:100%;"><%= scope.textRemDuplicates %></button>
|
<button type="button" class="btn btn-text-default" id="table-btn-rem-duplicates" style="width:100%;"><%= scope.textRemDuplicates %></button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="padding-small" colspan=2>
|
||||||
|
<button type="button" class="btn btn-text-default" id="table-btn-slicer" style="width:100%;"><%= scope.textSlicer %></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>
|
||||||
|
|
|
@ -48,7 +48,8 @@ define([
|
||||||
'common/main/lib/component/CheckBox',
|
'common/main/lib/component/CheckBox',
|
||||||
'common/main/lib/component/ComboDataView',
|
'common/main/lib/component/ComboDataView',
|
||||||
'spreadsheeteditor/main/app/view/TableOptionsDialog',
|
'spreadsheeteditor/main/app/view/TableOptionsDialog',
|
||||||
'spreadsheeteditor/main/app/view/TableSettingsAdvanced'
|
'spreadsheeteditor/main/app/view/TableSettingsAdvanced',
|
||||||
|
'spreadsheeteditor/main/app/view/SlicerAddDialog'
|
||||||
], function (menuTemplate, $, _, Backbone) {
|
], function (menuTemplate, $, _, Backbone) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -305,6 +306,12 @@ define([
|
||||||
}, this));
|
}, this));
|
||||||
this.lockedControls.push(this.btnRemDuplicates);
|
this.lockedControls.push(this.btnRemDuplicates);
|
||||||
|
|
||||||
|
this.btnSlicer = new Common.UI.Button({
|
||||||
|
el: $('#table-btn-slicer')
|
||||||
|
});
|
||||||
|
this.btnSlicer.on('click', _.bind(this.onInsertSlicerClick, this));
|
||||||
|
this.lockedControls.push(this.btnSlicer);
|
||||||
|
|
||||||
$(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;
|
||||||
|
@ -528,6 +535,22 @@ define([
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onInsertSlicerClick: function() {
|
||||||
|
var me = this,
|
||||||
|
props = me.api.asc_beforeInsertSlicer();
|
||||||
|
if (props) {
|
||||||
|
(new SSE.Views.SlicerAddDialog({
|
||||||
|
props: props,
|
||||||
|
handler: function (result, settings) {
|
||||||
|
if (me && me.api && result == 'ok') {
|
||||||
|
me.api.asc_insertSlicer(settings);
|
||||||
|
}
|
||||||
|
Common.NotificationCenter.trigger('edit:complete', me);
|
||||||
|
}
|
||||||
|
})).show();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
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)
|
||||||
|
@ -585,7 +608,8 @@ define([
|
||||||
textConvertRange: 'Convert to range',
|
textConvertRange: 'Convert to range',
|
||||||
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'
|
||||||
|
|
||||||
}, SSE.Views.TableSettings || {}));
|
}, SSE.Views.TableSettings || {}));
|
||||||
});
|
});
|
|
@ -2472,6 +2472,7 @@
|
||||||
"SSE.Views.TableSettings.textTemplate": "Select From Template",
|
"SSE.Views.TableSettings.textTemplate": "Select From Template",
|
||||||
"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.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