r76864 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76863‎ | r76864 | r76865 >
Date:00:16, 17 November 2010
Author:neilk
Status:ok
Tags:
Comment:
make failure fail
Modified paths:
  • /trunk/extensions/UploadWizard/resources/16px-Gnome-process-stop.svg.png (added) (history)
  • /trunk/extensions/UploadWizard/resources/mw.ApiUploadHandler.js (modified) (history)
  • /trunk/extensions/UploadWizard/resources/mw.IframeTransport.js (modified) (history)
  • /trunk/extensions/UploadWizard/resources/mw.UploadWizard.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/resources/16px-Gnome-process-stop.svg.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes on: trunk/extensions/UploadWizard/resources/16px-Gnome-process-stop.svg.png
___________________________________________________________________
Added: svn:mime-type
11 + image/png
Index: trunk/extensions/UploadWizard/resources/mw.UploadWizard.js
@@ -99,12 +99,12 @@
100100 */
101101 setTransported: function( result ) {
102102 var _this = this;
103 - _this.state = 'transported';
104 - _this.transportProgress = 1;
105 - $j( _this.ui.div ).trigger( 'transportedEvent' );
106103
107104 if ( result.upload && result.upload.imageinfo ) {
108105 // success
 106+ _this.state = 'transported';
 107+ _this.transportProgress = 1;
 108+ _this.ui.showTransported();
109109 _this.extractUploadInfo( result );
110110 _this.deedPreview.setup();
111111 _this.details.populate();
@@ -119,11 +119,11 @@
120120 // and other errors that result in a stash
121121 } else {
122122 // XXX handle errors better
 123+ _this.state = 'error';
 124+ _this.ui.showFailed();
123125 if ( result.error ) {
124126 alert( "error : " + result.error.code + " : " + result.error.info );
125127 }
126 - this.ui.showFailed();
127 - alert("huh?");
128128 // TODO now we should tag the upload as failed
129129 // if can recover, should maybe allow re-uploading.
130130 }
@@ -338,7 +338,7 @@
339339 // _this.progressBar = ( no progress bar for individual uploads yet )
340340 // we bind to the ui div since unbind doesn't work for non-DOM objects
341341 $j( _this.div ).bind( 'transportProgressEvent', function(e) { _this.showTransportProgress(); } );
342 - $j( _this.div ).bind( 'transportedEvent', function(e) { _this.showTransported(); } );
 342+ // $j( _this.div ).bind( 'transportedEvent', function(e) { _this.showTransported(); } );
343343
344344 };
345345
Index: trunk/extensions/UploadWizard/resources/mw.ApiUploadHandler.js
@@ -22,7 +22,9 @@
2323 this.transport = new mw.IframeTransport(
2424 this.$form,
2525 function( fraction ){ _this.upload.setTransportProgress( fraction ); },
26 - function( result ) { _this.upload.setTransported( result ); }
 26+ function( result ) {
 27+ _this.upload.setTransported( result );
 28+ }
2729 );
2830
2931 };
Index: trunk/extensions/UploadWizard/resources/mw.IframeTransport.js
@@ -56,6 +56,7 @@
5757 // Set up the completion callback
5858 var _this = this;
5959 $j( '#' + this.iframeId ).load( function() {
 60+ debugger;
6061 mw.log( "received result in iframe" );
6162 _this.progressCb( 1.0 );
6263 _this.processIframeResult( $j( this ).get( 0 ) );

Status & tagging log