diff --git a/web/react/components/file_attachment.jsx b/web/react/components/file_attachment.jsx index 4a81dd8f3e..87922a615f 100644 --- a/web/react/components/file_attachment.jsx +++ b/web/react/components/file_attachment.jsx @@ -8,7 +8,7 @@ module.exports = React.createClass({ propTypes: { filenames: React.PropTypes.arrayOf(React.PropTypes.string).isRequired, index: React.PropTypes.number.isRequired, - imageModalId: React.PropTypes.string.isRequired, + modalId: React.PropTypes.string.isRequired, handleImageClick: React.PropTypes.func }, componentDidMount: function() { @@ -66,7 +66,7 @@ module.exports = React.createClass({ if (type === "image") { thumbnail = ( + data-img-id={this.props.index} data-toggle="modal" data-target={"#" + this.props.modalId }>
); diff --git a/web/react/components/file_attachment_list.jsx b/web/react/components/file_attachment_list.jsx index 0b52d6a70a..3da1e1482b 100644 --- a/web/react/components/file_attachment_list.jsx +++ b/web/react/components/file_attachment_list.jsx @@ -9,7 +9,7 @@ module.exports = React.createClass({ displayName: "FileAttachmentList", propTypes: { filenames: React.PropTypes.arrayOf(React.PropTypes.string).isRequired, - postId: React.PropTypes.string.isRequired, + modalId: React.PropTypes.string.isRequired, channelId: React.PropTypes.string, userId: React.PropTypes.string }, @@ -18,12 +18,11 @@ module.exports = React.createClass({ }, render: function() { var filenames = this.props.filenames; - - var postImageModalId = "view_image_modal_" + this.props.postId; + var modalId = this.props.modalId; var postFiles = []; for (var i = 0; i < filenames.length && i < Constants.MAX_DISPLAY_FILES; i++) { - postFiles.push(); + postFiles.push(); } return ( @@ -34,7 +33,7 @@ module.exports = React.createClass({ diff --git a/web/react/components/post_body.jsx b/web/react/components/post_body.jsx index d29784db95..860c96d842 100644 --- a/web/react/components/post_body.jsx +++ b/web/react/components/post_body.jsx @@ -70,10 +70,10 @@ module.exports = React.createClass({

{inner}

{ filenames && filenames.length > 0 ? + userId={post.user_id} /> : "" } { embed }
diff --git a/web/react/components/post_right.jsx b/web/react/components/post_right.jsx index 1d09842f3a..ad8b54012d 100644 --- a/web/react/components/post_right.jsx +++ b/web/react/components/post_right.jsx @@ -104,10 +104,10 @@ RootPost = React.createClass({

{message}

{ post.filenames && post.filenames.length > 0 ? + userId={post.user_id} /> : "" } @@ -163,10 +163,10 @@ CommentPost = React.createClass({

{message}

{ post.filenames && post.filenames.length > 0 ? + userId={post.user_id} /> : "" }