Skip to content
This repository has been archived by the owner on Aug 22, 2022. It is now read-only.

Commit

Permalink
update dist
Browse files Browse the repository at this point in the history
  • Loading branch information
2betop committed Sep 22, 2014
1 parent b7333c2 commit 5e1a927
Show file tree
Hide file tree
Showing 14 changed files with 130 additions and 74 deletions.
23 changes: 15 additions & 8 deletions dist/webuploader.custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -3552,7 +3552,7 @@
this.__tick = Base.bindFn( this._tick, this );

owner.on( 'uploadComplete', function( file ) {

// 把其他块取消了。
file.blocks && $.each( file.blocks, function( _, v ) {
v.transport && (v.transport.abort(), v.transport.destroy());
Expand Down Expand Up @@ -3604,15 +3604,15 @@

if (file.getStatus() === Status.INTERRUPT) {
$.each( me.pool, function( _, v ) {

// 之前暂停过。
if (v.file !== file) {
return;
}

v.transport && v.transport.send();
});

file.setStatus( Status.QUEUED );
} else if (file.getStatus() === Status.PROGRESS) {
return;
Expand All @@ -3631,17 +3631,24 @@

me.runing = true;

var files = [];

// 如果有暂停的,则续传
$.each( me.pool, function( _, v ) {
var file = v.file;

if ( file.getStatus() === Status.INTERRUPT ) {
file.setStatus( Status.PROGRESS );
files.push(file);
me._trigged = false;
v.transport && v.transport.send();
}
});

var file;
while ( (file = files.shift()) ) {
file.setStatus( Status.PROGRESS );
}

file || $.each( me.request( 'get-files',
Status.INTERRUPT ), function() {
this.setStatus( Status.PROGRESS );
Expand Down Expand Up @@ -3691,7 +3698,7 @@

file.setStatus( Status.INTERRUPT );
$.each( me.pool, function( _, v ) {

// 只 abort 指定的文件。
if (v.file !== file) {
return;
Expand Down Expand Up @@ -3890,7 +3897,7 @@
if ( !file ) {
return null;
}

act = CuteFile( file, opts.chunked ? opts.chunkSize : 0 );
me.stack.push(act);
return act.shift();
Expand Down Expand Up @@ -3925,7 +3932,7 @@
promise = me.request( 'before-send-file', file, function() {

// 有可能文件被skip掉了。文件被skip掉后,状态坑定不是Queued.
if ( file.getStatus() === Status.PROGRESS ||
if ( file.getStatus() === Status.PROGRESS ||
file.getStatus() === Status.INTERRUPT ) {
return file;
}
Expand Down Expand Up @@ -3975,7 +3982,7 @@
// 如:暂停,取消
// 我们不能中断 promise, 但是可以在 promise 完后,不做上传操作。
if ( file.getStatus() !== Status.PROGRESS ) {

// 如果是中断,则还需要放回去。
if (file.getStatus() === Status.INTERRUPT) {
me._putback(block);
Expand Down
2 changes: 1 addition & 1 deletion dist/webuploader.custom.min.js

Large diffs are not rendered by default.

23 changes: 15 additions & 8 deletions dist/webuploader.fis.js
Original file line number Diff line number Diff line change
Expand Up @@ -3426,7 +3426,7 @@ return (function( root, factory ) {
this.__tick = Base.bindFn( this._tick, this );

owner.on( 'uploadComplete', function( file ) {

// 把其他块取消了。
file.blocks && $.each( file.blocks, function( _, v ) {
v.transport && (v.transport.abort(), v.transport.destroy());
Expand Down Expand Up @@ -3478,15 +3478,15 @@ return (function( root, factory ) {

if (file.getStatus() === Status.INTERRUPT) {
$.each( me.pool, function( _, v ) {

// 之前暂停过。
if (v.file !== file) {
return;
}

v.transport && v.transport.send();
});

file.setStatus( Status.QUEUED );
} else if (file.getStatus() === Status.PROGRESS) {
return;
Expand All @@ -3505,17 +3505,24 @@ return (function( root, factory ) {

me.runing = true;

var files = [];

// 如果有暂停的,则续传
$.each( me.pool, function( _, v ) {
var file = v.file;

if ( file.getStatus() === Status.INTERRUPT ) {
file.setStatus( Status.PROGRESS );
files.push(file);
me._trigged = false;
v.transport && v.transport.send();
}
});

var file;
while ( (file = files.shift()) ) {
file.setStatus( Status.PROGRESS );
}

file || $.each( me.request( 'get-files',
Status.INTERRUPT ), function() {
this.setStatus( Status.PROGRESS );
Expand Down Expand Up @@ -3565,7 +3572,7 @@ return (function( root, factory ) {

file.setStatus( Status.INTERRUPT );
$.each( me.pool, function( _, v ) {

// 只 abort 指定的文件。
if (v.file !== file) {
return;
Expand Down Expand Up @@ -3764,7 +3771,7 @@ return (function( root, factory ) {
if ( !file ) {
return null;
}

act = CuteFile( file, opts.chunked ? opts.chunkSize : 0 );
me.stack.push(act);
return act.shift();
Expand Down Expand Up @@ -3799,7 +3806,7 @@ return (function( root, factory ) {
promise = me.request( 'before-send-file', file, function() {

// 有可能文件被skip掉了。文件被skip掉后,状态坑定不是Queued.
if ( file.getStatus() === Status.PROGRESS ||
if ( file.getStatus() === Status.PROGRESS ||
file.getStatus() === Status.INTERRUPT ) {
return file;
}
Expand Down Expand Up @@ -3849,7 +3856,7 @@ return (function( root, factory ) {
// 如:暂停,取消
// 我们不能中断 promise, 但是可以在 promise 完后,不做上传操作。
if ( file.getStatus() !== Status.PROGRESS ) {

// 如果是中断,则还需要放回去。
if (file.getStatus() === Status.INTERRUPT) {
me._putback(block);
Expand Down
23 changes: 15 additions & 8 deletions dist/webuploader.flashonly.js
Original file line number Diff line number Diff line change
Expand Up @@ -3249,7 +3249,7 @@
this.__tick = Base.bindFn( this._tick, this );

owner.on( 'uploadComplete', function( file ) {

// 把其他块取消了。
file.blocks && $.each( file.blocks, function( _, v ) {
v.transport && (v.transport.abort(), v.transport.destroy());
Expand Down Expand Up @@ -3301,15 +3301,15 @@

if (file.getStatus() === Status.INTERRUPT) {
$.each( me.pool, function( _, v ) {

// 之前暂停过。
if (v.file !== file) {
return;
}

v.transport && v.transport.send();
});

file.setStatus( Status.QUEUED );
} else if (file.getStatus() === Status.PROGRESS) {
return;
Expand All @@ -3328,17 +3328,24 @@

me.runing = true;

var files = [];

// 如果有暂停的,则续传
$.each( me.pool, function( _, v ) {
var file = v.file;

if ( file.getStatus() === Status.INTERRUPT ) {
file.setStatus( Status.PROGRESS );
files.push(file);
me._trigged = false;
v.transport && v.transport.send();
}
});

var file;
while ( (file = files.shift()) ) {
file.setStatus( Status.PROGRESS );
}

file || $.each( me.request( 'get-files',
Status.INTERRUPT ), function() {
this.setStatus( Status.PROGRESS );
Expand Down Expand Up @@ -3388,7 +3395,7 @@

file.setStatus( Status.INTERRUPT );
$.each( me.pool, function( _, v ) {

// 只 abort 指定的文件。
if (v.file !== file) {
return;
Expand Down Expand Up @@ -3587,7 +3594,7 @@
if ( !file ) {
return null;
}

act = CuteFile( file, opts.chunked ? opts.chunkSize : 0 );
me.stack.push(act);
return act.shift();
Expand Down Expand Up @@ -3622,7 +3629,7 @@
promise = me.request( 'before-send-file', file, function() {

// 有可能文件被skip掉了。文件被skip掉后,状态坑定不是Queued.
if ( file.getStatus() === Status.PROGRESS ||
if ( file.getStatus() === Status.PROGRESS ||
file.getStatus() === Status.INTERRUPT ) {
return file;
}
Expand Down Expand Up @@ -3672,7 +3679,7 @@
// 如:暂停,取消
// 我们不能中断 promise, 但是可以在 promise 完后,不做上传操作。
if ( file.getStatus() !== Status.PROGRESS ) {

// 如果是中断,则还需要放回去。
if (file.getStatus() === Status.INTERRUPT) {
me._putback(block);
Expand Down
4 changes: 2 additions & 2 deletions dist/webuploader.flashonly.min.js

Large diffs are not rendered by default.

23 changes: 15 additions & 8 deletions dist/webuploader.html5only.js
Original file line number Diff line number Diff line change
Expand Up @@ -3451,7 +3451,7 @@
this.__tick = Base.bindFn( this._tick, this );

owner.on( 'uploadComplete', function( file ) {

// 把其他块取消了。
file.blocks && $.each( file.blocks, function( _, v ) {
v.transport && (v.transport.abort(), v.transport.destroy());
Expand Down Expand Up @@ -3503,15 +3503,15 @@

if (file.getStatus() === Status.INTERRUPT) {
$.each( me.pool, function( _, v ) {

// 之前暂停过。
if (v.file !== file) {
return;
}

v.transport && v.transport.send();
});

file.setStatus( Status.QUEUED );
} else if (file.getStatus() === Status.PROGRESS) {
return;
Expand All @@ -3530,17 +3530,24 @@

me.runing = true;

var files = [];

// 如果有暂停的,则续传
$.each( me.pool, function( _, v ) {
var file = v.file;

if ( file.getStatus() === Status.INTERRUPT ) {
file.setStatus( Status.PROGRESS );
files.push(file);
me._trigged = false;
v.transport && v.transport.send();
}
});

var file;
while ( (file = files.shift()) ) {
file.setStatus( Status.PROGRESS );
}

file || $.each( me.request( 'get-files',
Status.INTERRUPT ), function() {
this.setStatus( Status.PROGRESS );
Expand Down Expand Up @@ -3590,7 +3597,7 @@

file.setStatus( Status.INTERRUPT );
$.each( me.pool, function( _, v ) {

// 只 abort 指定的文件。
if (v.file !== file) {
return;
Expand Down Expand Up @@ -3789,7 +3796,7 @@
if ( !file ) {
return null;
}

act = CuteFile( file, opts.chunked ? opts.chunkSize : 0 );
me.stack.push(act);
return act.shift();
Expand Down Expand Up @@ -3824,7 +3831,7 @@
promise = me.request( 'before-send-file', file, function() {

// 有可能文件被skip掉了。文件被skip掉后,状态坑定不是Queued.
if ( file.getStatus() === Status.PROGRESS ||
if ( file.getStatus() === Status.PROGRESS ||
file.getStatus() === Status.INTERRUPT ) {
return file;
}
Expand Down Expand Up @@ -3874,7 +3881,7 @@
// 如:暂停,取消
// 我们不能中断 promise, 但是可以在 promise 完后,不做上传操作。
if ( file.getStatus() !== Status.PROGRESS ) {

// 如果是中断,则还需要放回去。
if (file.getStatus() === Status.INTERRUPT) {
me._putback(block);
Expand Down
4 changes: 2 additions & 2 deletions dist/webuploader.html5only.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 5e1a927

Please sign in to comment.