mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 17:33:14 +01:00
Merge remote-tracking branch 'remotes/origin/master' into AD-661-due-1208-implement-jury-rating-an
This commit is contained in:
commit
1b335e31a4
63
docs/feature_list.md
Normal file
63
docs/feature_list.md
Normal file
@ -0,0 +1,63 @@
|
||||
# Feature list
|
||||
|
||||
This list specifies all features in Onion that ought to be tested before actually pushing live:
|
||||
|
||||
- sign up & email activation
|
||||
- login
|
||||
- log out
|
||||
- form input
|
||||
+ reset
|
||||
+ save
|
||||
+ disabled state
|
||||
- form checkbox
|
||||
+ reset
|
||||
+ save
|
||||
+ disabled state
|
||||
- create app
|
||||
+ refresh token
|
||||
- loan contract
|
||||
+ upload
|
||||
+ download
|
||||
+ delete
|
||||
- register work
|
||||
+ with edition
|
||||
+ without edition
|
||||
+ correct encoding of video upload
|
||||
- fineuploader
|
||||
+ upload file
|
||||
+ upload multiple files
|
||||
+ delete file
|
||||
+ cancel upload of file
|
||||
- create editions
|
||||
+ in piece list
|
||||
+ in piece detail
|
||||
- all notes in edition/piece detail
|
||||
- transfer & consign & loan & share & delete
|
||||
+ bulk
|
||||
+ single
|
||||
+ withdraw
|
||||
- piece list
|
||||
+ filter (also check for correct filtering of opened edition tables)
|
||||
+ order
|
||||
+ search
|
||||
+ pagination
|
||||
+ expandable edition list for piece
|
||||
- download coa
|
||||
|
||||
## sluice
|
||||
- hero landing page
|
||||
- activation email
|
||||
- submission (also check extra form fields)
|
||||
+ of existing pieces
|
||||
+ newly registered pieces
|
||||
- rating
|
||||
+ in piece list
|
||||
+ in piece detail
|
||||
- short listing (not yet implemented)
|
||||
- piece list
|
||||
+ order by rating
|
||||
|
||||
## Cyland
|
||||
- hero landing page
|
||||
- activation email
|
||||
- submission (check states of submission (1,2,3))
|
@ -229,7 +229,6 @@ var ReactS3FineUploader = React.createClass({
|
||||
onDeleteComplete: this.onDeleteComplete,
|
||||
onSessionRequestComplete: this.onSessionRequestComplete,
|
||||
onError: this.onError,
|
||||
onValidate: this.onValidate,
|
||||
onUploadChunk: this.onUploadChunk,
|
||||
onUploadChunkSuccess: this.onUploadChunkSuccess
|
||||
}
|
||||
@ -425,13 +424,17 @@ var ReactS3FineUploader = React.createClass({
|
||||
GlobalNotificationActions.appendGlobalNotification(notification);
|
||||
},
|
||||
|
||||
onValidate(data) {
|
||||
if(data.size > this.props.validation.sizeLimit) {
|
||||
this.state.uploader.cancelAll();
|
||||
isFileValid(file) {
|
||||
if(file.size > this.props.validation.sizeLimit) {
|
||||
|
||||
let fileSizeInMegaBytes = this.props.validation.sizeLimit / 1000000;
|
||||
let notification = new GlobalNotificationModel(getLangText('Your file is bigger than %d MB', fileSizeInMegaBytes), 'danger', 5000);
|
||||
|
||||
let notification = new GlobalNotificationModel(getLangText('A file you submitted is bigger than ' + fileSizeInMegaBytes + 'MB.'), 'danger', 5000);
|
||||
GlobalNotificationActions.appendGlobalNotification(notification);
|
||||
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
||||
@ -581,8 +584,18 @@ var ReactS3FineUploader = React.createClass({
|
||||
return;
|
||||
}
|
||||
|
||||
// validate each submitted file if it fits the file size
|
||||
let validFiles = [];
|
||||
for(let i = 0; i < files.length; i++) {
|
||||
if(this.isFileValid(files[i])) {
|
||||
validFiles.push(files[i]);
|
||||
}
|
||||
}
|
||||
// override standard files list with only valid files
|
||||
files = validFiles;
|
||||
|
||||
// Call this method to signal the outside component that an upload is in progress
|
||||
if(this.props.uploadStarted && typeof this.props.uploadStarted === 'function') {
|
||||
if(this.props.uploadStarted && typeof this.props.uploadStarted === 'function' && files.length > 0) {
|
||||
this.props.uploadStarted();
|
||||
}
|
||||
|
||||
@ -696,8 +709,10 @@ var ReactS3FineUploader = React.createClass({
|
||||
// if we're not hashing the files locally, we're just going to hand them over to fineuploader
|
||||
// to upload them to the server
|
||||
} else {
|
||||
this.state.uploader.addFiles(files);
|
||||
this.synchronizeFileLists(files);
|
||||
if(files.length > 0) {
|
||||
this.state.uploader.addFiles(files);
|
||||
this.synchronizeFileLists(files);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -61,10 +61,9 @@ let CylandAdditionalDataForm = React.createClass({
|
||||
},
|
||||
|
||||
isReadyForFormSubmission(files) {
|
||||
let uploadedFiles = files.filter((file) => file.status === 'upload successful');
|
||||
let uploadingFiles = files.filter((file) => file.status === 'submitting');
|
||||
|
||||
if (uploadedFiles.length > 0 && uploadingFiles.length === 0) {
|
||||
if (uploadingFiles.length === 0) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user