From 0687f287453635211487ce7de07f4b92ddf461c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Fri, 21 Aug 2015 10:04:24 +0200 Subject: [PATCH 1/4] feature list for testing --- docs/feature_list.md | 63 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 docs/feature_list.md diff --git a/docs/feature_list.md b/docs/feature_list.md new file mode 100644 index 00000000..568f7146 --- /dev/null +++ b/docs/feature_list.md @@ -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)) From c14ab4dcd438c367552a8a684a595b51259cc5c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Mon, 24 Aug 2015 13:12:59 +0200 Subject: [PATCH 2/4] fix fineuploader notification bug --- js/components/ascribe_uploader/react_s3_fine_uploader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/ascribe_uploader/react_s3_fine_uploader.js b/js/components/ascribe_uploader/react_s3_fine_uploader.js index f97308ab..820cbafb 100644 --- a/js/components/ascribe_uploader/react_s3_fine_uploader.js +++ b/js/components/ascribe_uploader/react_s3_fine_uploader.js @@ -430,7 +430,7 @@ var ReactS3FineUploader = React.createClass({ this.state.uploader.cancelAll(); 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('Your file is bigger than ' + fileSizeInMegaBytes + 'MB.'), 'danger', 5000); GlobalNotificationActions.appendGlobalNotification(notification); } }, From f54d7bb85c5670c1cb681bda73d62f41a9a0bf17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Mon, 24 Aug 2015 13:57:02 +0200 Subject: [PATCH 3/4] fix validation method --- .../react_s3_fine_uploader.js | 25 ++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/js/components/ascribe_uploader/react_s3_fine_uploader.js b/js/components/ascribe_uploader/react_s3_fine_uploader.js index 9d66f2e4..a19a2cef 100644 --- a/js/components/ascribe_uploader/react_s3_fine_uploader.js +++ b/js/components/ascribe_uploader/react_s3_fine_uploader.js @@ -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 ' + fileSizeInMegaBytes + 'MB.'), '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(); } From 18634ffe503701bac3ee502958d85f53327f1bde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Mon, 24 Aug 2015 14:16:13 +0200 Subject: [PATCH 4/4] fix additional files button bug --- js/components/ascribe_uploader/react_s3_fine_uploader.js | 6 ++++-- .../cyland/ascribe_forms/cyland_additional_data_form.js | 3 +-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/js/components/ascribe_uploader/react_s3_fine_uploader.js b/js/components/ascribe_uploader/react_s3_fine_uploader.js index a19a2cef..8ecaf40b 100644 --- a/js/components/ascribe_uploader/react_s3_fine_uploader.js +++ b/js/components/ascribe_uploader/react_s3_fine_uploader.js @@ -709,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); + } } }, diff --git a/js/components/whitelabel/wallet/components/cyland/ascribe_forms/cyland_additional_data_form.js b/js/components/whitelabel/wallet/components/cyland/ascribe_forms/cyland_additional_data_form.js index c8dd7f2c..f7946be5 100644 --- a/js/components/whitelabel/wallet/components/cyland/ascribe_forms/cyland_additional_data_form.js +++ b/js/components/whitelabel/wallet/components/cyland/ascribe_forms/cyland_additional_data_form.js @@ -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;