mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-24 08:13:38 +00:00
Limit image search to content firing event
Bug: T140574 Change-Id: I3c504c09b2b382e094ab2be1fa388efa7ec827b1
This commit is contained in:
parent
c22a5eeadd
commit
db6c74a232
|
@ -129,10 +129,10 @@
|
||||||
/**
|
/**
|
||||||
* Processes all thumbs found on the page
|
* Processes all thumbs found on the page
|
||||||
*/
|
*/
|
||||||
MMVB.processThumbs = function () {
|
MMVB.processThumbs = function ( $content ) {
|
||||||
var bs = this;
|
var bs = this;
|
||||||
|
|
||||||
this.$thumbs = $(
|
this.$thumbs = $content.find(
|
||||||
'.gallery .image img, ' +
|
'.gallery .image img, ' +
|
||||||
'a.image img, ' +
|
'a.image img, ' +
|
||||||
'#file a img, ' +
|
'#file a img, ' +
|
||||||
|
|
|
@ -52,6 +52,8 @@
|
||||||
function createBootstrap( viewer ) {
|
function createBootstrap( viewer ) {
|
||||||
var bootstrap = new mw.mmv.MultimediaViewerBootstrap();
|
var bootstrap = new mw.mmv.MultimediaViewerBootstrap();
|
||||||
|
|
||||||
|
bootstrap.processThumbs( $( '#qunit-fixture' ) );
|
||||||
|
|
||||||
// MultimediaViewerBootstrap.ensureEventHandlersAreSetUp() is a weird workaround for gadget bugs.
|
// MultimediaViewerBootstrap.ensureEventHandlersAreSetUp() is a weird workaround for gadget bugs.
|
||||||
// MediaViewer should work without it, and so should the tests.
|
// MediaViewer should work without it, and so should the tests.
|
||||||
bootstrap.ensureEventHandlersAreSetUp = $.noop;
|
bootstrap.ensureEventHandlersAreSetUp = $.noop;
|
||||||
|
|
Loading…
Reference in a new issue