diff --git a/js/components/ascribe_settings/contract_settings_update_button.js b/js/components/ascribe_settings/contract_settings_update_button.js index 2fbfe15f..5712d441 100644 --- a/js/components/ascribe_settings/contract_settings_update_button.js +++ b/js/components/ascribe_settings/contract_settings_update_button.js @@ -33,12 +33,16 @@ let ContractSettingsUpdateButton = React.createClass({ ContractListActions .changeContract(contract) .then((res) => { + + // Display feedback to the user let notification = new GlobalNotificationModel(getLangText('Contract %s successfully updated', res.name), 'success', 5000); GlobalNotificationActions.appendGlobalNotification(notification); + // and refresh the contract list to get the updated contracs return ContractListActions.fetchContractList(true); }) .then(() => { + // Also, reset the fineuploader component so that the user can again 'update' his contract this.refs.fineuploader.reset(); }) .catch((err) => { diff --git a/js/components/ascribe_uploader/ascribe_file_drag_and_drop/file_drag_and_drop_preview.js b/js/components/ascribe_uploader/ascribe_file_drag_and_drop/file_drag_and_drop_preview.js index 8f712061..86d4135e 100644 --- a/js/components/ascribe_uploader/ascribe_file_drag_and_drop/file_drag_and_drop_preview.js +++ b/js/components/ascribe_uploader/ascribe_file_drag_and_drop/file_drag_and_drop_preview.js @@ -45,6 +45,7 @@ let FileDragAndDropPreview = React.createClass({ handleDownloadFile() { if(this.props.file.s3Url) { + // This simply opens a new browser tab with the url provided open(this.props.file.s3Url); } }, diff --git a/js/components/ascribe_uploader/ascribe_upload_button/upload_button.js b/js/components/ascribe_uploader/ascribe_upload_button/upload_button.js index 47347d46..1547272e 100644 --- a/js/components/ascribe_uploader/ascribe_upload_button/upload_button.js +++ b/js/components/ascribe_uploader/ascribe_upload_button/upload_button.js @@ -8,20 +8,8 @@ import { getLangText } from '../../../utils/lang_utils'; let UploadButton = React.createClass({ propTypes: { - onDragStart: React.PropTypes.func, onDrop: React.PropTypes.func.isRequired, - onDrag: React.PropTypes.func, - onDragEnter: React.PropTypes.func, - onLeave: React.PropTypes.func, - onDragLeave: React.PropTypes.func, - onDragOver: React.PropTypes.func, - onDragEnd: React.PropTypes.func, - onInactive: React.PropTypes.func, filesToUpload: React.PropTypes.array, - handleDeleteFile: React.PropTypes.func, - handleCancelFile: React.PropTypes.func, - handlePauseFile: React.PropTypes.func, - handleResumeFile: React.PropTypes.func, multiple: React.PropTypes.bool, // For simplification purposes we're just going to use this prop as a @@ -77,7 +65,7 @@ let UploadButton = React.createClass({ // Depending on wether there is an upload going on or not we // display the progress if(filesToUpload.length > 0) { - return getLangText('Upload progress') + ': ' + Math.ceil(filesToUpload[0].progress) + '%'; + return getLangText('Upload progress') + ': ' + Math.ceil(filesToUpload[0].progress) + '%'; } else { return fileClassToUpload.singular; } diff --git a/js/components/ascribe_uploader/react_s3_fine_uploader.js b/js/components/ascribe_uploader/react_s3_fine_uploader.js index 54434826..c7a5f9a7 100644 --- a/js/components/ascribe_uploader/react_s3_fine_uploader.js +++ b/js/components/ascribe_uploader/react_s3_fine_uploader.js @@ -3,7 +3,6 @@ import React from 'react/addons'; import fineUploader from 'fineUploader'; import Router from 'react-router'; -import fineUploader from 'fineUploader'; import Q from 'q'; import S3Fetcher from '../../fetchers/s3_fetcher';