diff --git a/apps/spreadsheeteditor/main/app/controller/WBProtection.js b/apps/spreadsheeteditor/main/app/controller/WBProtection.js index 4e9bbfcb4..669ee7f03 100644 --- a/apps/spreadsheeteditor/main/app/controller/WBProtection.js +++ b/apps/spreadsheeteditor/main/app/controller/WBProtection.js @@ -269,7 +269,10 @@ define([ resolve(); })).then(function () { me.view.btnProtectWB.toggle(me.api.asc_isProtectedWorkbook(), true); - me.view.btnProtectSheet.toggle(me.api.asc_isProtectedSheet(), true); //current sheet + + var props = me.getWSProps(); + me.view.btnProtectSheet.toggle(props.wsLock, true); //current sheet + Common.Utils.lockControls(SSE.enumLock['Objects'], props.wsProps['Objects'], { array: [me.view.chLockedText, me.view.chLockedShape]}); }); }, @@ -281,6 +284,7 @@ define([ var props = this.getWSProps(); this.view.btnProtectSheet.toggle(props.wsLock, true); //current sheet + Common.Utils.lockControls(SSE.enumLock['Objects'], props.wsProps['Objects'], { array: [this.view.chLockedText, this.view.chLockedShape]}); Common.NotificationCenter.trigger('protect:wslock', props); }, diff --git a/apps/spreadsheeteditor/main/app/view/WBProtection.js b/apps/spreadsheeteditor/main/app/view/WBProtection.js index ad7e0e483..46dbc1317 100644 --- a/apps/spreadsheeteditor/main/app/view/WBProtection.js +++ b/apps/spreadsheeteditor/main/app/view/WBProtection.js @@ -145,13 +145,13 @@ define([ this.chLockedShape = new Common.UI.CheckBox({ labelText: this.txtLockedShape, - lock : [_set.selRange, _set.selRangeEdit, _set.wsLock, _set.wbLock, _set.lostConnect, _set.coAuth] + lock : [_set.selRange, _set.selRangeEdit, _set.wbLock, _set.lostConnect, _set.coAuth, _set['Objects']] }); this.lockedControls.push(this.chLockedShape); this.chLockedText = new Common.UI.CheckBox({ labelText: this.txtLockedText, - lock : [_set.selRange, _set.selRangeEdit, _set.selRangeEdit, _set.wsLock, _set.wbLock, _set.lostConnect, _set.coAuth] + lock : [_set.selRange, _set.selRangeEdit, _set.selRangeEdit, _set.selImage, _set.wbLock, _set.lostConnect, _set.coAuth, _set['Objects']] }); this.lockedControls.push(this.chLockedText);