@@ -115,11 +115,13 @@ FileProgress.prototype.setChunkProgess = function(chunk_size) {
115
115
col . append ( progressBarWrapper ) ;
116
116
progressBarChunk . append ( col ) ;
117
117
}
118
- this . fileProgressWrapper . find ( 'td>div' ) . append ( viewProgess ) ;
119
118
119
+ if ( ! this . fileProgressWrapper . find ( 'td:eq(2) .btn-default' ) . length ) {
120
+ this . fileProgressWrapper . find ( 'td>div' ) . append ( viewProgess ) ;
121
+ }
120
122
progressBarChunkTr . hide ( ) . find ( 'td' ) . append ( progressBarChunk ) ;
121
-
122
123
progressBarChunkTr . insertAfter ( this . fileProgressWrapper ) ;
124
+
123
125
} ;
124
126
125
127
FileProgress . prototype . setProgress = function ( percentage , speed , chunk_size ) {
@@ -131,6 +133,9 @@ FileProgress.prototype.setProgress = function(percentage, speed, chunk_size) {
131
133
var size = plupload . formatSize ( uploaded ) . toUpperCase ( ) ;
132
134
var formatSpeed = plupload . formatSize ( speed ) . toUpperCase ( ) ;
133
135
var progressbar = this . fileProgressWrapper . find ( 'td .progress' ) . find ( '.progress-bar-info' ) ;
136
+ if ( this . fileProgressWrapper . find ( '.status' ) . text ( ) === '取消上传' ) {
137
+ return ;
138
+ }
134
139
this . fileProgressWrapper . find ( '.status' ) . text ( "已上传: " + size + " 上传速度: " + formatSpeed + "/s" ) ;
135
140
percentage = parseInt ( percentage , 10 ) ;
136
141
if ( file . status !== plupload . DONE && percentage === 100 ) {
@@ -373,13 +378,11 @@ FileProgress.prototype.setStatus = function(status, isUploading) {
373
378
FileProgress . prototype . bindUploadCancel = function ( up ) {
374
379
var self = this ;
375
380
if ( up ) {
376
-
377
381
self . fileProgressWrapper . find ( 'td:eq(2) .progressCancel' ) . on ( 'click' , function ( ) {
378
382
self . setCancelled ( false ) ;
379
383
self . setStatus ( "取消上传" ) ;
380
384
self . fileProgressWrapper . find ( '.status' ) . css ( 'left' , '0' ) ;
381
385
up . removeFile ( self . file ) ;
382
- return true ;
383
386
} ) ;
384
387
}
385
388
0 commit comments