From 4515e5a14d0b60658fb1371de24a9e9839e6724e Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 21 Sep 2021 13:46:17 +0300 Subject: [PATCH] [SSE] Disable view and layout tab when cell is edited --- .../main/app/view/Toolbar.js | 10 +++++----- .../main/app/view/ViewTab.js | 19 ++++++++++--------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/Toolbar.js b/apps/spreadsheeteditor/main/app/view/Toolbar.js index 6e23a4bef..21ecb1476 100644 --- a/apps/spreadsheeteditor/main/app/view/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/view/Toolbar.js @@ -1239,7 +1239,7 @@ define([ cls: 'btn-toolbar x-huge icon-top', iconCls: 'toolbar__icon btn-pageorient', caption: me.capBtnPageOrient, - lock : [_set.docPropsLock, _set.lostConnect, _set.coAuth, _set.selRangeEdit], + lock : [_set.docPropsLock, _set.lostConnect, _set.coAuth, _set.editCell, _set.selRangeEdit], menu: new Common.UI.Menu({ cls: 'ppm-toolbar', items: [ @@ -1279,7 +1279,7 @@ define([ cls: 'btn-toolbar x-huge icon-top', iconCls: 'toolbar__icon btn-pagemargins', caption: me.capBtnMargins, - lock : [_set.docPropsLock, _set.lostConnect, _set.coAuth, _set.selRangeEdit], + lock : [_set.docPropsLock, _set.lostConnect, _set.coAuth, _set.editCell, _set.selRangeEdit], menu: new Common.UI.Menu({ items: [ { @@ -1327,7 +1327,7 @@ define([ cls: 'btn-toolbar x-huge icon-top', iconCls: 'toolbar__icon btn-pagesize', caption: me.capBtnPageSize, - lock : [_set.docPropsLock, _set.lostConnect, _set.coAuth, _set.selRangeEdit], + lock : [_set.docPropsLock, _set.lostConnect, _set.coAuth, _set.editCell, _set.selRangeEdit], menu: new Common.UI.Menu({ restoreHeight: true, items: [ @@ -1495,7 +1495,7 @@ define([ cls: 'btn-toolbar x-huge icon-top', iconCls: 'toolbar__icon btn-scale', caption: me.capBtnScale, - lock: [_set.docPropsLock, _set.lostConnect, _set.coAuth, _set.selRangeEdit], + lock: [_set.docPropsLock, _set.lostConnect, _set.coAuth, _set.editCell, _set.selRangeEdit], menu: new Common.UI.Menu({ items: [], cls: 'scale-menu'}), @@ -1561,7 +1561,7 @@ define([ cls: 'btn-toolbar x-huge icon-top', iconCls: 'toolbar__icon btn-print-titles', caption: me.capBtnPrintTitles, - lock : [_set.docPropsLock, _set.lostConnect, _set.coAuth, _set.selRangeEdit], + lock : [_set.docPropsLock, _set.lostConnect, _set.coAuth, _set.editCell, _set.selRangeEdit], dataHint : '1', dataHintDirection: 'bottom', dataHintOffset: 'small' diff --git a/apps/spreadsheeteditor/main/app/view/ViewTab.js b/apps/spreadsheeteditor/main/app/view/ViewTab.js index e756d7bd1..a73c5b608 100644 --- a/apps/spreadsheeteditor/main/app/view/ViewTab.js +++ b/apps/spreadsheeteditor/main/app/view/ViewTab.js @@ -97,7 +97,7 @@ define([ cls: 'btn-toolbar x-huge icon-top', iconCls: 'toolbar__icon btn-sheet-view', caption: me.capBtnSheetView, - lock : [_set.lostConnect, _set.coAuth], + lock : [_set.lostConnect, _set.coAuth, _set.editCell], menu: true, dataHint : '1', dataHintDirection: 'bottom', @@ -110,7 +110,7 @@ define([ cls : 'btn-toolbar', iconCls : 'toolbar__icon btn-sheet-view-new', caption : this.textCreate, - lock : [_set.coAuth, _set.lostConnect], + lock : [_set.coAuth, _set.lostConnect, _set.editCell], dataHint : '1', dataHintDirection: 'left', dataHintOffset: 'big' @@ -123,7 +123,7 @@ define([ cls : 'btn-toolbar', iconCls : 'toolbar__icon btn-sheet-view-close', caption : this.textClose, - lock : [_set.sheetView, _set.coAuth, _set.lostConnect], + lock : [_set.sheetView, _set.coAuth, _set.lostConnect, _set.editCell], dataHint : '1', dataHintDirection: 'left', dataHintOffset: 'big' @@ -138,7 +138,7 @@ define([ iconCls: 'toolbar__icon btn-freeze-panes', caption: this.capBtnFreeze, menu: true, - lock: [_set.sheetLock, _set.lostConnect, _set.coAuth], + lock: [_set.sheetLock, _set.lostConnect, _set.coAuth, _set.editCell], dataHint: '1', dataHintDirection: 'bottom', dataHintOffset: 'small' @@ -151,7 +151,7 @@ define([ menuStyle : 'min-width: 55px;', hint : me.tipFontSize, editable : false, - lock : [_set.coAuth, _set.lostConnect], + lock : [_set.coAuth, _set.lostConnect, _set.editCell], data : [ { displayValue: "50%", value: 50 }, { displayValue: "75%", value: 75 }, @@ -166,12 +166,13 @@ define([ dataHintOffset: 'small' }); this.cmbZoom.setValue(100); + this.lockedControls.push(this.cmbZoom); this.chFormula = new Common.UI.CheckBox({ el: $host.findById('#slot-chk-formula'), labelText: this.textFormula, value: !Common.localStorage.getBool('sse-hidden-formula'), - lock : [_set.lostConnect, _set.coAuth], + lock : [_set.lostConnect, _set.coAuth, _set.editCell], dataHint : '1', dataHintDirection: 'left', dataHintOffset: 'small' @@ -181,7 +182,7 @@ define([ this.chHeadings = new Common.UI.CheckBox({ el: $host.findById('#slot-chk-heading'), labelText: this.textHeadings, - lock : [_set.sheetLock, _set.lostConnect, _set.coAuth], + lock : [_set.sheetLock, _set.lostConnect, _set.coAuth, _set.editCell], dataHint : '1', dataHintDirection: 'left', dataHintOffset: 'small' @@ -191,7 +192,7 @@ define([ this.chGridlines = new Common.UI.CheckBox({ el: $host.findById('#slot-chk-gridlines'), labelText: this.textGridlines, - lock : [_set.sheetLock, _set.lostConnect, _set.coAuth], + lock : [_set.sheetLock, _set.lostConnect, _set.coAuth, _set.editCell], dataHint : '1', dataHintDirection: 'left', dataHintOffset: 'small' @@ -201,7 +202,7 @@ define([ this.chZeros = new Common.UI.CheckBox({ el: $host.findById('#slot-chk-zeros'), labelText: this.textZeros, - lock : [_set.sheetLock, _set.lostConnect, _set.coAuth], + lock : [_set.sheetLock, _set.lostConnect, _set.coAuth, _set.editCell], dataHint : '1', dataHintDirection: 'left', dataHintOffset: 'small'