Index: trunk/extensions/UploadWizard/resources/mw.UploadWizard.js |
— | — | @@ -65,8 +65,8 @@ |
66 | 66 | */ |
67 | 67 | remove: function() { |
68 | 68 | this.state = 'aborted'; |
69 | | - if ( this.deedThumbnailDiv ) { |
70 | | - this.deedThumbnailDiv.remove(); |
| 69 | + if ( this.deedPreview ) { |
| 70 | + this.deedPreview.remove(); |
71 | 71 | } |
72 | 72 | if ( this.details && this.details.div ) { |
73 | 73 | this.details.div.remove(); |
— | — | @@ -1624,16 +1624,21 @@ |
1625 | 1625 | |
1626 | 1626 | mw.UploadWizardDeedPreview.prototype = { |
1627 | 1627 | setup: function() { |
1628 | | - var _this = this; |
1629 | 1628 | // add a preview on the deeds page |
1630 | | - var thumbnailDiv = $j( '<div></div>' ).addClass( 'mwe-upwiz-thumbnail' ); |
1631 | | - $j( '#mwe-upwiz-deeds-thumbnails' ).append( thumbnailDiv ); |
1632 | | - _this.upload.setThumbnail( |
1633 | | - thumbnailDiv, |
| 1629 | + this.$thumbnailDiv = $j( '<div></div>' ).addClass( 'mwe-upwiz-thumbnail' ); |
| 1630 | + $j( '#mwe-upwiz-deeds-thumbnails' ).append( this.$thumbnailDiv ); |
| 1631 | + this.upload.setThumbnail( |
| 1632 | + this.$thumbnailDiv, |
1634 | 1633 | mw.UploadWizard.config['thumbnailWidth'], |
1635 | 1634 | mw.UploadWizard.config['thumbnailMaxHeight'], |
1636 | 1635 | true |
1637 | 1636 | ); |
| 1637 | + }, |
| 1638 | + |
| 1639 | + remove: function() { |
| 1640 | + if ( this.$thumbnailDiv ) { |
| 1641 | + this.$thumbnailDiv.remove(); |
| 1642 | + } |
1638 | 1643 | } |
1639 | 1644 | }; |
1640 | 1645 | |