[SSE] Fix Bug 56714
This commit is contained in:
parent
8682735906
commit
b3d2bea619
|
@ -14,6 +14,7 @@ import EditorUIController from '../lib/patch';
|
|||
canComments: stores.storeAppOptions.canComments,
|
||||
canViewComments: stores.storeAppOptions.canViewComments,
|
||||
canCoAuthoring: stores.storeAppOptions.canCoAuthoring,
|
||||
isRestrictedEdit: stores.storeAppOptions.isRestrictedEdit,
|
||||
users: stores.users,
|
||||
isDisconnected: stores.users.isDisconnected,
|
||||
storeSheets: stores.sheets,
|
||||
|
@ -215,12 +216,12 @@ class ContextMenu extends ContextMenuController {
|
|||
const { t } = this.props;
|
||||
const _t = t("ContextMenu", { returnObjects: true });
|
||||
|
||||
const { isEdit, isDisconnected } = this.props;
|
||||
const { isEdit, isRestrictedEdit, isDisconnected } = this.props;
|
||||
|
||||
if (isEdit && EditorUIController.ContextMenu) {
|
||||
return EditorUIController.ContextMenu.mapMenuItems(this);
|
||||
} else {
|
||||
const {canViewComments} = this.props;
|
||||
const {canViewComments, canCoAuthoring, canComments} = this.props;
|
||||
|
||||
const api = Common.EditorApi.get();
|
||||
const cellinfo = api.asc_getCellInfo();
|
||||
|
@ -262,6 +263,13 @@ class ContextMenu extends ContextMenuController {
|
|||
event: 'viewcomment'
|
||||
});
|
||||
}
|
||||
|
||||
if (iscellmenu && !api.isCellEdited && isRestrictedEdit && canCoAuthoring && canComments && hasComments && hasComments.length<1) {
|
||||
itemsText.push({
|
||||
caption: _t.menuAddComment,
|
||||
event: 'addcomment'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return itemsIcon.concat(itemsText);
|
||||
|
|
Loading…
Reference in a new issue