Skip to content

Commit

Permalink
Merge pull request #150 from benzamin/master
Browse files Browse the repository at this point in the history
For multiple file uploads, example code was buggy
  • Loading branch information
LPology committed Mar 17, 2016
2 parents dc8968e + 35d7a8c commit 3258970
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,12 @@ var uploader = new ss.SimpleUpload({
bar = document.createElement('div'), // actual progress bar
fileSize = document.createElement('div'), // container for upload file size
wrapper = document.createElement('div'), // container for this progress bar
progressBox = document.getElementById('progressBox'); // on page container for progress bars
//declare somewhere: <div id="progressBox"></div> where you want to show the progress-bar(s)
progressBox = document.getElementById('progressBox'); //on page container for progress bars

// Assign each element its corresponding class
progress.className = 'progress';
bar.className = 'bar';
progress.className = 'progress progress-striped';
bar.className = 'progress-bar progress-bar-success';
fileSize.className = 'size';
wrapper.className = 'wrapper';

Expand Down Expand Up @@ -268,4 +269,4 @@ var uploader = new ss.SimpleUpload({


### License ###
Released under the MIT license.
Released under the MIT license.
2 changes: 1 addition & 1 deletion SimpleAjaxUploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -2029,7 +2029,7 @@ ss.extendObj( ss.SimpleUpload.prototype, {
// We have to do it here after everything is finished to avoid any errors
if ( this._destroy &&
this._queue.length === 0 &&
this._active.length === 0 )
this._active === 0 )
{
for ( var prop in this ) {
if ( this.hasOwnProperty( prop ) ) {
Expand Down

0 comments on commit 3258970

Please sign in to comment.