diff --git a/apps/spreadsheeteditor/main/app/template/TableSettings.template b/apps/spreadsheeteditor/main/app/template/TableSettings.template index 8f369fddc..5f980d0ce 100644 --- a/apps/spreadsheeteditor/main/app/template/TableSettings.template +++ b/apps/spreadsheeteditor/main/app/template/TableSettings.template @@ -83,6 +83,11 @@ + + + + +
diff --git a/apps/spreadsheeteditor/main/app/view/TableSettings.js b/apps/spreadsheeteditor/main/app/view/TableSettings.js index 7f0d3c48c..43dc418e4 100644 --- a/apps/spreadsheeteditor/main/app/view/TableSettings.js +++ b/apps/spreadsheeteditor/main/app/view/TableSettings.js @@ -48,7 +48,8 @@ define([ 'common/main/lib/component/CheckBox', 'common/main/lib/component/ComboDataView', 'spreadsheeteditor/main/app/view/TableOptionsDialog', - 'spreadsheeteditor/main/app/view/TableSettingsAdvanced' + 'spreadsheeteditor/main/app/view/TableSettingsAdvanced', + 'spreadsheeteditor/main/app/view/SlicerAddDialog' ], function (menuTemplate, $, _, Backbone) { 'use strict'; @@ -305,6 +306,12 @@ define([ }, this)); 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._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) { this.isEditCell = (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', textLongOperation: 'Long operation', warnLongOperation: 'The operation you are about to perform might take rather much time to complete.
Are you sure you want to continue?', - textRemDuplicates: 'Remove duplicates' + textRemDuplicates: 'Remove duplicates', + textSlicer: 'Insert slicer' }, SSE.Views.TableSettings || {})); }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 0c7cddca0..701e63c4f 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -2472,6 +2472,7 @@ "SSE.Views.TableSettings.textTemplate": "Select From Template", "SSE.Views.TableSettings.textTotal": "Total", "SSE.Views.TableSettings.warnLongOperation": "The operation you are about to perform might take rather much time to complete.
Are you sure you want to continue?", + "SSE.Views.TableSettings.textSlicer": "Insert slicer", "SSE.Views.TableSettingsAdvanced.textAlt": "Alternative Text", "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.",