diff options
| author | Juuso Lapinlampi <wub@partyvan.eu> | 2015-10-11 18:32:08 +0200 |
|---|---|---|
| committer | Juuso Lapinlampi <wub@partyvan.eu> | 2015-10-11 18:32:38 +0200 |
| commit | 251b4d789d13e39436937e98500c5c5e2ab4d427 (patch) | |
| tree | 38c20d0d625dfdc3c24194c7eaf013aed9bcaf61 | |
| parent | c54fc2bcd9d96ad622a299d33779f51bab03230b (diff) | |
Fix JSCS missing newline errors
Using preset "airbnb".
| -rw-r--r-- | js/cheesesteak.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/js/cheesesteak.js b/js/cheesesteak.js index 3447d97..ba65e48 100644 --- a/js/cheesesteak.js +++ b/js/cheesesteak.js @@ -165,6 +165,7 @@ files[i].uploadedSize = 0; } } + xhr.upload.addEventListener('loadstart', initProgressBar); function updateProgressBar(evt) { @@ -193,24 +194,28 @@ _this.emit('uploadprogress', evt, files); } + xhr.upload.addEventListener('progress', updateProgressBar, false); // The upload is complete, now tell the user to wait for URLs. function postUpload(evt) { _this.emit('uploadcomplete', evt); } + xhr.upload.addEventListener('load', postUpload); // Tell the browser the upload completed and wait for response. function postProgress(evt) { _this.emit('progress', evt); } + xhr.addEventListener('progress', postProgress); // Send a success/error response. Nothing more to do. function uploadFinished(evt) { _this.emit('load', evt, xhr.responseText); } + xhr.addEventListener('load', uploadFinished); xhr.send(data); |
