Gilles has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/114443

Change subject: Fix preloadFullscreenThumnail breakage
......................................................................

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
---
M resources/mmv/mmv.js
1 file changed, 4 insertions(+), 7 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer 
refs/changes/43/114443/1

diff --git a/resources/mmv/mmv.js b/resources/mmv/mmv.js
index 85bccc0..7871a92 100755
--- a/resources/mmv/mmv.js
+++ b/resources/mmv/mmv.js
@@ -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
                );
        };
 

-- 
To view, visit https://gerrit.wikimedia.org/r/114443
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I46b7dd93c55635f34c01bd8d3eee9785140b5f35
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: master
Gerrit-Owner: Gilles <gdu...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to