@@ -115,11 +115,13 @@ FileProgress.prototype.setChunkProgess = function(chunk_size) {
115115 col . append ( progressBarWrapper ) ;
116116 progressBarChunk . append ( col ) ;
117117 }
118- this . fileProgressWrapper . find ( 'td>div' ) . append ( viewProgess ) ;
119118
119+ if ( ! this . fileProgressWrapper . find ( 'td:eq(2) .btn-default' ) . length ) {
120+ this . fileProgressWrapper . find ( 'td>div' ) . append ( viewProgess ) ;
121+ }
120122 progressBarChunkTr . hide ( ) . find ( 'td' ) . append ( progressBarChunk ) ;
121-
122123 progressBarChunkTr . insertAfter ( this . fileProgressWrapper ) ;
124+
123125} ;
124126
125127FileProgress . prototype . setProgress = function ( percentage , speed , chunk_size ) {
@@ -131,6 +133,9 @@ FileProgress.prototype.setProgress = function(percentage, speed, chunk_size) {
131133 var size = plupload . formatSize ( uploaded ) . toUpperCase ( ) ;
132134 var formatSpeed = plupload . formatSize ( speed ) . toUpperCase ( ) ;
133135 var progressbar = this . fileProgressWrapper . find ( 'td .progress' ) . find ( '.progress-bar-info' ) ;
136+ if ( this . fileProgressWrapper . find ( '.status' ) . text ( ) === '取消上传' ) {
137+ return ;
138+ }
134139 this . fileProgressWrapper . find ( '.status' ) . text ( "已上传: " + size + " 上传速度: " + formatSpeed + "/s" ) ;
135140 percentage = parseInt ( percentage , 10 ) ;
136141 if ( file . status !== plupload . DONE && percentage === 100 ) {
@@ -373,13 +378,11 @@ FileProgress.prototype.setStatus = function(status, isUploading) {
373378FileProgress . prototype . bindUploadCancel = function ( up ) {
374379 var self = this ;
375380 if ( up ) {
376-
377381 self . fileProgressWrapper . find ( 'td:eq(2) .progressCancel' ) . on ( 'click' , function ( ) {
378382 self . setCancelled ( false ) ;
379383 self . setStatus ( "取消上传" ) ;
380384 self . fileProgressWrapper . find ( '.status' ) . css ( 'left' , '0' ) ;
381385 up . removeFile ( self . file ) ;
382- return true ;
383386 } ) ;
384387 }
385388
0 commit comments