diff --git a/module/field.js b/module/field.js index 7e54059..db6e4cd 100644 --- a/module/field.js +++ b/module/field.js @@ -215,6 +215,9 @@ export class FileField { // Set the new state this._state = 'accepting' + + // Trigger a change event against the input + $.dispatch(this.input, 'change') } /** @@ -389,6 +392,9 @@ export class FileField { // Set the new state this._state = 'viewing' + + // Trigger a change event against the input + $.dispatch(this.input, 'change') } /** diff --git a/module/ui/uploader.js b/module/ui/uploader.js index 9679d44..b41174f 100644 --- a/module/ui/uploader.js +++ b/module/ui/uploader.js @@ -9,7 +9,7 @@ export function defaultStatusTemplate(progress) { } else if (progress >= 100) { return 'Processing' } - return `Uploading ${parseInt(progress)}%` + return `Uploading ${parseInt(progress, 10)}%` } @@ -147,9 +147,7 @@ export class Uploader { ) $.ignore( this._xhr.upload, - { - 'progress': this._handlers.reqProgress, - } + {'progress': this._handlers.reqProgress} ) this._xhr.abort() } @@ -272,9 +270,7 @@ export class Uploader { $.listen( this._xhr.upload, - { - 'progress': this._handlers.reqProgress, - } + {'progress': this._handlers.reqProgress} ) // Send the request diff --git a/package.json b/package.json index 7514b3a..06e6c3c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "manhattan-assets", - "version": "1.0.0-beta.13", + "version": "1.0.0-beta.14", "description": "File and image uploads for forms.", "engines": { "node": ">=8.9.4"