summaryrefslogtreecommitdiffstats
path: root/web/react/components/file_attachment.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-09-24 10:17:58 -0400
committerChristopher Speller <crspeller@gmail.com>2015-09-24 10:58:56 -0400
commitc5d78f828a48ba88b8a89a0564bcb8352e84b396 (patch)
treed70b911e611dd94f5a0f55944c2c14329e08a3c2 /web/react/components/file_attachment.jsx
parentd5343f997d8d239f09a93a05d8affd8387bb46bc (diff)
downloadchat-c5d78f828a48ba88b8a89a0564bcb8352e84b396.tar.gz
chat-c5d78f828a48ba88b8a89a0564bcb8352e84b396.tar.bz2
chat-c5d78f828a48ba88b8a89a0564bcb8352e84b396.zip
Converting preview image modal to use react-bootstrap. Fixes issue where modal would appear behind background on iOS
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
};