diff --git a/public/react/src/common/components/markdown/DMDEditor.js b/public/react/src/common/components/markdown/DMDEditor.js index ef86b49e7..b9435176f 100644 --- a/public/react/src/common/components/markdown/DMDEditor.js +++ b/public/react/src/common/components/markdown/DMDEditor.js @@ -39,18 +39,29 @@ class DMDEditor extends Component{ onChange = (val) => { // this.setState({ value: val }) this.props.onChange(val) + if (this.state.showError == true) { + this.setState({showError: false}) + } + } + showError = () => { + this.mdRef.current.showError() + this.setState({showError: true}) } render(){ - const { mdMode } = this.state; + const { mdMode, showError } = this.state; const { initValue } = this.props; - + let _style = {} + if (showError) { + _style.border = '1px solid red' + } + _style = Object.assign(_style, {display: mdMode == true ? 'none' : '', color: initValue? '': '#999', alignItems: 'center', wordBreak: 'break-all'}) return(
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/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 {
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