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(
{inner}
{ filenames && filenames.length > 0 ?{message}
{ post.filenames && post.filenames.length > 0 ?{message}
{ post.filenames && post.filenames.length > 0 ?