From 0ba1760176d1919046d90f06911f8fd23f6488f1 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 26 May 2020 19:47:24 +0300 Subject: [PATCH] [SSE] Add slicer for pivot and formatted table --- apps/spreadsheeteditor/main/app/controller/Toolbar.js | 1 + apps/spreadsheeteditor/main/app/view/Toolbar.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index 7d2862e52..c2595b986 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -2369,6 +2369,7 @@ define([ this._state.inpivot = !!info.asc_getPivotTableInfo(); toolbar.lockToolbar(SSE.enumLock.editPivot, this._state.inpivot, { array: toolbar.btnsSetAutofilter.concat(toolbar.btnsClearAutofilter, toolbar.btnsSortDown, toolbar.btnsSortUp, toolbar.btnCustomSort, toolbar.btnMerge, toolbar.btnInsertHyperlink, toolbar.btnInsertTable, toolbar.btnRemoveDuplicates)}); + toolbar.lockToolbar(SSE.enumLock.noSlicerSource, !(this._state.inpivot || formatTableInfo), { array: [toolbar.btnInsertSlicer]}); need_disable = !this.appConfig.canModifyFilter; toolbar.lockToolbar(SSE.enumLock.cantModifyFilter, need_disable, { array: toolbar.btnsSetAutofilter.concat(toolbar.btnsSortDown, toolbar.btnsSortUp, toolbar.btnCustomSort, toolbar.btnTableTemplate, diff --git a/apps/spreadsheeteditor/main/app/view/Toolbar.js b/apps/spreadsheeteditor/main/app/view/Toolbar.js index a595bf678..ddcae6038 100644 --- a/apps/spreadsheeteditor/main/app/view/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/view/Toolbar.js @@ -92,7 +92,8 @@ define([ headerLock: 'header-lock', sheetLock: 'sheet-lock', noPivot: 'no-pivot', - noSubitems: 'no-subitems' + noSubitems: 'no-subitems', + noSlicerSource: 'no-slicer-source' }; SSE.Views.Toolbar = Common.UI.Mixtbar.extend(_.extend({ @@ -738,7 +739,7 @@ define([ cls: 'btn-toolbar x-huge icon-top', iconCls: 'toolbar__icon btn-symbol', caption: me.capBtnInsSlicer, - lock: [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth, _set.multiselect] + lock: [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth, _set.multiselect, _set.noSlicerSource] }); me.btnTableTemplate = new Common.UI.Button({