From dbbf9fd2330f5abd3d1202012e0dd56a3dd75c3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Mon, 29 Jun 2015 16:57:31 +0200 Subject: [PATCH] debug --- .../file_drag_and_drop_preview.js | 10 ++++++-- .../file_drag_and_drop_preview_image.js | 25 +++++++++++++------ js/components/edition.js | 2 +- 3 files changed, 27 insertions(+), 10 deletions(-) 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 ? :