[SSE] Disable close view button for default sheet mode

This commit is contained in:
Julia Radzhabova 2020-10-14 16:48:26 +03:00
parent 1626af3a1f
commit 119356217a
3 changed files with 6 additions and 2 deletions

View file

@ -115,6 +115,9 @@ define([
onSelectionChanged: function(info) {
if (!this.toolbar.editMode || !this.view) return;
Common.Utils.lockControls(SSE.enumLock.sheetView, this.api.asc_getActiveNamedSheetView && !this.api.asc_getActiveNamedSheetView(this.api.asc_getActiveWorksheetIndex()),
{array: [this.view.btnCloseView]});
},
onFreeze: function(state) {

View file

@ -97,7 +97,8 @@ define([
selSlicer: 'sel-slicer',
cantSort: 'cant-sort',
pivotLock: 'pivot-lock',
tableHasSlicer: 'table-has-slicer'
tableHasSlicer: 'table-has-slicer',
sheetView: 'sheet-view'
};
SSE.Views.Toolbar = Common.UI.Mixtbar.extend(_.extend({

View file

@ -114,7 +114,7 @@ define([
cls : 'btn-toolbar',
iconCls : 'toolbar__icon btn-sheet-view-close',
caption : this.textClose,
lock : [_set.coAuth, _set.lostConnect]
lock : [_set.sheetView, _set.coAuth, _set.lostConnect]
});
this.lockedControls.push(this.btnCloseView);
Common.Utils.injectComponent($host.find('#slot-closeview'), this.btnCloseView);