diff --git a/apps/spreadsheeteditor/main/app/controller/RightMenu.js b/apps/spreadsheeteditor/main/app/controller/RightMenu.js index b6a014a105..8096a8a694 100644 --- a/apps/spreadsheeteditor/main/app/controller/RightMenu.js +++ b/apps/spreadsheeteditor/main/app/controller/RightMenu.js @@ -117,10 +117,9 @@ define([ this._openRightMenu = true; } - this.onFocusObject(SelectedObjects, formatTableInfo); + var need_disable = info.asc_getLocked(); - var need_disable = info.asc_getLocked(), - me = this; + this.onFocusObject(SelectedObjects, formatTableInfo, need_disable); if (this._state.prevDisabled != need_disable) { this._state.prevDisabled = need_disable; @@ -130,7 +129,7 @@ define([ } }, - onFocusObject: function(SelectedObjects, formatTableInfo) { + onFocusObject: function(SelectedObjects, formatTableInfo, isCellLocked) { if (!this.editMode) return; @@ -171,6 +170,7 @@ define([ if (formatTableInfo) { settingsType = Common.Utils.documentSettingsType.Table; this._settings[settingsType].props = formatTableInfo; + this._settings[settingsType].locked = isCellLocked; this._settings[settingsType].hidden = 0; } diff --git a/apps/spreadsheeteditor/main/app/view/TableSettings.js b/apps/spreadsheeteditor/main/app/view/TableSettings.js index 4f326c9221..f9317d0219 100644 --- a/apps/spreadsheeteditor/main/app/view/TableSettings.js +++ b/apps/spreadsheeteditor/main/app/view/TableSettings.js @@ -328,8 +328,8 @@ define([ this.chFilter.setValue(value, true); this._state.CheckFilter=value; } - if (this.chFilter.isDisabled() == this._state.CheckHeader) - this.chFilter.setDisabled(!this._state.CheckHeader); + if (this.chFilter.isDisabled() !== (!this._state.CheckHeader || this._locked)) + this.chFilter.setDisabled(!this._state.CheckHeader || this._locked); if (needTablePictures) this.onApiInitTableTemplates(this.api.asc_getTablePictures(props));