Merge pull request #2165 from ONLYOFFICE/feature/Bug_59938
[common] For Bug 59938
This commit is contained in:
commit
a30a5dbeff
|
@ -92,8 +92,10 @@ class CommentsController extends Component {
|
||||||
}
|
}
|
||||||
addComment (id, data) {
|
addComment (id, data) {
|
||||||
const comment = this.readSDKComment(id, data);
|
const comment = this.readSDKComment(id, data);
|
||||||
|
|
||||||
if (comment) {
|
if (comment) {
|
||||||
this.storeComments.addComment(comment);
|
this.storeComments.addComment(comment);
|
||||||
|
this.changeShowComments([comment.uid]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
addComments (data) {
|
addComments (data) {
|
||||||
|
@ -294,6 +296,7 @@ class AddCommentController extends Component {
|
||||||
!!comment.asc_putDocumentFlag && comment.asc_putDocumentFlag(documentFlag);
|
!!comment.asc_putDocumentFlag && comment.asc_putDocumentFlag(documentFlag);
|
||||||
|
|
||||||
api.asc_addComment(comment);
|
api.asc_addComment(comment);
|
||||||
|
Common.Notifications.trigger('viewcomment');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -10,6 +10,7 @@ export class storeComments {
|
||||||
|
|
||||||
showComments: observable,
|
showComments: observable,
|
||||||
changeShowComment: action,
|
changeShowComment: action,
|
||||||
|
removeShowComment: action,
|
||||||
|
|
||||||
addComment: action,
|
addComment: action,
|
||||||
removeComment: action,
|
removeComment: action,
|
||||||
|
|
|
@ -791,10 +791,12 @@ const CommentList = inject("storeComments", "storeAppOptions", "storeReview")(ob
|
||||||
{isEdit && !viewMode &&
|
{isEdit && !viewMode &&
|
||||||
<Link className={`btn-add-reply${(wsProps?.Objects || isViewer) && !canEditComments ? ' disabled' : ''}`} href='#' onClick={() => {onCommentMenuClick('addReply', comment);}}>{_t.textAddReply}</Link>
|
<Link className={`btn-add-reply${(wsProps?.Objects || isViewer) && !canEditComments ? ' disabled' : ''}`} href='#' onClick={() => {onCommentMenuClick('addReply', comment);}}>{_t.textAddReply}</Link>
|
||||||
}
|
}
|
||||||
|
{comments.length > 1 &&
|
||||||
<div className='comment-navigation row'>
|
<div className='comment-navigation row'>
|
||||||
<Link href='#' onClick={onViewPrevComment}><Icon slot='media' icon='icon-prev'/></Link>
|
<Link href='#' onClick={onViewPrevComment}><Icon slot='media' icon='icon-prev'/></Link>
|
||||||
<Link href='#' onClick={onViewNextComment}><Icon slot='media' icon='icon-next'/></Link>
|
<Link href='#' onClick={onViewNextComment}><Icon slot='media' icon='icon-next'/></Link>
|
||||||
</div>
|
</div>
|
||||||
|
}
|
||||||
</Toolbar>
|
</Toolbar>
|
||||||
<div className='pages'>
|
<div className='pages'>
|
||||||
<Page className='page-current-comment'>
|
<Page className='page-current-comment'>
|
||||||
|
|
|
@ -505,8 +505,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.actions-button-text {
|
.actions-button-text {
|
||||||
height: 57px;
|
// height: 57px;
|
||||||
line-height: 57px;
|
// line-height: 57px;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
color: @text-normal;
|
color: @text-normal;
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
|
|
|
@ -123,7 +123,7 @@
|
||||||
"textMultiple": "multiple",
|
"textMultiple": "multiple",
|
||||||
"textNoBreakBefore": "No page break before",
|
"textNoBreakBefore": "No page break before",
|
||||||
"textNoChanges": "There are no changes.",
|
"textNoChanges": "There are no changes.",
|
||||||
"textNoComments": "This document doesn't contain comments",
|
"textNoComments": "No Comments",
|
||||||
"textNoContextual": "Add interval between paragraphs of the same style",
|
"textNoContextual": "Add interval between paragraphs of the same style",
|
||||||
"textNoKeepLines": "Don't keep lines together",
|
"textNoKeepLines": "Don't keep lines together",
|
||||||
"textNoKeepNext": "Don't keep with next",
|
"textNoKeepNext": "Don't keep with next",
|
||||||
|
|
|
@ -113,11 +113,12 @@ class MainPage extends Component {
|
||||||
const api = Common.EditorApi.get();
|
const api = Common.EditorApi.get();
|
||||||
const appOptions = this.props.storeAppOptions;
|
const appOptions = this.props.storeAppOptions;
|
||||||
|
|
||||||
|
f7.popover.close('.document-menu.modal-in', false);
|
||||||
|
f7.navbar.show('.main-navbar', false);
|
||||||
|
|
||||||
appOptions.changeViewerMode();
|
appOptions.changeViewerMode();
|
||||||
api.asc_removeRestriction(Asc.c_oAscRestrictionType.View)
|
api.asc_removeRestriction(Asc.c_oAscRestrictionType.View)
|
||||||
api.asc_addRestriction(Asc.c_oAscRestrictionType.None);
|
api.asc_addRestriction(Asc.c_oAscRestrictionType.None);
|
||||||
|
|
||||||
f7.navbar.show('.main-navbar');
|
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
"textEditUser": "Users who are editing the file:",
|
"textEditUser": "Users who are editing the file:",
|
||||||
"textMessageDeleteComment": "Do you really want to delete this comment?",
|
"textMessageDeleteComment": "Do you really want to delete this comment?",
|
||||||
"textMessageDeleteReply": "Do you really want to delete this reply?",
|
"textMessageDeleteReply": "Do you really want to delete this reply?",
|
||||||
"textNoComments": "This document doesn't contain comments",
|
"textNoComments": "No Comments",
|
||||||
"textOk": "Ok",
|
"textOk": "Ok",
|
||||||
"textReopen": "Reopen",
|
"textReopen": "Reopen",
|
||||||
"textResolve": "Resolve",
|
"textResolve": "Resolve",
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
"textEditUser": "Users who are editing the file:",
|
"textEditUser": "Users who are editing the file:",
|
||||||
"textMessageDeleteComment": "Do you really want to delete this comment?",
|
"textMessageDeleteComment": "Do you really want to delete this comment?",
|
||||||
"textMessageDeleteReply": "Do you really want to delete this reply?",
|
"textMessageDeleteReply": "Do you really want to delete this reply?",
|
||||||
"textNoComments": "This document doesn't contain comments",
|
"textNoComments": "No Comments",
|
||||||
"textOk": "Ok",
|
"textOk": "Ok",
|
||||||
"textReopen": "Reopen",
|
"textReopen": "Reopen",
|
||||||
"textResolve": "Resolve",
|
"textResolve": "Resolve",
|
||||||
|
|
Loading…
Reference in a new issue