[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,8 +149,8 @@ define([
/** coauthoring begin **/
onWorkbookLocked: function(locked) {
this.statusbar.tabbar[locked?'addClass':'removeClass']('coauth-locked');
this.statusbar.btnAddWorksheet.setDisabled(locked || this.statusbar.rangeSelectionMode==Asc.c_oAscSelectionDialogType.Chart ||
this.statusbar.rangeSelectionMode==Asc.c_oAscSelectionDialogType.FormatTable);
this.statusbar.btnAddWorksheet.setDisabled(locked || this.api.isCellEdited || this.statusbar.rangeSelectionMode==Asc.c_oAscSelectionDialogType.Chart ||
this.statusbar.rangeSelectionMode==Asc.c_oAscSelectionDialogType.FormatTable);
var item, i = this.statusbar.tabbar.getCount();
while (i-- > 0) {
item = this.statusbar.tabbar.getAt(i);
@ -206,6 +206,7 @@ define([
statusbar.btnZoomUp.setDisabled(disable);
statusbar.btnZoomDown.setDisabled(disable);
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;
statusbar.$el.find('.statusbar').toggleClass('masked', disableAdd);
@ -232,7 +233,7 @@ define([
onRangeDialogMode: function (mode) {
var islocked = this.statusbar.tabbar.hasClass('coauth-locked'),
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();
while (i-- > 0) {

View file

@ -355,7 +355,7 @@ define([
if (!this.tabbar.isTabVisible(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)));
me.fireEvent('sheet:changed', [me, sindex]);