Fix preloadFullscreenThumnail breakage

Since there was no merge conflict and the changeset worked pre-merge, when jenkins merged the fullscreen changeset, it actually turned out to be incompatible with the new code and spews out a nasty JS error. I think from now on I'll always avoid +2ing a diff that hasn't been rebased to the latest. When looking at the diff not rebased to the latest, you just can't see the issues that might happen with the latest code merged and you certainly won't spot the potential breakage that comes with it.

In fact I think a lot of breakages we've encountered as of late were caused by this very issue.

Change-Id: I46b7dd93c55635f34c01bd8d3eee9785140b5f35
This commit is contained in:
Gilles Dubuc 2014-02-20 10:34:48 +01:00
parent 093cfdc697
commit fdeedd6a88

View file

@ -227,7 +227,7 @@
this.preloadImagesMetadata();
this.preloadThumbnails();
this.preloadFullscreenThumbnail();
this.preloadFullscreenThumbnail( image );
$( document.body ).addClass( 'mw-mlb-lightbox-open' );
@ -402,13 +402,10 @@
/**
* Preload the fullscreen size of the current image.
*/
MMVP.preloadFullscreenThumbnail = function() {
var lightbox = this.lightbox.images[this.lightbox.currentIndex],
ui = this.lightbox.iface;
MMVP.preloadFullscreenThumbnail = function( image ) {
this.fetchThumbnail(
lightbox.filePageTitle,
ui.getLightboxImageWidthsForFullscreen( lightbox ).real
image.filePageTitle,
this.lightbox.iface.getLightboxImageWidthsForFullscreen( image ).real
);
};