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 36917e47..dcbc0652 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 @@ -22,7 +22,7 @@ let FileDragAndDropPreviewImage = React.createClass({ className="file-drag-and-drop-preview-image" style={imageStyle}> - + {this.props.progress === 100 ? : null} ); } diff --git a/js/components/ascribe_uploader/file_drag_and_drop_preview_other.js b/js/components/ascribe_uploader/file_drag_and_drop_preview_other.js index 60141f28..36c1ccdd 100644 --- a/js/components/ascribe_uploader/file_drag_and_drop_preview_other.js +++ b/js/components/ascribe_uploader/file_drag_and_drop_preview_other.js @@ -18,7 +18,7 @@ let FileDragAndDropPreviewOther = React.createClass({
- + {this.props.progress === 100 ? : null} {'.' + this.props.type}
diff --git a/js/components/ascribe_uploader/react_s3_fine_uploader.js b/js/components/ascribe_uploader/react_s3_fine_uploader.js index d0b61ad6..626d8bd7 100644 --- a/js/components/ascribe_uploader/react_s3_fine_uploader.js +++ b/js/components/ascribe_uploader/react_s3_fine_uploader.js @@ -229,18 +229,23 @@ var ReactS3FineUploader = React.createClass({ onDeleteComplete(id, xhr, isError) { if(isError) { + let notification = new GlobalNotificationModel('Couldn\'t delete file', 'danger', 10000); + GlobalNotificationActions.appendGlobalNotification(notification); + } else { // also, sync files from state with the ones from fineuploader let filesToUpload = JSON.parse(JSON.stringify(this.state.filesToUpload)); + // splice because I can filesToUpload.splice(id, 1); // set state - this.setState({ - filesToUpload: React.addons.update(this.state.filesToUpload, {$set: filesToUpload}) + let newState = React.addons.update(this.state, { + filesToUpload: { $set: filesToUpload } }); - } else { - console.log(id); - // TODO: add global notification + this.setState(newState); + + let notification = new GlobalNotificationModel('File deleted', 'success', 10000); + GlobalNotificationActions.appendGlobalNotification(notification); } }, diff --git a/sass/ascribe_uploader.scss b/sass/ascribe_uploader.scss index adf3bd23..aa76003e 100644 --- a/sass/ascribe_uploader.scss +++ b/sass/ascribe_uploader.scss @@ -93,8 +93,6 @@ } .file-drag-and-drop-preview-other span:not(:first-child) { - font-size: 1.2em; - font-family: mercury_light; display: block; margin-top: 1.5em; }