mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-25 00:25:47 +00:00
3dd716a3f2
Also removes side-effects from several tests Change-Id: Ifdc978f56f8c4caafadc8b192756645a9378f58a Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/150
24 lines
763 B
JavaScript
24 lines
763 B
JavaScript
( function ( mw, $ ) {
|
|
var MTH = {};
|
|
|
|
MTH.enterFullscreenMock = function() {
|
|
this.first().addClass( 'jq-fullscreened' ).data( 'isFullscreened', true );
|
|
|
|
$( document ).trigger( $.Event( 'jq-fullscreen-change', { element: this, fullscreen: true } ) );
|
|
};
|
|
|
|
MTH.exitFullscreenMock = function() {
|
|
this.first().removeClass( 'jq-fullscreened' ).data( 'isFullscreened', false );
|
|
|
|
$( document ).trigger( $.Event( 'jq-fullscreen-change', { element: this, fullscreen: false } ) );
|
|
};
|
|
|
|
// TODO: remove once viewer isn't being referenced by interfaces anymore
|
|
// and event listening code has been cleaned up
|
|
MTH.resetViewer = function() {
|
|
lightboxHooks.constructor();
|
|
mw.mediaViewer.constructor();
|
|
};
|
|
|
|
mw.mmvTestHelpers = MTH;
|
|
} )( mediaWiki, jQuery ); |