From 9fca35cad531fe040155ba460577b0c3eba6b24e Mon Sep 17 00:00:00 2001 From: Reed Garmsen Date: Thu, 2 Jul 2015 11:13:38 -0700 Subject: Added additional class to the markup indicating if the post came from the current user --- web/react/components/post.jsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'web/react/components/post.jsx') diff --git a/web/react/components/post.jsx b/web/react/components/post.jsx index afe978495..e877a2213 100644 --- a/web/react/components/post.jsx +++ b/web/react/components/post.jsx @@ -6,6 +6,7 @@ var PostBody = require('./post_body.jsx'); var PostInfo = require('./post_info.jsx'); var AppDispatcher = require('../dispatcher/app_dispatcher.jsx'); var Constants = require('../utils/constants.jsx'); +var UserStore = require('../stores/user_store.jsx'); var ActionTypes = Constants.ActionTypes; module.exports = React.createClass({ @@ -56,7 +57,7 @@ module.exports = React.createClass({ var error = this.state.error ?
: null; - if(this.props.sameRoot){ + if (this.props.sameRoot){ rootUser = "same--root"; } else { @@ -64,13 +65,18 @@ module.exports = React.createClass({ } var postType = ""; - if(type != "Post"){ + if (type != "Post"){ postType = "post--comment"; } + var currentUser = ""; + if (UserStore.getCurrentId() === post.user_id) { + currentUser = "current--user"; + } + return (
-
+
{ !this.props.hideProfilePic ?
-- cgit v1.2.3-1-g7c22 From 764bd97bc72ac335ce42b5c4e19931b6a72b803b Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Fri, 17 Jul 2015 23:10:10 +0500 Subject: Improving modal UI --- web/react/components/post.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'web/react/components/post.jsx') diff --git a/web/react/components/post.jsx b/web/react/components/post.jsx index afe978495..09437f8dc 100644 --- a/web/react/components/post.jsx +++ b/web/react/components/post.jsx @@ -10,9 +10,9 @@ var ActionTypes = Constants.ActionTypes; module.exports = React.createClass({ componentDidMount: function() { - $('.edit-modal').on('show.bs.modal', function () { - $('.edit-modal .edit-modal-body').css('overflow-y', 'auto'); - $('.edit-modal .edit-modal-body').css('max-height', $(window).height() * 0.7); + $('.modal').on('show.bs.modal', function () { + $('.modal-body').css('overflow-y', 'auto'); + $('.modal-body').css('max-height', $(window).height() * 0.7); }); }, handleCommentClick: function(e) { -- cgit v1.2.3-1-g7c22 From 07601d6561cf6e7fe3c8cb9c15a12f26f8183246 Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Fri, 17 Jul 2015 23:43:36 +0500 Subject: Changing var name from currentUser to currentUserCss --- web/react/components/post.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'web/react/components/post.jsx') diff --git a/web/react/components/post.jsx b/web/react/components/post.jsx index ab5d70f12..04b5ba082 100644 --- a/web/react/components/post.jsx +++ b/web/react/components/post.jsx @@ -69,14 +69,14 @@ module.exports = React.createClass({ postType = "post--comment"; } - var currentUser = ""; + var currentUserCss = ""; if (UserStore.getCurrentId() === post.user_id) { - currentUser = "current--user"; + currentUserCss = "current--user"; } return (
-
+
{ !this.props.hideProfilePic ?
-- cgit v1.2.3-1-g7c22