File tree Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Original file line number Diff line number Diff line change 33
33
"id" : 1464862194961 ,
34
34
"author" : " 11111" ,
35
35
"text" : " 22222222222"
36
+ },
37
+ {
38
+ "id" : 1464862368016 ,
39
+ "author" : " hy" ,
40
+ "text" : " 121233"
41
+ },
42
+ {
43
+ "id" : 1464862371433 ,
44
+ "author" : " 222" ,
45
+ "text" : " 2222222"
46
+ },
47
+ {
48
+ "id" : 1464862416312 ,
49
+ "author" : " jhgjgjgjg" ,
50
+ "text" : " khkjhkhkhk"
51
+ },
52
+ {
53
+ "id" : 1464862508034 ,
54
+ "author" : " 2222" ,
55
+ "text" : " 1111"
56
+ },
57
+ {
58
+ "id" : 1464862518122 ,
59
+ "author" : " 121221" ,
60
+ "text" : " 2222"
36
61
}
37
62
]
Original file line number Diff line number Diff line change 10
10
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11
11
*/
12
12
13
+ /*
14
+ - CommentBox
15
+ - CommentList
16
+ - Comment
17
+ - CommentForm
18
+ */
19
+
20
+ /**
21
+ * Comment
22
+ */
13
23
var Comment = React . createClass ( {
14
24
rawMarkup : function ( ) {
15
25
var rawMarkup = marked ( this . props . children . toString ( ) , { sanitize : true } ) ;
@@ -28,6 +38,9 @@ var Comment = React.createClass({
28
38
}
29
39
} ) ;
30
40
41
+ /**
42
+ * CommentBox
43
+ */
31
44
var CommentBox = React . createClass ( {
32
45
loadCommentsFromServer : function ( ) {
33
46
$ . ajax ( {
@@ -82,6 +95,9 @@ var CommentBox = React.createClass({
82
95
}
83
96
} ) ;
84
97
98
+ /**
99
+ * CommentList
100
+ */
85
101
var CommentList = React . createClass ( {
86
102
render : function ( ) {
87
103
var commentNodes = this . props . data . map ( function ( comment ) {
@@ -99,6 +115,9 @@ var CommentList = React.createClass({
99
115
}
100
116
} ) ;
101
117
118
+ /**
119
+ * CommentForm
120
+ */
102
121
var CommentForm = React . createClass ( {
103
122
getInitialState : function ( ) {
104
123
return { author : '' , text : '' } ;
@@ -140,6 +159,9 @@ var CommentForm = React.createClass({
140
159
}
141
160
} ) ;
142
161
162
+ /**
163
+ * render view
164
+ */
143
165
ReactDOM . render (
144
166
< CommentBox url = "/api/comments" pollInterval = { 2000 } /> ,
145
167
document . getElementById ( 'content' )
You can’t perform that action at this time.
0 commit comments