r52039 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52038‎ | r52039 | r52040 >
Date:10:08, 17 June 2009
Author:dale
Status:deferred
Tags:
Comment:
fixed double cancel button for firefogg
Modified paths:
  • /branches/new-upload/phase3/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libAddMedia/mvFirefogg.js (modified) (history)

Diff [purge]

Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/mvFirefogg.js
@@ -447,7 +447,7 @@
448448 if( _this.formData['wpIgnoreWarning'] )
449449 aReq['ignorewarnings'] = _this.formData['wpIgnoreWarning'];
450450
451 - js_log('do fogg upload call: '+ _this.api_url + ' :: ' + JSON.stringify( aReq ) );
 451+ js_log('do fogg upload/encode call: '+ _this.api_url + ' :: ' + JSON.stringify( aReq ) );
452452 js_log('foggEncode: '+ JSON.stringify( _this.encoder_settings ) );
453453 _this.fogg.upload( JSON.stringify( _this.encoder_settings ), _this.api_url , JSON.stringify( aReq ) );
454454
@@ -488,8 +488,8 @@
489489 var _this = this;
490490 js_log('::encodeDone::');
491491 //send to the post url:
492 - if( _this.form_rewrite ){
493 - js_log('done with encoding do upload:' + _this.editForm.action);
 492+ if( _this.form_rewrite && _this.upload_mode == 'post' ){
 493+ js_log('done with encoding do POST upload:' + _this.editForm.action);
494494 // ignore warnings & set source type
495495 //_this.formData[ 'wpIgnoreWarning' ]='true';
496496 _this.formData[ 'wpSourceType' ] = 'file';
@@ -499,6 +499,7 @@
500500 //update upload status:
501501 _this.doUploadStatus();
502502 }else{
 503+ js_log("done with encoding (no upload) ")
503504 _this.updateProgressWin(gM('fogg-encoding-done'), gM('fogg-encoding-done'));
504505 }
505506 },
@@ -533,7 +534,9 @@
534535 setTimeout(uploadStatus, 100);
535536 }
536537 //check upload state
537 - else if( _this.fogg.state == 'upload done' || _this.fogg.state == 'done' ) {
 538+ else if( _this.fogg.state == 'upload done' ||
 539+ _this.fogg.state == 'done' ||
 540+ _this.fogg.state == 'encoding done' ) {
538541 js_log( 'firefogg:upload done: ');
539542 //if in "post" upload mode read the html response (should be depricated):
540543 if( _this.upload_mode == 'post' && _this.api_url ) {
Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js
@@ -510,10 +510,8 @@
511511 width:400,
512512 heigh:200,
513513 beforeclose: function(event, ui) {
514 - if( event.button==0 ){
515 - if( confirm( gM('mv-canecl-confim') )){
516 - _this.cancel_action();
517 - }
 514+ if( event.button==0 ){
 515+ _this.cancel_action();
518516 }else{
519517 //click on button (dont do close action);
520518 return true;

Status & tagging log