From 4387c9083da04c465e2bed3bf786c9d33ceb3bfc Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Sat, 29 Jun 2019 11:09:45 +0800
Subject: [PATCH] css
---
public/react/src/modules/comment/Comment.css | 1 +
.../src/modules/courses/boards/TopicDetail.js | 8 +++-
.../modules/courses/common/CommentsHelper.js | 4 +-
.../courses/common/comments/CommonReply.js | 2 +-
.../tasks/GraduationTaskssettingReply.js | 2 +-
.../graduation/topics/GraduateTopicReply.js | 2 +-
.../src/modules/forums/MemoDetailMDEditor.js | 6 +--
public/react/src/scripts/concat.js | 48 +++++++++++++++++++
8 files changed, 63 insertions(+), 10 deletions(-)
diff --git a/public/react/src/modules/comment/Comment.css b/public/react/src/modules/comment/Comment.css
index 2f85846b6..f21a9c8cf 100644
--- a/public/react/src/modules/comment/Comment.css
+++ b/public/react/src/modules/comment/Comment.css
@@ -238,6 +238,7 @@
width: 100%;
word-wrap: break-word;
margin-bottom: 4px;
+ margin-top: 4px;
}
.childComment .break_word_comments{
line-height: 22px;
diff --git a/public/react/src/modules/courses/boards/TopicDetail.js b/public/react/src/modules/courses/boards/TopicDetail.js
index e333c17ee..325bbde0d 100644
--- a/public/react/src/modules/courses/boards/TopicDetail.js
+++ b/public/react/src/modules/courses/boards/TopicDetail.js
@@ -416,7 +416,7 @@ class TopicDetail extends Component {
const user = this._getUser();
this.setState({
- comments: addNewComment(comments, _id, content, user)
+ comments: addNewComment(comments, _id, content, user, this)
})
const newMemo2 = Object.assign({}, this.state.memo);
newMemo2.total_replies_count = newMemo2.total_replies_count + 1;
@@ -531,6 +531,10 @@ class TopicDetail extends Component {
.topicDetail #forum_list .return_btn.no_mr {
margin-right: 1px;
}
+ /* 有内容时,编辑器下方的边框*/
+ .topicDetail .borderBottom.commentInputs {
+ border-bottom: 1px solid rgb(238, 238, 238);
+ }
.independent {
background: rgb(250, 250, 250);
padding-bottom: 20px;
@@ -661,7 +665,7 @@ class TopicDetail extends Component {
+ height={160} showError={true} buttonText={'发表'} className={comments && comments.length && 'borderBottom'}>
{/* onClick={ this.createNewComment }
enableReplyTo={true}
diff --git a/public/react/src/modules/courses/common/CommentsHelper.js b/public/react/src/modules/courses/common/CommentsHelper.js
index b4254445d..e513263bc 100644
--- a/public/react/src/modules/courses/common/CommentsHelper.js
+++ b/public/react/src/modules/courses/common/CommentsHelper.js
@@ -64,13 +64,13 @@ export function handleContentBeforeCreateNew(argContent) {
return content
}
-export function addNewComment(comments, _id, content, user, isSuperAdmin) {
+export function addNewComment(comments, _id, content, user, isSuperAdmin, parentComponent) {
if (!comments) {
comments = [];
}
comments.unshift( {
"can_delete": true,
- "admin": user.admin,
+ "admin": parentComponent ? parentComponent.props.isAdmin() : user.admin ,
isSuperAdmin: isSuperAdmin,
"content": content,
diff --git a/public/react/src/modules/courses/common/comments/CommonReply.js b/public/react/src/modules/courses/common/comments/CommonReply.js
index 739e62c97..dae21949c 100644
--- a/public/react/src/modules/courses/common/comments/CommonReply.js
+++ b/public/react/src/modules/courses/common/comments/CommonReply.js
@@ -76,7 +76,7 @@ class CommonReply extends Component{
const isSuperAdmin = this.props.isSuperAdmin()
this.setState({
- comments: addNewComment(this.state.comments, _id, content, user, isSuperAdmin),
+ comments: addNewComment(this.state.comments, _id, content, user, isSuperAdmin, this),
total_count: this.state.total_count + 1
})
this.refs.editor.showEditor();
diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingReply.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingReply.js
index 664c4a629..4281d0ec6 100644
--- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingReply.js
+++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingReply.js
@@ -73,7 +73,7 @@ class GraduationTaskssettingReply extends Component{
const user = this._getUser();
this.setState({
- comments: addNewComment(this.state.comments, _id, content, user),
+ comments: addNewComment(this.state.comments, _id, content, user, this.props.isSuperAdmin(), this),
total_count: this.state.total_count + 1
})
this.refs.editor.showEditor();
diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicReply.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicReply.js
index 114efa213..4e318a0c1 100644
--- a/public/react/src/modules/courses/graduation/topics/GraduateTopicReply.js
+++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicReply.js
@@ -67,7 +67,7 @@ class GraduateTopicReply extends Component{
const user = this._getUser();
this.setState({
- comments: addNewComment(this.state.comments, _id, content, user),
+ comments: addNewComment(this.state.comments, _id, content, user, this.props.isSuperAdmin(), this),
total_count: this.state.total_count + 1
})
this.refs.editor.showEditor();
diff --git a/public/react/src/modules/forums/MemoDetailMDEditor.js b/public/react/src/modules/forums/MemoDetailMDEditor.js
index 6fd650cea..68445b0d7 100644
--- a/public/react/src/modules/forums/MemoDetailMDEditor.js
+++ b/public/react/src/modules/forums/MemoDetailMDEditor.js
@@ -117,7 +117,7 @@ class MemoDetailMDEditor extends Component {
this.initMDEditor()
}
render() {
- const { match, history, memo, placeholder } = this.props
+ const { match, history, memo, placeholder, className } = this.props
const { isInited, errorMsg } = this.state
if (!memo) {
return
@@ -154,7 +154,7 @@ class MemoDetailMDEditor extends Component {
}
`}