diff --git a/public/react/src/modules/courses/boards/BoardsNew.js b/public/react/src/modules/courses/boards/BoardsNew.js index b3c267c94..d8acffc83 100644 --- a/public/react/src/modules/courses/boards/BoardsNew.js +++ b/public/react/src/modules/courses/boards/BoardsNew.js @@ -318,16 +318,20 @@ class BoardsNew extends Component{ label="标题" className="topicTitle notRequired" > - {getFieldDecorator('sticky', { - valuePropName: 'checked', - })( - 置顶 - )} - {/* checkbox 有个边距样式 .ant-checkbox-wrapper + span, */} - + { isAdmin && + + {getFieldDecorator('sticky', { + valuePropName: 'checked', + })( + isAdmin && 置顶 + )} + {/* checkbox 有个边距样式 .ant-checkbox-wrapper + span, */} + + + } {getFieldDecorator('subject', { rules: [{ required: true, message: '请输入标题', diff --git a/public/react/src/modules/courses/boards/TopicDetail.js b/public/react/src/modules/courses/boards/TopicDetail.js index 702928f80..6e645fc27 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, this) + comments: addNewComment(comments, _id, content, user, this.props.isSuperAdmin(), this) }) const newMemo2 = Object.assign({}, this.state.memo); newMemo2.total_replies_count = newMemo2.total_replies_count + 1; @@ -540,6 +540,10 @@ class TopicDetail extends Component { padding-bottom: 20px; margin-bottom: 0px !important; } + + .course-message.topicDetail .panel-comment_item .comment_orig_content { + width: 1072px; + } `} } */} - { total_count > REPLY_PAGE_COUNT && -
- + +
+ { total_count > REPLY_PAGE_COUNT && + + }
写评论
-
} +
diff --git a/public/react/src/modules/forums/MemoDetailMDEditor.js b/public/react/src/modules/forums/MemoDetailMDEditor.js index 68445b0d7..f15a19e20 100644 --- a/public/react/src/modules/forums/MemoDetailMDEditor.js +++ b/public/react/src/modules/forums/MemoDetailMDEditor.js @@ -32,6 +32,7 @@ class MemoDetailMDEditor extends Component { } initMDEditor = () => { + // 因为props.memo不存在时,本组件不会被加载,这里直接在didMount里初始化即可 const placeholder = '我要回复...' // const imageUrl = `/upload_with_markdown?container_id=${this.props.memo.id}&container_type=Memo`; @@ -42,7 +43,7 @@ class MemoDetailMDEditor extends Component { setTimeout(() => { var commentMDEditor = window.create_editorMD_4comment("memo_comment_editorMd", '', this.props.height || 240, placeholder, imageUrl, () => { commentMDEditor.focus() - + this.isMDInited = true this.initDrag() commentMDEditor.cm.on("change", (_cm, changeObj) => { @@ -114,7 +115,13 @@ class MemoDetailMDEditor extends Component { } onMockInputClick = () => { this.setState({isInited: true}) - this.initMDEditor() + if (!this.isMDInited) { + this.initMDEditor() + } else { + setTimeout(() => { + this.commentMDEditor.focus() + }, 10) + } } render() { const { match, history, memo, placeholder, className } = this.props