From d71111b6f1155c86b35349d491213c72d92cc12b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Mon, 27 Jul 2015 09:23:01 +0200 Subject: [PATCH] fix wording for file drag and drop dialog --- js/components/ascribe_uploader/file_drag_and_drop.js | 5 ++++- .../ascribe_uploader/file_drag_and_drop_dialog.js | 7 +++++-- js/components/ascribe_uploader/react_s3_fine_uploader.js | 3 ++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/js/components/ascribe_uploader/file_drag_and_drop.js b/js/components/ascribe_uploader/file_drag_and_drop.js index a9625dbe..6e6feac1 100644 --- a/js/components/ascribe_uploader/file_drag_and_drop.js +++ b/js/components/ascribe_uploader/file_drag_and_drop.js @@ -30,6 +30,8 @@ let FileDragAndDrop = React.createClass({ areAssetsDownloadable: React.PropTypes.bool, areAssetsEditable: React.PropTypes.bool, + localHashing: React.PropTypes.bool, + // triggers a FileDragAndDrop-global spinner hashingProgress: React.PropTypes.number, // sets the value of this.state.hashingProgress in reactfineuploader @@ -174,7 +176,8 @@ let FileDragAndDrop = React.createClass({ + onClick={this.handleOnClick} + localHashing={this.props.localHashing}/> ); } else { + let dialog = this.props.localHashing ? getLangText('choose a file to hash') : getLangText('choose a file to upload'); + return (

{getLangText('Drag a file here')}

@@ -29,7 +32,7 @@ let FileDragAndDropDialog = React.createClass({ - {getLangText('choose a file to upload')} + {dialog}
); diff --git a/js/components/ascribe_uploader/react_s3_fine_uploader.js b/js/components/ascribe_uploader/react_s3_fine_uploader.js index fbc0af9b..5f4a58a9 100644 --- a/js/components/ascribe_uploader/react_s3_fine_uploader.js +++ b/js/components/ascribe_uploader/react_s3_fine_uploader.js @@ -691,7 +691,8 @@ var ReactS3FineUploader = React.createClass({ areAssetsDownloadable={this.props.areAssetsDownloadable} areAssetsEditable={this.props.areAssetsEditable} dropzoneInactive={!this.props.areAssetsEditable || !this.props.multiple && this.state.filesToUpload.filter((file) => file.status !== 'deleted' && file.status !== 'canceled' && file.size !== -1).length > 0} - hashingProgress={this.state.hashingProgress} /> + hashingProgress={this.state.hashingProgress} + localHashing={this.props.localHashing} /> ); }