summaryrefslogtreecommitdiffstats
path: root/web/react/components/file_attachment.jsx
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2015-09-24 08:59:00 -0700
committerCorey Hulen <corey@hulen.com>2015-09-24 08:59:00 -0700
commit819ef528b858f81f239406ed3a05f9170eee2c93 (patch)
treebc2e67a0e5364d36d22a681a5fbb56b008b15ce8 /web/react/components/file_attachment.jsx
parenta7d75d3bceef5fa405e72968806c905bcc9d8b31 (diff)
parentc5d78f828a48ba88b8a89a0564bcb8352e84b396 (diff)
downloadchat-819ef528b858f81f239406ed3a05f9170eee2c93.tar.gz
chat-819ef528b858f81f239406ed3a05f9170eee2c93.tar.bz2
chat-819ef528b858f81f239406ed3a05f9170eee2c93.zip
Merge pull request #779 from mattermost/plt-294
PLT-294 Converting preview image modal to use react-bootstrap.
Diffstat (limited to 'web/react/components/file_attachment.jsx')
-rw-r--r--web/react/components/file_attachment.jsx10
1 files changed, 2 insertions, 8 deletions
diff --git a/web/react/components/file_attachment.jsx b/web/react/components/file_attachment.jsx
index c9aa06a97..888f24aa5 100644
--- a/web/react/components/file_attachment.jsx
+++ b/web/react/components/file_attachment.jsx
@@ -143,10 +143,7 @@ export default class FileAttachment extends React.Component {
>
<a className='post-image__thumbnail'
href='#'
- onClick={this.props.handleImageClick}
- data-img-id={this.props.index}
- data-toggle='modal'
- data-target={'#' + this.props.modalId}
+ onClick={() => this.props.handleImageClick(this.props.index)}
>
{thumbnail}
</a>
@@ -187,9 +184,6 @@ FileAttachment.propTypes = {
// the index of this attachment preview in the parent FileAttachmentList
index: React.PropTypes.number.isRequired,
- // the identifier of the modal dialog used to preview files
- modalId: React.PropTypes.string.isRequired,
-
- // handler for when the thumbnail is clicked
+ // handler for when the thumbnail is clicked passed the index above
handleImageClick: React.PropTypes.func
};