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 |
1 | 1 | + image/png |
Index: trunk/extensions/UploadWizard/resources/mw.UploadWizard.js |
— | — | @@ -99,12 +99,12 @@ |
100 | 100 | */ |
101 | 101 | setTransported: function( result ) { |
102 | 102 | var _this = this; |
103 | | - _this.state = 'transported'; |
104 | | - _this.transportProgress = 1; |
105 | | - $j( _this.ui.div ).trigger( 'transportedEvent' ); |
106 | 103 | |
107 | 104 | if ( result.upload && result.upload.imageinfo ) { |
108 | 105 | // success |
| 106 | + _this.state = 'transported'; |
| 107 | + _this.transportProgress = 1; |
| 108 | + _this.ui.showTransported(); |
109 | 109 | _this.extractUploadInfo( result ); |
110 | 110 | _this.deedPreview.setup(); |
111 | 111 | _this.details.populate(); |
— | — | @@ -119,11 +119,11 @@ |
120 | 120 | // and other errors that result in a stash |
121 | 121 | } else { |
122 | 122 | // XXX handle errors better |
| 123 | + _this.state = 'error'; |
| 124 | + _this.ui.showFailed(); |
123 | 125 | if ( result.error ) { |
124 | 126 | alert( "error : " + result.error.code + " : " + result.error.info ); |
125 | 127 | } |
126 | | - this.ui.showFailed(); |
127 | | - alert("huh?"); |
128 | 128 | // TODO now we should tag the upload as failed |
129 | 129 | // if can recover, should maybe allow re-uploading. |
130 | 130 | } |
— | — | @@ -338,7 +338,7 @@ |
339 | 339 | // _this.progressBar = ( no progress bar for individual uploads yet ) |
340 | 340 | // we bind to the ui div since unbind doesn't work for non-DOM objects |
341 | 341 | $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(); } ); |
343 | 343 | |
344 | 344 | }; |
345 | 345 | |
Index: trunk/extensions/UploadWizard/resources/mw.ApiUploadHandler.js |
— | — | @@ -22,7 +22,9 @@ |
23 | 23 | this.transport = new mw.IframeTransport( |
24 | 24 | this.$form, |
25 | 25 | function( fraction ){ _this.upload.setTransportProgress( fraction ); }, |
26 | | - function( result ) { _this.upload.setTransported( result ); } |
| 26 | + function( result ) { |
| 27 | + _this.upload.setTransported( result ); |
| 28 | + } |
27 | 29 | ); |
28 | 30 | |
29 | 31 | }; |
Index: trunk/extensions/UploadWizard/resources/mw.IframeTransport.js |
— | — | @@ -56,6 +56,7 @@ |
57 | 57 | // Set up the completion callback |
58 | 58 | var _this = this; |
59 | 59 | $j( '#' + this.iframeId ).load( function() { |
| 60 | + debugger; |
60 | 61 | mw.log( "received result in iframe" ); |
61 | 62 | _this.progressCb( 1.0 ); |
62 | 63 | _this.processIframeResult( $j( this ).get( 0 ) ); |