[SSE] Fix Bug 43155

This commit is contained in:
Julia Radzhabova 2019-10-14 15:00:15 +03:00
parent 0eae3533df
commit 1bf6271a80
2 changed files with 5 additions and 4 deletions

View file

@ -149,7 +149,7 @@ define([
/** coauthoring begin **/ /** coauthoring begin **/
onWorkbookLocked: function(locked) { onWorkbookLocked: function(locked) {
this.statusbar.tabbar[locked?'addClass':'removeClass']('coauth-locked'); this.statusbar.tabbar[locked?'addClass':'removeClass']('coauth-locked');
this.statusbar.btnAddWorksheet.setDisabled(locked || this.statusbar.rangeSelectionMode==Asc.c_oAscSelectionDialogType.Chart || this.statusbar.btnAddWorksheet.setDisabled(locked || this.api.isCellEdited || this.statusbar.rangeSelectionMode==Asc.c_oAscSelectionDialogType.Chart ||
this.statusbar.rangeSelectionMode==Asc.c_oAscSelectionDialogType.FormatTable); this.statusbar.rangeSelectionMode==Asc.c_oAscSelectionDialogType.FormatTable);
var item, i = this.statusbar.tabbar.getCount(); var item, i = this.statusbar.tabbar.getCount();
while (i-- > 0) { while (i-- > 0) {
@ -206,6 +206,7 @@ define([
statusbar.btnZoomUp.setDisabled(disable); statusbar.btnZoomUp.setDisabled(disable);
statusbar.btnZoomDown.setDisabled(disable); statusbar.btnZoomDown.setDisabled(disable);
statusbar.labelZoom[disable?'addClass':'removeClass']('disabled'); statusbar.labelZoom[disable?'addClass':'removeClass']('disabled');
statusbar.btnAddWorksheet.setDisabled(disable || this.api.asc_isWorkbookLocked() || statusbar.rangeSelectionMode!=Asc.c_oAscSelectionDialogType.None);
if (disableAdd && mask.length>0 || !disableAdd && mask.length==0) return; if (disableAdd && mask.length>0 || !disableAdd && mask.length==0) return;
statusbar.$el.find('.statusbar').toggleClass('masked', disableAdd); statusbar.$el.find('.statusbar').toggleClass('masked', disableAdd);
@ -232,7 +233,7 @@ define([
onRangeDialogMode: function (mode) { onRangeDialogMode: function (mode) {
var islocked = this.statusbar.tabbar.hasClass('coauth-locked'), var islocked = this.statusbar.tabbar.hasClass('coauth-locked'),
currentIdx = this.api.asc_getActiveWorksheetIndex(); currentIdx = this.api.asc_getActiveWorksheetIndex();
this.statusbar.btnAddWorksheet.setDisabled(islocked || mode!=Asc.c_oAscSelectionDialogType.None); this.statusbar.btnAddWorksheet.setDisabled(islocked || this.api.isCellEdited || mode!=Asc.c_oAscSelectionDialogType.None);
var item, i = this.statusbar.tabbar.getCount(); var item, i = this.statusbar.tabbar.getCount();
while (i-- > 0) { while (i-- > 0) {

View file

@ -355,7 +355,7 @@ define([
if (!this.tabbar.isTabVisible(sindex)) if (!this.tabbar.isTabVisible(sindex))
this.tabbar.setTabVisible(sindex); this.tabbar.setTabVisible(sindex);
this.btnAddWorksheet.setDisabled(me.mode.isDisconnected || me.api.asc_isWorkbookLocked()); this.btnAddWorksheet.setDisabled(me.mode.isDisconnected || me.api.asc_isWorkbookLocked() || me.api.isCellEdited);
$('#status-label-zoom').text(Common.Utils.String.format(this.zoomText, Math.floor((this.api.asc_getZoom() +.005)*100))); $('#status-label-zoom').text(Common.Utils.String.format(this.zoomText, Math.floor((this.api.asc_getZoom() +.005)*100)));
me.fireEvent('sheet:changed', [me, sindex]); me.fireEvent('sheet:changed', [me, sindex]);