mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-02 07:27:04 +00:00
fix
This commit is contained in:
@@ -12,7 +12,6 @@ const commentDialogPropTypes = {
|
|||||||
selectedText: PropTypes.string,
|
selectedText: PropTypes.string,
|
||||||
newIndex: PropTypes.number,
|
newIndex: PropTypes.number,
|
||||||
oldIndex: PropTypes.number,
|
oldIndex: PropTypes.number,
|
||||||
top: PropTypes.string
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class ReviewCommentDialog extends React.Component {
|
class ReviewCommentDialog extends React.Component {
|
||||||
@@ -88,9 +87,8 @@ class ReviewCommentDialog extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
let dialogTop = (parseInt(this.props.top) - 80)+ 'px';
|
|
||||||
return (
|
return (
|
||||||
<div className="review-comment-dialog" style={{top: (dialogTop)}}>
|
<div className="review-comment-dialog">
|
||||||
<div>{this.state.userName}</div>
|
<div>{this.state.userName}</div>
|
||||||
<textarea value={this.state.comment} onChange={this.handleCommentChange}></textarea>
|
<textarea value={this.state.comment} onChange={this.handleCommentChange}></textarea>
|
||||||
<div className="button-group">
|
<div className="button-group">
|
||||||
|
@@ -1,15 +1,13 @@
|
|||||||
.review-comment-dialog {
|
.review-comment-dialog {
|
||||||
width: 300px;
|
width: 500px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 200px;
|
top: 30%;
|
||||||
right: 0;
|
right: 0;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
background-color: #fafafa;
|
background-color: #fafafa;
|
||||||
background-clip: padding-box;
|
|
||||||
border: 1px solid rgba(0,0,0,.2);
|
border: 1px solid rgba(0,0,0,.2);
|
||||||
border-radius: .3rem;
|
border-radius: .3rem;
|
||||||
outline: 0;
|
box-shadow: 0 0 3px #ccc;
|
||||||
box-shadow: 0 0 5px #aaaaaa;
|
|
||||||
}
|
}
|
||||||
.review-comment-dialog-triangle {
|
.review-comment-dialog-triangle {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -21,14 +19,13 @@
|
|||||||
border-right: none;
|
border-right: none;
|
||||||
width: 10px;
|
width: 10px;
|
||||||
height: 10px;
|
height: 10px;
|
||||||
z-index: 1001;
|
|
||||||
background-color: #fafafa;
|
background-color: #fafafa;
|
||||||
box-shadow: -1px 1px #aaaaaa;
|
box-shadow: -1px 1px #ccc;
|
||||||
}
|
}
|
||||||
.review-comment-dialog textarea {
|
.review-comment-dialog textarea {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 100px;
|
min-height: 200px;
|
||||||
max-height: 200px;
|
max-height: 300px;
|
||||||
}
|
}
|
||||||
.review-comment-dialog .button-group .btn {
|
.review-comment-dialog .button-group .btn {
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
|
@@ -96,6 +96,11 @@
|
|||||||
.seafile-comment-item .seafile-comment-content td {
|
.seafile-comment-item .seafile-comment-content td {
|
||||||
border: 1px solid #333;
|
border: 1px solid #333;
|
||||||
}
|
}
|
||||||
|
.seafile-comment-item .seafile-comment-content blockquote {
|
||||||
|
word-wrap: break-word;
|
||||||
|
overflow: hidden;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
.seafile-comment-row-resize {
|
.seafile-comment-row-resize {
|
||||||
height: 5px;
|
height: 5px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@@ -22,7 +22,6 @@ import { findRange } from '@seafile/slate-react';
|
|||||||
import { Nav, NavItem, NavLink, TabContent, TabPane } from 'reactstrap';
|
import { Nav, NavItem, NavLink, TabContent, TabPane } from 'reactstrap';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
import HistoryList from './pages/review/history-list';
|
import HistoryList from './pages/review/history-list';
|
||||||
import Plain from 'slate-plain-serializer';
|
|
||||||
import { Document, Block, Value } from 'slate';
|
import { Document, Block, Value } from 'slate';
|
||||||
|
|
||||||
import './assets/css/fa-solid.css';
|
import './assets/css/fa-solid.css';
|
||||||
@@ -55,7 +54,6 @@ class DraftReview extends React.Component {
|
|||||||
totalReversionCount: 0,
|
totalReversionCount: 0,
|
||||||
changedNodes: [],
|
changedNodes: [],
|
||||||
isShowCommentDialog: false,
|
isShowCommentDialog: false,
|
||||||
commentBtnTop: '-1000px',
|
|
||||||
};
|
};
|
||||||
this.selectedText = '';
|
this.selectedText = '';
|
||||||
this.newIndex = null;
|
this.newIndex = null;
|
||||||
@@ -239,11 +237,7 @@ class DraftReview extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
let style = this.refs.commentbtn.style;
|
let style = this.refs.commentbtn.style;
|
||||||
let commentBtnTop = `${rect.top - 100 + this.refs.viewContent.scrollTop}px`;
|
style.top = `${rect.top - 100 + this.refs.viewContent.scrollTop}px`;
|
||||||
style.top = commentBtnTop;
|
|
||||||
this.setState({
|
|
||||||
commentBtnTop: commentBtnTop
|
|
||||||
});
|
|
||||||
return range;
|
return range;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -557,16 +551,6 @@ class DraftReview extends React.Component {
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
<i className="fa fa-plus-square review-comment-btn" ref="commentbtn" onMouseDown={this.addComment}></i>
|
<i className="fa fa-plus-square review-comment-btn" ref="commentbtn" onMouseDown={this.addComment}></i>
|
||||||
{this.state.isShowCommentDialog &&
|
|
||||||
<ReviewCommentDialog
|
|
||||||
toggleCommentDialog={this.toggleCommentDialog}
|
|
||||||
onCommentAdded={this.onCommentAdded}
|
|
||||||
selectedText={this.selectedText}
|
|
||||||
newIndex={this.newIndex}
|
|
||||||
oldIndex={this.oldIndex}
|
|
||||||
top={this.state.commentBtnTop}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
@@ -645,6 +629,15 @@ class DraftReview extends React.Component {
|
|||||||
reviewers={this.state.reviewers}
|
reviewers={this.state.reviewers}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
{this.state.isShowCommentDialog &&
|
||||||
|
<ReviewCommentDialog
|
||||||
|
toggleCommentDialog={this.toggleCommentDialog}
|
||||||
|
onCommentAdded={this.onCommentAdded}
|
||||||
|
selectedText={this.selectedText}
|
||||||
|
newIndex={this.newIndex}
|
||||||
|
oldIndex={this.oldIndex}
|
||||||
|
/>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user