diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-08-14 15:13:04 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-08-14 15:13:04 -0400 |
commit | 9036dd99aa8ba2d9cdd6066a833862bbd9e2653a (patch) | |
tree | 41a18a9bcbbcc7cd961cc424878ac37aade5c288 /web/react/components/post_right.jsx | |
parent | b9aef9f2a6b90663cb7ba4ff9e42560c145b631d (diff) | |
parent | 26a8e19a357aee9e1b39623e604ce92bdfaa00df (diff) | |
download | chat-9036dd99aa8ba2d9cdd6066a833862bbd9e2653a.tar.gz chat-9036dd99aa8ba2d9cdd6066a833862bbd9e2653a.tar.bz2 chat-9036dd99aa8ba2d9cdd6066a833862bbd9e2653a.zip |
Merge pull request #382 from mattermost/revert-360-mm-375d
Revert "MM-375 Adds text formatting features using a modified version…
Diffstat (limited to 'web/react/components/post_right.jsx')
-rw-r--r-- | web/react/components/post_right.jsx | 31 |
1 files changed, 4 insertions, 27 deletions
diff --git a/web/react/components/post_right.jsx b/web/react/components/post_right.jsx index 19e4cf67a..ad8b54012 100644 --- a/web/react/components/post_right.jsx +++ b/web/react/components/post_right.jsx @@ -56,7 +56,6 @@ RhsHeaderPost = React.createClass({ RootPost = React.createClass({ render: function() { - var allowTextFormatting = config.AllowTextFormatting; var post = this.props.post; var message = utils.textToJsx(post.message); var isOwner = UserStore.getCurrentId() == post.user_id; @@ -77,11 +76,6 @@ RootPost = React.createClass({ channelName = (channel.type === 'D') ? "Private Message" : channel.display_name; } - var messageHolder = <p>{message}</p>; - if (allowTextFormatting) { - messageHolder = <div>{message}</div>; - } - return ( <div className={"post post--root " + currentUserCss}> <div className="post-right-channel__name">{ channelName }</div> @@ -107,7 +101,7 @@ RootPost = React.createClass({ </li> </ul> <div className="post-body"> - {messageHolder} + <p>{message}</p> { post.filenames && post.filenames.length > 0 ? <FileAttachmentList filenames={post.filenames} @@ -125,7 +119,6 @@ RootPost = React.createClass({ CommentPost = React.createClass({ render: function() { - var allowTextFormatting = config.AllowTextFormatting; var post = this.props.post; var commentClass = "post"; @@ -145,11 +138,6 @@ CommentPost = React.createClass({ var message = utils.textToJsx(post.message); var timestamp = UserStore.getCurrentUser().update_at; - var messageHolder = <p>{message}</p>; - if (allowTextFormatting) { - messageHolder = <div>{message}</div>; - } - return ( <div className={commentClass + " " + currentUserCss}> <div className="post-profile-img__container"> @@ -172,7 +160,7 @@ CommentPost = React.createClass({ </li> </ul> <div className="post-body"> - {messageHolder} + <p>{message}</p> { post.filenames && post.filenames.length > 0 ? <FileAttachmentList filenames={post.filenames} @@ -285,22 +273,11 @@ module.exports = React.createClass({ root_post = post_list.posts[selected_post.root_id]; } - var rootPostKey = root_post.id - if (root_post.lastEditDate) { - rootPostKey += root_post.lastEditDate; - } - var posts_array = []; for (var postId in post_list.posts) { var cpost = post_list.posts[postId]; if (cpost.root_id == root_post.id) { - var cpostKey = cpost.id - if (cpost.lastEditDate) { - cpostKey += cpost.lastEditDate; - } - - cpost.cpostKey = cpostKey; posts_array.push(cpost); } } @@ -323,10 +300,10 @@ module.exports = React.createClass({ <div className="sidebar-right__body"> <RhsHeaderPost fromSearch={this.props.fromSearch} isMentionSearch={this.props.isMentionSearch} /> <div className="post-right__scroll"> - <RootPost key={rootPostKey} post={root_post} commentCount={posts_array.length}/> + <RootPost post={root_post} commentCount={posts_array.length}/> <div className="post-right-comments-container"> { posts_array.map(function(cpost) { - return <CommentPost ref={cpost.id} key={cpost.cpostKey} post={cpost} selected={ (cpost.id == selected_post.id) } /> + return <CommentPost ref={cpost.id} key={cpost.id} post={cpost} selected={ (cpost.id == selected_post.id) } /> })} </div> <div className="post-create__container"> |