From ce5dfa17ce30ad57dbd579ad9a89e7469289599f Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 29 Jun 2019 10:29:38 +0800 Subject: [PATCH 1/6] no_mr --- public/react/src/modules/courses/boards/TopicDetail.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/boards/TopicDetail.js b/public/react/src/modules/courses/boards/TopicDetail.js index 0c25910f5..e333c17ee 100644 --- a/public/react/src/modules/courses/boards/TopicDetail.js +++ b/public/react/src/modules/courses/boards/TopicDetail.js @@ -526,8 +526,11 @@ class TopicDetail extends Component { const courseId=this.props.match.params.coursesId; const boardId = this.props.match.params.boardId return ( -
{/* fl with100 */} +
{/* fl with100 */}
+ className={`mockInputWrapper commentInput ${className}`} > @@ -172,7 +172,7 @@ class MemoDetailMDEditor extends Component { ` } */} -
diff --git a/public/react/src/scripts/concat.js b/public/react/src/scripts/concat.js index 3a40eef91..67e8d4836 100644 --- a/public/react/src/scripts/concat.js +++ b/public/react/src/scripts/concat.js @@ -97,3 +97,51 @@ return; // var uglified = uglify.minify(['file1.js', 'file2.js', 'file3.js']); + + +/** + 优化 + underscore被单独加载了,去掉'D:\\Code\\trustieplus\\public\\react\\public\\js\\editormd\\underscore.min.js', + marked + raphaeljs sequence diagrams 1.0.4 + + + 统计 js_min_all加载的js: + https://github.com/paulmillr/es6-shim + jQuery v1.8.3 jquery.com + Underscore.js 1.8.2 + marked v0.3.3 + ??? + Raphaël 2.1.3 - JavaScript Vector Library + flowchart, v1.3.4 + editormd.js + CodeMirror + cm active-line.js + cm mode javascript + cm merge.js + CodeMirror addon hint + cm showHint + cm anyword-hint + CodeMirror python + CodeMirror c-like(java) + CodeMirror matchbrackets + + + + ???——> + // Copyright (C) 2006 Google Inc. + // + // Licensed under the Apache License, Version 2.0 (the "License"); + // you may not use this file except in compliance with the License. + // You may obtain a copy of the License at + // + // http://www.apache.org/licenses/LICENSE-2.0 + // + // Unless required by applicable law or agreed to in writing, software + // distributed under the License is distributed on an "AS IS" BASIS, + // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + // See the License for the specific language governing permissions and + // limitations under the License. + + + */ \ No newline at end of file From 53379b34877b56348b65521f86e6fb1a30650f47 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 29 Jun 2019 13:44:55 +0800 Subject: [PATCH 3/6] css --- .../src/modules/comment/CommentItemMDEditor.js | 17 ++++++++++------- public/react/src/modules/comment/Comments.js | 1 + .../courses/common/comments/CCommentItem.js | 2 +- .../modules/courses/common/courseMessage.css | 4 +++- .../graduation/tasks/Graduationtaskitem.js | 2 +- 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/public/react/src/modules/comment/CommentItemMDEditor.js b/public/react/src/modules/comment/CommentItemMDEditor.js index 3c89d0800..98afa4228 100644 --- a/public/react/src/modules/comment/CommentItemMDEditor.js +++ b/public/react/src/modules/comment/CommentItemMDEditor.js @@ -96,7 +96,7 @@ class CommentItemMDEditor extends Component { } render() { - const { match, history, item, user } = this.props + const { match, history, item, user, buttonText } = this.props if (!item) { return
} @@ -111,7 +111,7 @@ class CommentItemMDEditor extends Component {
From 14a638c34ecd7648aa2b2b7a943ddc8d6be6fac9 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 29 Jun 2019 15:23:39 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/exercise/new/JudgeEditor.js | 10 +++++----- .../src/modules/courses/exercise/new/MainEditor.js | 6 +++--- .../src/modules/courses/exercise/new/NullEditor.js | 11 ++++++----- .../src/modules/courses/exercise/new/ShixunEditor.js | 2 +- .../src/modules/courses/exercise/new/SingleEditor.js | 4 ++-- 5 files changed, 17 insertions(+), 16 deletions(-) diff --git a/public/react/src/modules/courses/exercise/new/JudgeEditor.js b/public/react/src/modules/courses/exercise/new/JudgeEditor.js index 280faa2e3..586d77ed0 100644 --- a/public/react/src/modules/courses/exercise/new/JudgeEditor.js +++ b/public/react/src/modules/courses/exercise/new/JudgeEditor.js @@ -56,23 +56,23 @@ class SingleEditor extends Component{ const answerArray = standard_answers.map((item, index) => { return item == true ? index+1 : -1 }).filter(item => item != -1); if(!question_title) { this.refs['titleEditor'].showError() - this.props.showNotification('题目不能为空'); return; + this.props.showNotification('题目:不能为空'); return; } const intScore = parseFloat(question_score) if(!question_score || intScore == NaN) { - this.props.showNotification('分值不能为空'); return; + this.props.showNotification('分值:不能为空'); return; } else { if (intScore == 0) { - this.props.showNotification('分值必须大于0'); return; + this.props.showNotification('分值:必须大于0'); return; } } if(!answerArray || answerArray.length == 0) { - this.props.showNotification('请先点击本题的正确选项'); return; + this.props.showNotification('必须设置标准答案'); return; } if(!question_title) { this.refs['titleEditor'].showError() - this.props.showNotification('题目不能为空'); return; + this.props.showNotification('题目:不能为空'); return; } diff --git a/public/react/src/modules/courses/exercise/new/MainEditor.js b/public/react/src/modules/courses/exercise/new/MainEditor.js index 9f6e643df..e9dd3b105 100644 --- a/public/react/src/modules/courses/exercise/new/MainEditor.js +++ b/public/react/src/modules/courses/exercise/new/MainEditor.js @@ -46,16 +46,16 @@ class MainEditor extends Component{ const answerArray = standard_answers if(!question_title) { this.refs['titleEditor'].showError() - this.props.showNotification('题目不能为空'); return; + this.props.showNotification('题目:不能为空'); return; } const intScore = parseFloat(question_score) if(!question_score || intScore == NaN) { - this.props.showNotification('分值不能为空'); return; + this.props.showNotification('分值:不能为空'); return; } else { if (intScore == 0) { - this.props.showNotification('分值必须大于0'); return; + this.props.showNotification('分值:必须大于0'); return; } } // if(!answerArray || answerArray.length == 0 || !answerArray[0]) { diff --git a/public/react/src/modules/courses/exercise/new/NullEditor.js b/public/react/src/modules/courses/exercise/new/NullEditor.js index dddadcf0a..299daf904 100644 --- a/public/react/src/modules/courses/exercise/new/NullEditor.js +++ b/public/react/src/modules/courses/exercise/new/NullEditor.js @@ -70,15 +70,15 @@ class NullEditor extends Component{ let answerArray = [] if(!question_title) { this.refs['titleEditor'].showError() - this.props.showNotification('题目不能为空'); return; + this.props.showNotification('题目:不能为空'); return; } const intScore = parseFloat(question_score) if(!question_score || intScore == NaN) { - this.props.showNotification('分值不能为空'); return; + this.props.showNotification('分值:不能为空'); return; } else { if (intScore == 0) { - this.props.showNotification('分值必须大于0'); return; + this.props.showNotification('分值:必须大于0'); return; } } let isEmpty = false; @@ -91,7 +91,8 @@ class NullEditor extends Component{ answerArray[index].answer_text.push(item) if(!item) { this.refs[`nullChildEditor${index}`].showError(itemIndex) - this.props.showNotification(`请先输入第${index+1}个填空的第${itemIndex+1}参考答案。`); + // this.props.showNotification(`请先输入第${index+1}个填空的第${itemIndex+1}参考答案。`); + this.props.showNotification(`答案:不能为空`); isEmpty = true; } }) @@ -101,7 +102,7 @@ class NullEditor extends Component{ } if(!question_title) { this.refs['titleEditor'].showError() - this.props.showNotification('题目不能为空'); return; + this.props.showNotification('题目:不能为空'); return; } diff --git a/public/react/src/modules/courses/exercise/new/ShixunEditor.js b/public/react/src/modules/courses/exercise/new/ShixunEditor.js index 581467257..e4835ee10 100644 --- a/public/react/src/modules/courses/exercise/new/ShixunEditor.js +++ b/public/react/src/modules/courses/exercise/new/ShixunEditor.js @@ -98,7 +98,7 @@ class ShixunEditor extends Component{ // } for(let _i = 0; _i < question_scores.length; _i++) { if (!question_scores[_i] || question_scores[_i] == '0') { - this.props.showNotification(`第${_i+1}题的分值必须大于0`); return; + this.props.showNotification(`第${_i+1}题的分值:必须大于0`); return; } } diff --git a/public/react/src/modules/courses/exercise/new/SingleEditor.js b/public/react/src/modules/courses/exercise/new/SingleEditor.js index a9e8aa3f5..8e68a593c 100644 --- a/public/react/src/modules/courses/exercise/new/SingleEditor.js +++ b/public/react/src/modules/courses/exercise/new/SingleEditor.js @@ -88,7 +88,7 @@ class SingleEditor extends Component{ const answerArray = standard_answers.map((item, index) => { return item == true ? index+1 : -1 }).filter(item => item != -1); if(!question_title) { this.refs['titleEditor'].showError() - this.props.showNotification('题目不能为空'); return; + this.props.showNotification('题目:不能为空'); return; } @@ -105,7 +105,7 @@ class SingleEditor extends Component{ } if(!question_title) { this.refs['titleEditor'].showError() - this.props.showNotification('题目不能为空'); return; + this.props.showNotification('题目:不能为空'); return; }