diff --git a/apps/spreadsheeteditor/main/app/controller/Statusbar.js b/apps/spreadsheeteditor/main/app/controller/Statusbar.js index 4e5b7beac..64bc4b9a5 100644 --- a/apps/spreadsheeteditor/main/app/controller/Statusbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Statusbar.js @@ -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) { diff --git a/apps/spreadsheeteditor/main/app/view/Statusbar.js b/apps/spreadsheeteditor/main/app/view/Statusbar.js index 19997ffa2..f4d3374d4 100644 --- a/apps/spreadsheeteditor/main/app/view/Statusbar.js +++ b/apps/spreadsheeteditor/main/app/view/Statusbar.js @@ -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]);