Fix undo in comment mode

This commit is contained in:
Julia Radzhabova 2022-05-04 22:34:10 +03:00
parent 16587b4b44
commit bfa0b138a5
3 changed files with 3 additions and 3 deletions

View file

@ -169,7 +169,7 @@ define([
} }
me.menuViewUndo.setVisible(me.mode.canCoAuthoring && me.mode.canComments && !me._isDisabled); me.menuViewUndo.setVisible(me.mode.canCoAuthoring && me.mode.canComments && !me._isDisabled);
me.menuViewUndo.setDisabled(!me.api.asc_getCanUndo() && !me._isDisabled); me.menuViewUndo.setDisabled(!me.api.asc_getCanUndo());
me.menuViewCopySeparator.setVisible(isInSign); me.menuViewCopySeparator.setVisible(isInSign);
var isRequested = (signProps) ? signProps.asc_getRequested() : false; var isRequested = (signProps) ? signProps.asc_getRequested() : false;

View file

@ -1855,7 +1855,7 @@ define([
cls: 'shifted-right', cls: 'shifted-right',
initMenu: function (value) { initMenu: function (value) {
menuViewUndo.setVisible(me.mode.canCoAuthoring && me.mode.canComments && !me._isDisabled); menuViewUndo.setVisible(me.mode.canCoAuthoring && me.mode.canComments && !me._isDisabled);
menuViewUndo.setDisabled(!me.api.asc_getCanUndo() && !me._isDisabled); menuViewUndo.setDisabled(!me.api.asc_getCanUndo());
menuViewCopySeparator.setVisible(!value.isChart && me.api.can_AddQuotedComment() !== false && me.mode.canCoAuthoring && me.mode.canComments && !me._isDisabled); menuViewCopySeparator.setVisible(!value.isChart && me.api.can_AddQuotedComment() !== false && me.mode.canCoAuthoring && me.mode.canComments && !me._isDisabled);
menuViewAddComment.setVisible(!value.isChart && me.api.can_AddQuotedComment() !== false && me.mode.canCoAuthoring && me.mode.canComments && !me._isDisabled); menuViewAddComment.setVisible(!value.isChart && me.api.can_AddQuotedComment() !== false && me.mode.canCoAuthoring && me.mode.canComments && !me._isDisabled);
menuViewAddComment.setDisabled(value.locked); menuViewAddComment.setDisabled(value.locked);

View file

@ -2327,7 +2327,7 @@ define([
canComment = iscellmenu && !iscelledit && this.permissions.canCoAuthoring && this.permissions.canComments && !this._isDisabled && cellinfo.asc_getComments() && cellinfo.asc_getComments().length < 1; canComment = iscellmenu && !iscelledit && this.permissions.canCoAuthoring && this.permissions.canComments && !this._isDisabled && cellinfo.asc_getComments() && cellinfo.asc_getComments().length < 1;
documentHolder.menuViewUndo.setVisible(this.permissions.canCoAuthoring && this.permissions.canComments && !this._isDisabled); documentHolder.menuViewUndo.setVisible(this.permissions.canCoAuthoring && this.permissions.canComments && !this._isDisabled);
documentHolder.menuViewUndo.setDisabled(!this.api.asc_getCanUndo() && !this._isDisabled); documentHolder.menuViewUndo.setDisabled(!this.api.asc_getCanUndo());
documentHolder.menuViewCopySeparator.setVisible(isInSign); documentHolder.menuViewCopySeparator.setVisible(isInSign);
var isRequested = (signProps) ? signProps.asc_getRequested() : false; var isRequested = (signProps) ? signProps.asc_getRequested() : false;