summaryrefslogtreecommitdiffstats
path: root/web/react/components/post.jsx
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2015-07-14 10:49:51 -0400
committerJoram Wilander <jwawilander@gmail.com>2015-07-14 10:49:51 -0400
commit1ba12b0ccfe75c5beaeb10b5e64d334f005a735a (patch)
treee2a4bf78f62db91eb8dffaf0d9e1a014569d7640 /web/react/components/post.jsx
parentcce492977bcb455bb22c2b42e1d2f3b99550db97 (diff)
parent4cc9bfce5c8bf09f743f00421f47349b6519a25f (diff)
downloadchat-1ba12b0ccfe75c5beaeb10b5e64d334f005a735a.tar.gz
chat-1ba12b0ccfe75c5beaeb10b5e64d334f005a735a.tar.bz2
chat-1ba12b0ccfe75c5beaeb10b5e64d334f005a735a.zip
Merge pull request #168 from ralder/fix-loading-screen-for-ie
[webui] fix loading animation for ie
Diffstat (limited to 'web/react/components/post.jsx')
-rw-r--r--web/react/components/post.jsx13
1 files changed, 4 insertions, 9 deletions
diff --git a/web/react/components/post.jsx b/web/react/components/post.jsx
index 726fb1b02..5457e1cd3 100644
--- a/web/react/components/post.jsx
+++ b/web/react/components/post.jsx
@@ -10,6 +10,7 @@ var UserStore = require('../stores/user_store.jsx');
var ActionTypes = Constants.ActionTypes;
module.exports = React.createClass({
+ displayName: "Post",
componentDidMount: function() {
$('.modal').on('show.bs.modal', function () {
$('.modal-body').css('overflow-y', 'auto');
@@ -19,7 +20,7 @@ module.exports = React.createClass({
handleCommentClick: function(e) {
e.preventDefault();
- data = {};
+ var data = {};
data.order = [this.props.post.id];
data.posts = this.props.posts;
@@ -48,7 +49,6 @@ module.exports = React.createClass({
var commentCount = 0;
var commentRootId = parentPost ? post.root_id : post.id;
- var rootUser = "";
for (var postId in posts) {
if (posts[postId].root_id == commentRootId) {
commentCount += 1;
@@ -57,12 +57,7 @@ module.exports = React.createClass({
var error = this.state.error ? <div className='form-group has-error'><label className='control-label'>{ this.state.error }</label></div> : null;
- if (this.props.sameRoot){
- rootUser = "same--root";
- }
- else {
- rootUser = "other--root";
- }
+ var rootUser = this.props.sameRoot ? "same--root" : "other--root";
var postType = "";
if (type != "Post"){
@@ -83,7 +78,7 @@ module.exports = React.createClass({
<div className="post-profile-img__container">
<img className="post-profile-img" src={"/api/v1/users/" + post.user_id + "/image?time=" + timestamp} height="36" width="36" />
</div>
- : "" }
+ : null }
<div className="post__content">
<PostHeader post={post} sameRoot={this.props.sameRoot} commentCount={commentCount} handleCommentClick={this.handleCommentClick} isLastComment={this.props.isLastComment} />
<PostBody post={post} sameRoot={this.props.sameRoot} parentPost={parentPost} posts={posts} handleCommentClick={this.handleCommentClick} />