diff --git a/js/components/ascribe_uploader/file_drag_and_drop_preview.js b/js/components/ascribe_uploader/file_drag_and_drop_preview.js index 2710aec2..82509f48 100644 --- a/js/components/ascribe_uploader/file_drag_and_drop_preview.js +++ b/js/components/ascribe_uploader/file_drag_and_drop_preview.js @@ -17,6 +17,10 @@ let FileDragAndDropPreview = React.createClass({ handleCancelFile: React.PropTypes.func }, + toggleUploadProcess() { + + }, + handleDeleteFile() { // handleDeleteFile is optional, so if its not submitted, // don't run it @@ -40,12 +44,14 @@ let FileDragAndDropPreview = React.createClass({ previewElement = (); + url={this.props.file.url} + toggleUploadProcess={this.toggleUploadProcess}/>); } else { previewElement = (); + type={this.props.file.type.split('/')[1]} + toggleUploadProcess={this.toggleUploadProcess}/>); } return ( diff --git a/js/components/ascribe_uploader/file_drag_and_drop_preview_image.js b/js/components/ascribe_uploader/file_drag_and_drop_preview_image.js index 6707b4e7..9dd4e122 100644 --- a/js/components/ascribe_uploader/file_drag_and_drop_preview_image.js +++ b/js/components/ascribe_uploader/file_drag_and_drop_preview_image.js @@ -3,18 +3,17 @@ import React from 'react'; import ProgressBar from 'react-progressbar'; -import AppConstants from '../../constants/application_constants'; - let FileDragAndDropPreviewImage = React.createClass({ propTypes: { progress: React.PropTypes.number, url: React.PropTypes.string, - onClick: React.PropTypes.func + toggleUploadProcess: React.PropTypes.func, + downloadFile: React.PropTypes.func }, getInitialState() { return { - paused: false + paused: true }; }, @@ -38,20 +37,32 @@ let FileDragAndDropPreviewImage = React.createClass({ }); }, + downloadFile() { + + }, + render() { let imageStyle = { backgroundImage: 'url("' + this.props.url + '")', backgroundSize: 'cover' }; - //let actionSymbol = this.state.loading ? :