r89989 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89988‎ | r89989 | r89990 >
Date:18:27, 13 June 2011
Author:neilk
Status:ok (Comments)
Tags:
Comment:
after UploadWizard reset, need to purge DeedPreviews (which are now their own object, not just divs)
Modified paths:
  • /trunk/extensions/UploadWizard/resources/mw.UploadWizard.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/resources/mw.UploadWizard.js
@@ -65,8 +65,8 @@
6666 */
6767 remove: function() {
6868 this.state = 'aborted';
69 - if ( this.deedThumbnailDiv ) {
70 - this.deedThumbnailDiv.remove();
 69+ if ( this.deedPreview ) {
 70+ this.deedPreview.remove();
7171 }
7272 if ( this.details && this.details.div ) {
7373 this.details.div.remove();
@@ -1624,16 +1624,21 @@
16251625
16261626 mw.UploadWizardDeedPreview.prototype = {
16271627 setup: function() {
1628 - var _this = this;
16291628 // 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,
16341633 mw.UploadWizard.config['thumbnailWidth'],
16351634 mw.UploadWizard.config['thumbnailMaxHeight'],
16361635 true
16371636 );
 1637+ },
 1638+
 1639+ remove: function() {
 1640+ if ( this.$thumbnailDiv ) {
 1641+ this.$thumbnailDiv.remove();
 1642+ }
16381643 }
16391644 };
16401645

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r89960bring back lightbox-ish previewneilk13:48, 13 June 2011

Comments

#Comment by Brion VIBBER (talk | contribs)   21:26, 13 June 2011

Seems to work, thumbnail goes away after resetting.

Status & tagging log