[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,
|
canComments: stores.storeAppOptions.canComments,
|
||||||
canViewComments: stores.storeAppOptions.canViewComments,
|
canViewComments: stores.storeAppOptions.canViewComments,
|
||||||
canCoAuthoring: stores.storeAppOptions.canCoAuthoring,
|
canCoAuthoring: stores.storeAppOptions.canCoAuthoring,
|
||||||
|
isRestrictedEdit: stores.storeAppOptions.isRestrictedEdit,
|
||||||
users: stores.users,
|
users: stores.users,
|
||||||
isDisconnected: stores.users.isDisconnected,
|
isDisconnected: stores.users.isDisconnected,
|
||||||
storeSheets: stores.sheets,
|
storeSheets: stores.sheets,
|
||||||
|
@ -215,12 +216,12 @@ class ContextMenu extends ContextMenuController {
|
||||||
const { t } = this.props;
|
const { t } = this.props;
|
||||||
const _t = t("ContextMenu", { returnObjects: true });
|
const _t = t("ContextMenu", { returnObjects: true });
|
||||||
|
|
||||||
const { isEdit, isDisconnected } = this.props;
|
const { isEdit, isRestrictedEdit, isDisconnected } = this.props;
|
||||||
|
|
||||||
if (isEdit && EditorUIController.ContextMenu) {
|
if (isEdit && EditorUIController.ContextMenu) {
|
||||||
return EditorUIController.ContextMenu.mapMenuItems(this);
|
return EditorUIController.ContextMenu.mapMenuItems(this);
|
||||||
} else {
|
} else {
|
||||||
const {canViewComments} = this.props;
|
const {canViewComments, canCoAuthoring, canComments} = this.props;
|
||||||
|
|
||||||
const api = Common.EditorApi.get();
|
const api = Common.EditorApi.get();
|
||||||
const cellinfo = api.asc_getCellInfo();
|
const cellinfo = api.asc_getCellInfo();
|
||||||
|
@ -262,6 +263,13 @@ class ContextMenu extends ContextMenuController {
|
||||||
event: 'viewcomment'
|
event: 'viewcomment'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (iscellmenu && !api.isCellEdited && isRestrictedEdit && canCoAuthoring && canComments && hasComments && hasComments.length<1) {
|
||||||
|
itemsText.push({
|
||||||
|
caption: _t.menuAddComment,
|
||||||
|
event: 'addcomment'
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return itemsIcon.concat(itemsText);
|
return itemsIcon.concat(itemsText);
|
||||||
|
|
Loading…
Reference in a new issue