diff --git a/apps/spreadsheeteditor/main/app/controller/CellEditor.js b/apps/spreadsheeteditor/main/app/controller/CellEditor.js index 837f5b986..40e289fa8 100644 --- a/apps/spreadsheeteditor/main/app/controller/CellEditor.js +++ b/apps/spreadsheeteditor/main/app/controller/CellEditor.js @@ -158,7 +158,7 @@ define([ is_chart = seltype == Asc.c_oAscSelectionType.RangeChart, is_shape_text = seltype == Asc.c_oAscSelectionType.RangeShapeText, is_shape = seltype == Asc.c_oAscSelectionType.RangeShape, - is_image = seltype == Asc.c_oAscSelectionType.RangeImage, + is_image = seltype == Asc.c_oAscSelectionType.RangeImage || seltype == Asc.c_oAscSelectionType.RangeSlicer, is_mode_2 = is_shape_text || is_shape || is_chart_text || is_chart; this.editor.$btnfunc.toggleClass('disabled', is_image || is_mode_2 || coauth_disable); diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js index 07b5ad7cd..2d724b7bc 100644 --- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js @@ -1659,6 +1659,7 @@ define([ case Asc.c_oAscSelectionType.RangeRow: isrowmenu = true; break; case Asc.c_oAscSelectionType.RangeCol: iscolmenu = true; break; case Asc.c_oAscSelectionType.RangeMax: isallmenu = true; break; + case Asc.c_oAscSelectionType.RangeSlicer: case Asc.c_oAscSelectionType.RangeImage: isimagemenu = !internaleditor; break; case Asc.c_oAscSelectionType.RangeShape: isshapemenu = !internaleditor; break; case Asc.c_oAscSelectionType.RangeChart: ischartmenu = !internaleditor; break; @@ -1820,7 +1821,7 @@ define([ if (showMenu) this.showPopupMenu(documentHolder.textInShapeMenu, {}, event); } else if (!this.permissions.isEditMailMerge && !this.permissions.isEditDiagram || (seltype !== Asc.c_oAscSelectionType.RangeImage && seltype !== Asc.c_oAscSelectionType.RangeShape && - seltype !== Asc.c_oAscSelectionType.RangeChart && seltype !== Asc.c_oAscSelectionType.RangeChartText && seltype !== Asc.c_oAscSelectionType.RangeShapeText)) { + seltype !== Asc.c_oAscSelectionType.RangeChart && seltype !== Asc.c_oAscSelectionType.RangeChartText && seltype !== Asc.c_oAscSelectionType.RangeShapeText && seltype !== Asc.c_oAscSelectionType.RangeSlicer)) { if (!documentHolder.ssMenu || !showMenu && !documentHolder.ssMenu.isVisible()) return; var iscelledit = this.api.isCellEdited, diff --git a/apps/spreadsheeteditor/main/app/controller/RightMenu.js b/apps/spreadsheeteditor/main/app/controller/RightMenu.js index d93ae91aa..32348144a 100644 --- a/apps/spreadsheeteditor/main/app/controller/RightMenu.js +++ b/apps/spreadsheeteditor/main/app/controller/RightMenu.js @@ -140,7 +140,7 @@ define([ cellInfo = info, pivotInfo = info.asc_getPivotTableInfo(); - if (selectType == Asc.c_oAscSelectionType.RangeImage || selectType == Asc.c_oAscSelectionType.RangeShape || + if (selectType == Asc.c_oAscSelectionType.RangeImage || selectType == Asc.c_oAscSelectionType.RangeShape || selectType == Asc.c_oAscSelectionType.RangeSlicer || selectType == Asc.c_oAscSelectionType.RangeChart || selectType == Asc.c_oAscSelectionType.RangeChartText || selectType == Asc.c_oAscSelectionType.RangeShapeText) { SelectedObjects = this.api.asc_getGraphicObjectProps(); } diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index 41c22c738..b75af44f4 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -917,7 +917,7 @@ define([ isLock : cell.asc_getLockText(), allowInternal: (seltype!==Asc.c_oAscSelectionType.RangeImage && seltype!==Asc.c_oAscSelectionType.RangeShape && seltype!==Asc.c_oAscSelectionType.RangeShapeText && seltype!==Asc.c_oAscSelectionType.RangeChart && - seltype!==Asc.c_oAscSelectionType.RangeChartText) + seltype!==Asc.c_oAscSelectionType.RangeChartText && seltype!==Asc.c_oAscSelectionType.RangeSlicer ) }); } @@ -1044,25 +1044,40 @@ define([ onSortType: function(type, btn) { if (this.api) { - var res = this.api.asc_sortCellsRangeExpand(); - if (res) { - var config = { - width: 500, - title: this.txtSorting, - msg: this.txtExpandSort, - - buttons: [ {caption: this.txtExpand, primary: true, value: 'expand'}, - {caption: this.txtSortSelected, primary: true, value: 'sort'}, - 'cancel'], - callback: _.bind(function(btn){ - if (btn == 'expand' || btn == 'sort') { - this.api.asc_sortColFilter(type, '', undefined, undefined, btn == 'expand'); + if (this.api.asc_getCellInfo().asc_getSelectionType()==Asc.c_oAscSelectionType.RangeSlicer) { + var selectedObjects = this.api.asc_getGraphicObjectProps(); + for (var i = 0; i < selectedObjects.length; i++) { + if (selectedObjects[i].asc_getObjectType() == Asc.c_oAscTypeSelectElement.Image) { + var elValue = selectedObjects[i].asc_getObjectValue(); + if ( elValue.asc_getSlicerProperties() ) { + elValue.asc_getSlicerProperties().asc_setSortOrder(type==Asc.c_oAscSortOptions.Ascending ? Asc.ST_tabularSlicerCacheSortOrder.Ascending : Asc.ST_tabularSlicerCacheSortOrder.Descending); + this.api.asc_setGraphicObjectProps(elValue); + break; } - }, this) - }; - Common.UI.alert(config); - } else - this.api.asc_sortColFilter(type, '', undefined, undefined, res !== null); + } + } + Common.NotificationCenter.trigger('edit:complete', this.toolbar); + } else { + var res = this.api.asc_sortCellsRangeExpand(); + if (res) { + var config = { + width: 500, + title: this.txtSorting, + msg: this.txtExpandSort, + + buttons: [ {caption: this.txtExpand, primary: true, value: 'expand'}, + {caption: this.txtSortSelected, primary: true, value: 'sort'}, + 'cancel'], + callback: _.bind(function(btn){ + if (btn == 'expand' || btn == 'sort') { + this.api.asc_sortColFilter(type, '', undefined, undefined, btn == 'expand'); + } + }, this) + }; + Common.UI.alert(config); + } else + this.api.asc_sortColFilter(type, '', undefined, undefined, res !== null); + } } }, @@ -2327,7 +2342,10 @@ define([ } need_disable = this._state.controlsdisabled.filters || (val===null); toolbar.lockToolbar(SSE.enumLock.ruleFilter, need_disable, - { array: toolbar.btnsSetAutofilter.concat(toolbar.btnsSortDown, toolbar.btnsSortUp, toolbar.btnCustomSort, toolbar.btnTableTemplate, toolbar.btnInsertTable, toolbar.btnRemoveDuplicates) }); + { array: toolbar.btnsSetAutofilter.concat(toolbar.btnCustomSort, toolbar.btnTableTemplate, toolbar.btnInsertTable, toolbar.btnRemoveDuplicates) }); + + need_disable = (selectionType !== Asc.c_oAscSelectionType.RangeSlicer) && (this._state.controlsdisabled.filters || (val===null)); + toolbar.lockToolbar(SSE.enumLock.cantSort, need_disable, { array: toolbar.btnsSortDown.concat(toolbar.btnsSortUp) }); val = (formatTableInfo) ? formatTableInfo.asc_getTableStyleName() : null; if (this._state.tablestylename !== val && this.toolbar.mnuTableTemplatePicker) { @@ -2457,7 +2475,7 @@ define([ is_chart = seltype == Asc.c_oAscSelectionType.RangeChart, is_shape_text = seltype == Asc.c_oAscSelectionType.RangeShapeText, is_shape = seltype == Asc.c_oAscSelectionType.RangeShape, - is_image = seltype == Asc.c_oAscSelectionType.RangeImage, + is_image = seltype == Asc.c_oAscSelectionType.RangeImage || seltype == Asc.c_oAscSelectionType.RangeSlicer, is_mode_2 = is_shape_text || is_shape || is_chart_text || is_chart, is_objLocked = false; @@ -2476,6 +2494,7 @@ define([ var _set = SSE.enumLock; var type = seltype; switch ( seltype ) { + case Asc.c_oAscSelectionType.RangeSlicer: case Asc.c_oAscSelectionType.RangeImage: type = _set.selImage; break; case Asc.c_oAscSelectionType.RangeShape: type = _set.selShape; break; case Asc.c_oAscSelectionType.RangeShapeText: type = _set.selShapeText; break; @@ -2522,7 +2541,7 @@ define([ is_chart = seltype == Asc.c_oAscSelectionType.RangeChart, is_shape_text = seltype == Asc.c_oAscSelectionType.RangeShapeText, is_shape = seltype == Asc.c_oAscSelectionType.RangeShape, - is_image = seltype == Asc.c_oAscSelectionType.RangeImage, + is_image = seltype == Asc.c_oAscSelectionType.RangeImage || seltype == Asc.c_oAscSelectionType.RangeSlicer, is_mode_2 = is_shape_text || is_shape || is_chart_text || is_chart, is_objLocked = false; @@ -2974,7 +2993,8 @@ define([ is_shape_text = seltype == Asc.c_oAscSelectionType.RangeShapeText, is_shape = seltype == Asc.c_oAscSelectionType.RangeShape, is_image = seltype == Asc.c_oAscSelectionType.RangeImage, - is_mode_2 = is_shape_text || is_shape || is_chart_text || is_chart, + is_slicer = seltype == Asc.c_oAscSelectionType.RangeSlicer, + is_mode_2 = is_shape_text || is_shape || is_chart_text || is_chart || is_slicer, is_objLocked = false; if (!(is_mode_2 || is_image) && this._state.selection_type===seltype && this._state.coauthdisable===coauth_disable) return (seltype===Asc.c_oAscSelectionType.RangeImage); @@ -2999,6 +3019,7 @@ define([ case Asc.c_oAscSelectionType.RangeShapeText: type = _set.selShapeText; break; case Asc.c_oAscSelectionType.RangeChart: type = _set.selChart; break; case Asc.c_oAscSelectionType.RangeChartText: type = _set.selChartText; break; + case Asc.c_oAscSelectionType.RangeSlicer: type = _set.selSlicer; break; } if ( !this.appConfig.isEditDiagram && !this.appConfig.isEditMailMerge ) @@ -3010,7 +3031,7 @@ define([ toolbar.btnClearStyle.menu.items[4] ], merge: true, - clear: [_set.selImage, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.coAuth] + clear: [_set.selImage, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selSlicer, _set.coAuth] }); toolbar.lockToolbar(SSE.enumLock.coAuthText, is_objLocked); diff --git a/apps/spreadsheeteditor/main/app/view/DataTab.js b/apps/spreadsheeteditor/main/app/view/DataTab.js index bb564d929..22a82ee58 100644 --- a/apps/spreadsheeteditor/main/app/view/DataTab.js +++ b/apps/spreadsheeteditor/main/app/view/DataTab.js @@ -122,7 +122,7 @@ define([ split: true, menu: true, disabled: true, - lock: [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.sheetLock, _set.lostConnect, _set.coAuth] + lock: [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.sheetLock, _set.lostConnect, _set.coAuth] }); this.lockedControls.push(this.btnGroup); @@ -134,7 +134,7 @@ define([ split: true, menu: true, disabled: true, - lock: [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.sheetLock, _set.lostConnect, _set.coAuth] + lock: [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.sheetLock, _set.lostConnect, _set.coAuth] }); this.lockedControls.push(this.btnUngroup); @@ -145,7 +145,7 @@ define([ caption: this.capBtnTextToCol, split: false, disabled: true, - lock: [_set.multiselect, _set.multiselectCols, _set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth] + lock: [_set.multiselect, _set.multiselectCols, _set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.lostConnect, _set.coAuth] }); this.lockedControls.push(this.btnTextToColumns); @@ -175,7 +175,7 @@ define([ iconCls: 'toolbar__icon btn-remove-duplicates', caption: this.capBtnTextRemDuplicates, disabled: true, - lock: [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth, _set.ruleFilter, _set.editPivot, _set.cantModifyFilter, _set.sheetLock] + lock: [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.lostConnect, _set.coAuth, _set.ruleFilter, _set.editPivot, _set.cantModifyFilter, _set.sheetLock] }); this.lockedControls.push(this.btnRemoveDuplicates); @@ -185,7 +185,7 @@ define([ iconCls: 'toolbar__icon btn-custom-sort', caption: this.capBtnTextCustomSort, disabled: true, - lock: [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth, _set.ruleFilter, _set.editPivot, _set.cantModifyFilter, _set.sheetLock] + lock: [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.lostConnect, _set.coAuth, _set.ruleFilter, _set.editPivot, _set.cantModifyFilter, _set.sheetLock] }); this.lockedControls.push(this.btnCustomSort); @@ -196,7 +196,7 @@ define([ [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth, _set.ruleFilter, _set.editPivot, _set.cantModifyFilter, _set.sheetLock]); this.btnsSetAutofilter = Common.Utils.injectButtons($host.find('.slot-btn-setfilter'), '', 'toolbar__icon btn-autofilter', '', - [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth, _set.ruleFilter, _set.editPivot, _set.cantModifyFilter], + [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.lostConnect, _set.coAuth, _set.ruleFilter, _set.editPivot, _set.cantModifyFilter], false, false, true); this.btnsClearAutofilter = Common.Utils.injectButtons($host.find('.slot-btn-clear-filter'), '', 'toolbar__icon btn-clear-filter', '', diff --git a/apps/spreadsheeteditor/main/app/view/FormulaTab.js b/apps/spreadsheeteditor/main/app/view/FormulaTab.js index 0bab20d47..92343ba62 100644 --- a/apps/spreadsheeteditor/main/app/view/FormulaTab.js +++ b/apps/spreadsheeteditor/main/app/view/FormulaTab.js @@ -96,7 +96,7 @@ define([ menu: true, split: false, disabled: true, - lock: [_set.editText, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selRangeEdit, _set.lostConnect, _set.coAuth, _set.noSubitems] + lock: [_set.editText, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.selRangeEdit, _set.lostConnect, _set.coAuth, _set.noSubitems] }); this.lockedControls.push(this.btnFinancial); this.formulaControls.push(this.btnFinancial); @@ -110,7 +110,7 @@ define([ menu: true, split: false, disabled: true, - lock: [_set.editText, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selRangeEdit, _set.lostConnect, _set.coAuth, _set.noSubitems] + lock: [_set.editText, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.selRangeEdit, _set.lostConnect, _set.coAuth, _set.noSubitems] }); this.lockedControls.push(this.btnLogical); this.formulaControls.push(this.btnLogical); @@ -124,7 +124,7 @@ define([ menu: true, split: false, disabled: true, - lock: [_set.editText, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selRangeEdit, _set.lostConnect, _set.coAuth, _set.noSubitems] + lock: [_set.editText, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.selRangeEdit, _set.lostConnect, _set.coAuth, _set.noSubitems] }); this.lockedControls.push(this.btnTextData); this.formulaControls.push(this.btnTextData); @@ -138,7 +138,7 @@ define([ menu: true, split: false, disabled: true, - lock: [_set.editText, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selRangeEdit, _set.lostConnect, _set.coAuth, _set.noSubitems] + lock: [_set.editText, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.selRangeEdit, _set.lostConnect, _set.coAuth, _set.noSubitems] }); this.lockedControls.push(this.btnDateTime); this.formulaControls.push(this.btnDateTime); @@ -152,7 +152,7 @@ define([ menu: true, split: false, disabled: true, - lock: [_set.editText, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selRangeEdit, _set.lostConnect, _set.coAuth, _set.noSubitems] + lock: [_set.editText, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.selRangeEdit, _set.lostConnect, _set.coAuth, _set.noSubitems] }); this.lockedControls.push(this.btnReference); this.formulaControls.push(this.btnReference); @@ -166,7 +166,7 @@ define([ menu: true, split: false, disabled: true, - lock: [_set.editText, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selRangeEdit, _set.lostConnect, _set.coAuth, _set.noSubitems] + lock: [_set.editText, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.selRangeEdit, _set.lostConnect, _set.coAuth, _set.noSubitems] }); this.lockedControls.push(this.btnMath); this.formulaControls.push(this.btnMath); @@ -180,7 +180,7 @@ define([ menu: true, split: false, disabled: true, - lock: [_set.editText, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selRangeEdit, _set.lostConnect, _set.coAuth, _set.noSubitems] + lock: [_set.editText, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.selRangeEdit, _set.lostConnect, _set.coAuth, _set.noSubitems] }); this.lockedControls.push(this.btnRecent); this.formulaControls.push(this.btnRecent); @@ -193,7 +193,7 @@ define([ hint: [this.txtAutosumTip + Common.Utils.String.platformKey('Alt+='), this.txtFormulaTip + Common.Utils.String.platformKey('Shift+F3')], split: true, disabled: true, - lock: [_set.editText, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selRangeEdit, _set.lostConnect, _set.coAuth], + lock: [_set.editText, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.selRangeEdit, _set.lostConnect, _set.coAuth], menu: new Common.UI.Menu({ items : [ {caption: 'SUM', value: 'SUM'}, @@ -220,7 +220,7 @@ define([ caption: this.txtFormula, hint: this.txtFormulaTip + Common.Utils.String.platformKey('Shift+F3'), disabled: true, - lock: [_set.editText, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selRangeEdit, _set.lostConnect, _set.coAuth] + lock: [_set.editText, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.selRangeEdit, _set.lostConnect, _set.coAuth] }); this.lockedControls.push(this.btnFormula); this.formulaControls.push(this.btnFormula); @@ -234,7 +234,7 @@ define([ menu: true, split: false, disabled: true, - lock: [_set.editText, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selRangeEdit, _set.lostConnect, _set.coAuth, _set.noSubitems] + lock: [_set.editText, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.selRangeEdit, _set.lostConnect, _set.coAuth, _set.noSubitems] }); this.lockedControls.push(this.btnMore); this.formulaControls.push(this.btnMore); diff --git a/apps/spreadsheeteditor/main/app/view/PivotTable.js b/apps/spreadsheeteditor/main/app/view/PivotTable.js index 5849461ca..e26ee8787 100644 --- a/apps/spreadsheeteditor/main/app/view/PivotTable.js +++ b/apps/spreadsheeteditor/main/app/view/PivotTable.js @@ -183,7 +183,7 @@ define([ iconCls: 'toolbar__icon btn-add-pivot', caption: this.txtCreate, disabled : false, - lock : [_set.lostConnect, _set.coAuth, _set.editPivot, _set.selRangeEdit, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage] + lock : [_set.lostConnect, _set.coAuth, _set.editPivot, _set.selRangeEdit, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer] }); this.btnPivotLayout = new Common.UI.Button({ diff --git a/apps/spreadsheeteditor/main/app/view/Toolbar.js b/apps/spreadsheeteditor/main/app/view/Toolbar.js index 44112ef06..86434fc0d 100644 --- a/apps/spreadsheeteditor/main/app/view/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/view/Toolbar.js @@ -93,7 +93,9 @@ define([ sheetLock: 'sheet-lock', noPivot: 'no-pivot', noSubitems: 'no-subitems', - noSlicerSource: 'no-slicer-source' + noSlicerSource: 'no-slicer-source', + selSlicer: 'sel-slicer', + cantSort: 'cant-sort' }; SSE.Views.Toolbar = Common.UI.Mixtbar.extend(_.extend({ @@ -329,7 +331,7 @@ define([ cls : 'input-group-nr', menuStyle : 'min-width: 55px;', hint : me.tipFontSize, - lock : [_set.selImage, _set.editFormula, _set.selRangeEdit, _set.coAuth, _set.coAuthText, _set.lostConnect], + lock : [_set.selImage, _set.editFormula, _set.selRangeEdit, _set.selSlicer, _set.coAuth, _set.coAuthText, _set.lostConnect], data : [ { value: 8, displayValue: "8" }, { value: 9, displayValue: "9" }, @@ -356,7 +358,7 @@ define([ menuCls : 'scrollable-menu', menuStyle : 'min-width: 325px;', hint : me.tipFontName, - lock : [_set.selImage, _set.editFormula, _set.selRangeEdit, _set.coAuth, _set.coAuthText, _set.lostConnect], + lock : [_set.selImage, _set.editFormula, _set.selRangeEdit, _set.selSlicer, _set.coAuth, _set.coAuthText, _set.lostConnect], store : new Common.Collections.Fonts() }); @@ -380,21 +382,21 @@ define([ id : 'id-toolbar-btn-incfont', cls : 'btn-toolbar', iconCls : 'toolbar__icon btn-incfont', - lock : [_set.selImage, _set.editFormula, _set.selRangeEdit, _set.coAuth, _set.coAuthText, _set.lostConnect] + lock : [_set.selImage, _set.editFormula, _set.selRangeEdit, _set.selSlicer, _set.coAuth, _set.coAuthText, _set.lostConnect] }); me.btnDecFontSize = new Common.UI.Button({ id : 'id-toolbar-btn-decfont', cls : 'btn-toolbar', iconCls : 'toolbar__icon btn-decfont', - lock : [_set.selImage, _set.editFormula, _set.selRangeEdit, _set.coAuth, _set.coAuthText, _set.lostConnect] + lock : [_set.selImage, _set.editFormula, _set.selRangeEdit, _set.selSlicer, _set.coAuth, _set.coAuthText, _set.lostConnect] }); me.btnBold = new Common.UI.Button({ id : 'id-toolbar-btn-bold', cls : 'btn-toolbar', iconCls : 'toolbar__icon btn-bold', - lock : [_set.selImage, _set.editFormula, _set.selRangeEdit, _set.coAuth, _set.coAuthText, _set.lostConnect], + lock : [_set.selImage, _set.editFormula, _set.selRangeEdit, _set.selSlicer, _set.coAuth, _set.coAuthText, _set.lostConnect], enableToggle: true }); @@ -402,7 +404,7 @@ define([ id : 'id-toolbar-btn-italic', cls : 'btn-toolbar', iconCls : 'toolbar__icon btn-italic', - lock : [_set.selImage, _set.editFormula, _set.selRangeEdit, _set.coAuth, _set.coAuthText, _set.lostConnect], + lock : [_set.selImage, _set.editFormula, _set.selRangeEdit, _set.selSlicer, _set.coAuth, _set.coAuthText, _set.lostConnect], enableToggle: true }); @@ -410,7 +412,7 @@ define([ id : 'id-toolbar-btn-underline', cls : 'btn-toolbar', iconCls : 'toolbar__icon btn-underline', - lock : [_set.selImage, _set.editFormula, _set.selRangeEdit, _set.coAuth, _set.coAuthText, _set.lostConnect], + lock : [_set.selImage, _set.editFormula, _set.selRangeEdit, _set.selSlicer, _set.coAuth, _set.coAuthText, _set.lostConnect], enableToggle: true }); @@ -418,7 +420,7 @@ define([ id: 'id-toolbar-btn-strikeout', cls: 'btn-toolbar', iconCls: 'toolbar__icon btn-strikeout', - lock : [_set.selImage, _set.editFormula, _set.selRangeEdit, _set.coAuth, _set.coAuthText, _set.lostConnect], + lock : [_set.selImage, _set.editFormula, _set.selRangeEdit, _set.selSlicer, _set.coAuth, _set.coAuthText, _set.lostConnect], enableToggle: true }); @@ -429,7 +431,7 @@ define([ icls : 'btn-subscript', split : true, enableToggle: true, - lock : [_set.selImage, _set.editFormula, _set.selRangeEdit, _set.coAuth, _set.coAuthText, _set.lostConnect], + lock : [_set.selImage, _set.editFormula, _set.selRangeEdit, _set.selSlicer, _set.coAuth, _set.coAuthText, _set.lostConnect], menu : new Common.UI.Menu({ items: [ { @@ -462,7 +464,7 @@ define([ cls : 'btn-toolbar', iconCls : 'toolbar__icon btn-fontcolor', split : true, - lock : [_set.selImage, _set.editFormula, _set.selRangeEdit, _set.coAuth, _set.coAuthText, _set.lostConnect], + lock : [_set.selImage, _set.editFormula, _set.selRangeEdit, _set.selSlicer, _set.coAuth, _set.coAuthText, _set.lostConnect], menu : new Common.UI.Menu({ items: [ { template: _.template('
') }, @@ -477,7 +479,7 @@ define([ cls : 'btn-toolbar', iconCls : 'toolbar__icon btn-paracolor', split : true, - lock : [_set.selImage, _set.editCell, _set.coAuth, _set.coAuthText, _set.lostConnect], + lock : [_set.selImage, _set.editCell, _set.selSlicer, _set.coAuth, _set.coAuthText, _set.lostConnect], menu : new Common.UI.Menu({ items: [ { template: _.template('') }, @@ -493,7 +495,7 @@ define([ icls : 'btn-border-out', borderId : 'outer', borderswidth: Asc.c_oAscBorderStyles.Thin, - lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth], + lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.lostConnect, _set.coAuth], split : true, menu : true }); @@ -503,7 +505,7 @@ define([ cls : 'btn-toolbar', iconCls : 'toolbar__icon btn-align-left', enableToggle: true, - lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selImage, _set.lostConnect, _set.coAuth, _set.coAuthText], + lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selImage, _set.selSlicer, _set.lostConnect, _set.coAuth, _set.coAuthText], toggleGroup : 'alignGroup' }); @@ -512,7 +514,7 @@ define([ cls : 'btn-toolbar', iconCls : 'toolbar__icon btn-align-center', enableToggle: true, - lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selImage, _set.lostConnect, _set.coAuth, _set.coAuthText], + lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selImage, _set.selSlicer, _set.lostConnect, _set.coAuth, _set.coAuthText], toggleGroup : 'alignGroup' }); @@ -521,7 +523,7 @@ define([ cls : 'btn-toolbar', iconCls : 'toolbar__icon btn-align-right', enableToggle: true, - lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selImage, _set.lostConnect, _set.coAuth, _set.coAuthText], + lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selImage, _set.selSlicer, _set.lostConnect, _set.coAuth, _set.coAuthText], toggleGroup : 'alignGroup' }); @@ -530,7 +532,7 @@ define([ cls : 'btn-toolbar', iconCls : 'toolbar__icon btn-align-just', enableToggle: true, - lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selImage, _set.lostConnect, _set.coAuth, _set.coAuthText], + lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selImage, _set.selSlicer, _set.lostConnect, _set.coAuth, _set.coAuthText], toggleGroup: 'alignGroup' }); @@ -541,7 +543,7 @@ define([ enableToggle: true, allowDepress: true, split : true, - lock : [_set.editCell, _set.selShape, _set.selShapeText, _set.selChart, _set.selChartText, _set.selImage, _set.lostConnect, _set.coAuth, _set.ruleMerge, _set.editPivot], + lock : [_set.editCell, _set.selShape, _set.selShapeText, _set.selChart, _set.selChartText, _set.selImage, _set.selSlicer, _set.lostConnect, _set.coAuth, _set.ruleMerge, _set.editPivot], menu : new Common.UI.Menu({ items: [ { @@ -568,7 +570,7 @@ define([ id : 'id-toolbar-rtn-valign-top', cls : 'btn-toolbar', iconCls : 'toolbar__icon btn-align-top', - lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selImage, _set.lostConnect, _set.coAuth, _set.coAuthText], + lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selImage, _set.selSlicer, _set.lostConnect, _set.coAuth, _set.coAuthText], enableToggle: true, toggleGroup : 'vAlignGroup' }); @@ -578,7 +580,7 @@ define([ cls : 'btn-toolbar', iconCls : 'toolbar__icon btn-align-middle', enableToggle: true, - lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selImage, _set.lostConnect, _set.coAuth, _set.coAuthText], + lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selImage, _set.selSlicer, _set.lostConnect, _set.coAuth, _set.coAuthText], toggleGroup : 'vAlignGroup' }); @@ -586,7 +588,7 @@ define([ id : 'id-toolbar-rtn-valign-bottom', cls : 'btn-toolbar', iconCls : 'toolbar__icon btn-align-bottom', - lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selImage, _set.lostConnect, _set.coAuth, _set.coAuthText], + lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selImage, _set.selSlicer, _set.lostConnect, _set.coAuth, _set.coAuthText], enableToggle: true, toggleGroup : 'vAlignGroup' }); @@ -595,7 +597,7 @@ define([ id : 'id-toolbar-rtn-wrap', cls : 'btn-toolbar', iconCls : 'toolbar__icon btn-wrap', - lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth], + lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.lostConnect, _set.coAuth], enableToggle: true, allowDepress: true }); @@ -604,7 +606,7 @@ define([ id : 'id-toolbar-rtn-textorient', cls : 'btn-toolbar', iconCls : 'toolbar__icon text-orient-ccw', - lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selImage, _set.lostConnect, _set.coAuth, _set.coAuthText], + lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selImage, _set.selSlicer, _set.lostConnect, _set.coAuth, _set.coAuthText], menu : new Common.UI.Menu({ items: [ { @@ -679,7 +681,7 @@ define([ cls : 'btn-toolbar x-huge icon-top', iconCls : 'toolbar__icon btn-inserthyperlink', caption : me.capInsertHyperlink, - lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selImage, _set.selShape, _set.cantHyperlink, _set.multiselect, _set.lostConnect, _set.coAuth, _set.editPivot] + lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selImage, _set.selShape, _set.cantHyperlink, _set.selSlicer, _set.multiselect, _set.lostConnect, _set.coAuth, _set.editPivot] }); me.btnInsertChart = new Common.UI.Button({ @@ -739,7 +741,7 @@ define([ cls: 'btn-toolbar x-huge icon-top', iconCls: 'toolbar__icon btn-symbol', caption: me.capBtnInsSymbol, - lock: [_set.selImage, _set.selChart, _set.selShape, _set.editFormula, _set.selRangeEdit, _set.coAuth, _set.coAuthText, _set.lostConnect] + lock: [_set.selImage, _set.selChart, _set.selShape, _set.editFormula, _set.selRangeEdit, _set.selSlicer, _set.coAuth, _set.coAuthText, _set.lostConnect] }); me.btnInsertSlicer = new Common.UI.Button({ @@ -747,14 +749,14 @@ define([ cls: 'btn-toolbar x-huge icon-top', iconCls: 'toolbar__icon btn-slicer', caption: me.capBtnInsSlicer, - lock: [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth, _set.multiselect, _set.noSlicerSource] + lock: [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.lostConnect, _set.coAuth, _set.multiselect, _set.noSlicerSource] }); me.btnTableTemplate = new Common.UI.Button({ id : 'id-toolbar-btn-ttempl', cls : 'btn-toolbar', iconCls : 'toolbar__icon btn-menu-table', - lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth, _set.ruleFilter, _set.multiselect, _set.cantModifyFilter], + lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.lostConnect, _set.coAuth, _set.ruleFilter, _set.multiselect, _set.cantModifyFilter], menu : new Common.UI.Menu({ items: [ { template: _.template('') } @@ -767,7 +769,7 @@ define([ cls : 'btn-toolbar x-huge icon-top', iconCls : 'toolbar__icon btn-inserttable', caption : me.capInsertTable, - lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth, _set.ruleFilter, _set.multiselect, _set.cantModifyFilter, _set.ruleMerge, _set.editPivot] + lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.lostConnect, _set.coAuth, _set.ruleFilter, _set.multiselect, _set.cantModifyFilter, _set.ruleMerge, _set.editPivot] }); me.listStyles = new Common.UI.ComboDataView({ @@ -776,7 +778,7 @@ define([ itemWidth : 112, itemHeight : 38, menuMaxHeight : 226, - lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth], + lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.lostConnect, _set.coAuth], beforeOpenHandler: function(e) { var cmp = this, menu = cmp.openButton.menu, @@ -823,7 +825,7 @@ define([ cls : 'input-group-nr', menuStyle : 'min-width: 180px;', hint : me.tipNumFormat, - lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selRangeEdit, _set.lostConnect, _set.coAuth], + lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.selRangeEdit, _set.lostConnect, _set.coAuth], itemsTemplate: formatTemplate, editable : false, data : me.numFormatData @@ -833,7 +835,7 @@ define([ id : 'id-toolbar-btn-percent-style', cls : 'btn-toolbar', iconCls : 'toolbar__icon btn-percent-style', - lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth], + lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.lostConnect, _set.coAuth], styleName : 'Percent' }); @@ -841,7 +843,7 @@ define([ id : 'id-toolbar-btn-accounting-style', cls : 'btn-toolbar', iconCls : 'toolbar__icon btn-currency-style', - lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth], + lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.lostConnect, _set.coAuth], styleName : 'Currency', split : true, menu : new Common.UI.Menu({ @@ -879,14 +881,14 @@ define([ id : 'id-toolbar-btn-decdecimal', cls : 'btn-toolbar', iconCls : 'toolbar__icon btn-decdecimal', - lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth] + lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.lostConnect, _set.coAuth] }); me.btnIncDecimal = new Common.UI.Button({ id : 'id-toolbar-btn-incdecimal', cls : 'btn-toolbar', iconCls : 'toolbar__icon btn-incdecimal', - lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth] + lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.lostConnect, _set.coAuth] }); me.btnInsertFormula = new Common.UI.Button({ @@ -894,7 +896,7 @@ define([ cls : 'btn-toolbar', iconCls : 'toolbar__icon btn-formula', split : true, - lock : [_set.editText, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selRangeEdit, _set.lostConnect, _set.coAuth], + lock : [_set.editText, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.selRangeEdit, _set.lostConnect, _set.coAuth], menu : new Common.UI.Menu({ style : 'min-width: 110px', items : [ @@ -943,7 +945,7 @@ define([ id : 'id-toolbar-btn-clear', cls : 'btn-toolbar', iconCls : 'toolbar__icon btn-clearstyle', - lock : [_set.lostConnect, _set.coAuth, _set.selRangeEdit], + lock : [_set.lostConnect, _set.coAuth, _set.selRangeEdit, _set.selSlicer], menu : new Common.UI.Menu({ style : 'min-width: 110px', items : [ @@ -980,7 +982,7 @@ define([ id : 'id-toolbar-btn-copystyle', cls : 'btn-toolbar', iconCls : 'toolbar__icon btn-copystyle', - lock : [_set.editCell, _set.lostConnect, _set.coAuth, _set.selChart], + lock : [_set.editCell, _set.lostConnect, _set.coAuth, _set.selChart, _set.selSlicer], enableToggle: true }); @@ -988,7 +990,7 @@ define([ id : 'id-toolbar-btn-addcell', cls : 'btn-toolbar', iconCls : 'toolbar__icon btn-addcell', - lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth], + lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.lostConnect, _set.coAuth], menu : new Common.UI.Menu({ items : [ { @@ -1015,7 +1017,7 @@ define([ id : 'id-toolbar-btn-delcell', cls : 'btn-toolbar', iconCls : 'toolbar__icon btn-delcell', - lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth], + lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.lostConnect, _set.coAuth], menu : new Common.UI.Menu({ items : [ { @@ -1259,7 +1261,7 @@ define([ cls: 'btn-toolbar x-huge icon-top', iconCls: 'toolbar__icon btn-print-area', caption: me.capBtnPrintArea, - lock : [_set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.editCell, _set.selRangeEdit, _set.printAreaLock, _set.lostConnect, _set.coAuth], + lock : [_set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.editCell, _set.selRangeEdit, _set.printAreaLock, _set.lostConnect, _set.coAuth], menu: new Common.UI.Menu({ cls: 'ppm-toolbar', items: [