mirror of
https://github.com/ascribe/onion.git
synced 2025-01-07 04:04:20 +01:00
minor corrections
This commit is contained in:
parent
f16a012771
commit
b2a3c9545b
@ -33,12 +33,16 @@ let ContractSettingsUpdateButton = React.createClass({
|
|||||||
ContractListActions
|
ContractListActions
|
||||||
.changeContract(contract)
|
.changeContract(contract)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
||||||
|
// Display feedback to the user
|
||||||
let notification = new GlobalNotificationModel(getLangText('Contract %s successfully updated', res.name), 'success', 5000);
|
let notification = new GlobalNotificationModel(getLangText('Contract %s successfully updated', res.name), 'success', 5000);
|
||||||
GlobalNotificationActions.appendGlobalNotification(notification);
|
GlobalNotificationActions.appendGlobalNotification(notification);
|
||||||
|
|
||||||
|
// and refresh the contract list to get the updated contracs
|
||||||
return ContractListActions.fetchContractList(true);
|
return ContractListActions.fetchContractList(true);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
// Also, reset the fineuploader component so that the user can again 'update' his contract
|
||||||
this.refs.fineuploader.reset();
|
this.refs.fineuploader.reset();
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
@ -45,6 +45,7 @@ let FileDragAndDropPreview = React.createClass({
|
|||||||
|
|
||||||
handleDownloadFile() {
|
handleDownloadFile() {
|
||||||
if(this.props.file.s3Url) {
|
if(this.props.file.s3Url) {
|
||||||
|
// This simply opens a new browser tab with the url provided
|
||||||
open(this.props.file.s3Url);
|
open(this.props.file.s3Url);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -8,20 +8,8 @@ import { getLangText } from '../../../utils/lang_utils';
|
|||||||
|
|
||||||
let UploadButton = React.createClass({
|
let UploadButton = React.createClass({
|
||||||
propTypes: {
|
propTypes: {
|
||||||
onDragStart: React.PropTypes.func,
|
|
||||||
onDrop: React.PropTypes.func.isRequired,
|
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,
|
filesToUpload: React.PropTypes.array,
|
||||||
handleDeleteFile: React.PropTypes.func,
|
|
||||||
handleCancelFile: React.PropTypes.func,
|
|
||||||
handlePauseFile: React.PropTypes.func,
|
|
||||||
handleResumeFile: React.PropTypes.func,
|
|
||||||
multiple: React.PropTypes.bool,
|
multiple: React.PropTypes.bool,
|
||||||
|
|
||||||
// For simplification purposes we're just going to use this prop as a
|
// 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
|
// Depending on wether there is an upload going on or not we
|
||||||
// display the progress
|
// display the progress
|
||||||
if(filesToUpload.length > 0) {
|
if(filesToUpload.length > 0) {
|
||||||
return getLangText('Upload progress') + ': ' + Math.ceil(filesToUpload[0].progress) + '%';
|
return getLangText('Upload progress') + ': ' + Math.ceil(filesToUpload[0].progress) + '%';
|
||||||
} else {
|
} else {
|
||||||
return fileClassToUpload.singular;
|
return fileClassToUpload.singular;
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
import React from 'react/addons';
|
import React from 'react/addons';
|
||||||
import fineUploader from 'fineUploader';
|
import fineUploader from 'fineUploader';
|
||||||
import Router from 'react-router';
|
import Router from 'react-router';
|
||||||
import fineUploader from 'fineUploader';
|
|
||||||
import Q from 'q';
|
import Q from 'q';
|
||||||
|
|
||||||
import S3Fetcher from '../../fetchers/s3_fetcher';
|
import S3Fetcher from '../../fetchers/s3_fetcher';
|
||||||
|
Loading…
Reference in New Issue
Block a user