Index: trunk/extensions/UploadWizard/resources/mw.UploadWizardDeed.js |
— | — | @@ -438,6 +438,10 @@ |
439 | 439 | } |
440 | 440 | $form.slideDown( 500 ); |
441 | 441 | } ); |
| 442 | + }, |
| 443 | + |
| 444 | + remove: function() { |
| 445 | + this.$selector.html(''); |
442 | 446 | } |
443 | 447 | |
444 | 448 | }; |
Index: trunk/extensions/UploadWizard/resources/mw.UploadWizard.js |
— | — | @@ -53,6 +53,9 @@ |
54 | 54 | */ |
55 | 55 | remove: function() { |
56 | 56 | this.state = 'aborted'; |
| 57 | + if ( this.deedThumbnailDiv ) { |
| 58 | + this.deedThumbnailDiv.remove(); |
| 59 | + } |
57 | 60 | if ( this.details && this.details.div ) { |
58 | 61 | this.details.div.remove(); |
59 | 62 | } |
— | — | @@ -547,7 +550,14 @@ |
548 | 551 | * Depending on whether we split uploading / detailing, it may actually always be as simple as loading a URL |
549 | 552 | */ |
550 | 553 | reset: function() { |
551 | | - window.location = wgArticlePath.replace( '$1', 'Special:UploadWizard?skiptutorial=true' ); |
| 554 | + // window.location = wgArticlePath.replace( '$1', 'Special:UploadWizard?skiptutorial=true' ); |
| 555 | + var _this = this; |
| 556 | + // deeds page |
| 557 | + _this.deedChooser.remove(); |
| 558 | + _this.removeMatchingUploads( function() { return true; } ); |
| 559 | + // this could be slicker... need to reset the headline AND get rid of individual divs |
| 560 | + $( '#mwe-upwiz-thanks' ).html( '' ); |
| 561 | + _this.moveToStep( 'file' ); |
552 | 562 | }, |
553 | 563 | |
554 | 564 | |
— | — | @@ -722,6 +732,7 @@ |
723 | 733 | '#mwe-upwiz-deeds', |
724 | 734 | deeds, |
725 | 735 | _this.uploads.length ); |
| 736 | + |
726 | 737 | |
727 | 738 | $j( '<div></div>' ) |
728 | 739 | .insertBefore( _this.deedChooser.$selector.find( '.mwe-upwiz-deed-ownwork' ) ) |
— | — | @@ -1352,6 +1363,7 @@ |
1353 | 1364 | var thumbnailDiv = $j( '<div class="mwe-upwiz-thumbnail-small"></div>' ); |
1354 | 1365 | $j( '#mwe-upwiz-deeds-thumbnails' ).append( thumbnailDiv ); |
1355 | 1366 | _this.upload.setThumbnail( thumbnailDiv, mw.UploadWizard.config[ 'smallThumbnailWidth' ], mw.UploadWizard.config[ 'smallThumbnailMaxHeight' ] ); |
| 1367 | + _this.upload.deedThumbnailDiv = thumbnailDiv; |
1356 | 1368 | } |
1357 | 1369 | }; |
1358 | 1370 | |