Merge pull request #2024 from ONLYOFFICE/fix/bug-lock-comments
Fix/bug lock comments
This commit is contained in:
commit
36e40891dd
|
@ -2879,6 +2879,12 @@ define([
|
|||
toolbar.lockToolbar(Common.enumLock['Objects'], !!this._state.wsProps['Objects']);
|
||||
toolbar.lockToolbar(Common.enumLock['FormatCells'], !!this._state.wsProps['FormatCells']);
|
||||
|
||||
// info.asc_getComments()===null - has comment, but no permissions to view it
|
||||
toolbar.lockToolbar(Common.enumLock.commentLock,
|
||||
(selectionType == Asc.c_oAscSelectionType.RangeCells) && (!info.asc_getComments() || info.asc_getComments().length>0 || info.asc_getLocked())
|
||||
|| selectionType != Asc.c_oAscSelectionType.RangeCells,
|
||||
{ array: this.btnsComment });
|
||||
|
||||
if (editOptionsDisabled) return;
|
||||
|
||||
/* read font params */
|
||||
|
@ -3234,10 +3240,6 @@ define([
|
|||
}
|
||||
toolbar.lockToolbar(Common.enumLock.itemsDisabled, !enabled, {array: [toolbar.btnDeleteCell]});
|
||||
|
||||
// info.asc_getComments()===null - has comment, but no permissions to view it
|
||||
toolbar.lockToolbar(Common.enumLock.commentLock, (selectionType == Asc.c_oAscSelectionType.RangeCells) && (!info.asc_getComments() || info.asc_getComments().length>0 || info.asc_getLocked()) ||
|
||||
this.toolbar.mode.compatibleFeatures && (selectionType != Asc.c_oAscSelectionType.RangeCells),
|
||||
{ array: this.btnsComment });
|
||||
|
||||
toolbar.lockToolbar(Common.enumLock.headerLock, info.asc_getLockedHeaderFooter(), {array: this.toolbar.btnsEditHeader});
|
||||
},
|
||||
|
@ -3246,8 +3248,9 @@ define([
|
|||
if (!this.appConfig.isRestrictedEdit) return;
|
||||
|
||||
var selectionType = info.asc_getSelectionType();
|
||||
this.toolbar.lockToolbar(Common.enumLock.commentLock, (selectionType == Asc.c_oAscSelectionType.RangeCells) && (!info.asc_getComments() || info.asc_getComments().length>0 || info.asc_getLocked()) ||
|
||||
this.appConfig && this.appConfig.compatibleFeatures && (selectionType != Asc.c_oAscSelectionType.RangeCells),
|
||||
this.toolbar.lockToolbar(Common.enumLock.commentLock,
|
||||
(selectionType == Asc.c_oAscSelectionType.RangeCells) && (!info.asc_getComments() || info.asc_getComments().length>0 || info.asc_getLocked())
|
||||
|| selectionType != Asc.c_oAscSelectionType.RangeCells,
|
||||
{ array: this.btnsComment });
|
||||
this.toolbar.lockToolbar(Common.enumLock['Objects'], !!this._state.wsProps['Objects'], { array: this.btnsComment });
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue