mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-13 18:06:57 +00:00
98e03d31c8
Add metadata visibility logic to the test Convert the code to CSS since writing the test made me realise that the current JS was superfluous Change-Id: I80c2f1860cc021e9bdf09345647b288de746f1e3 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/140
17 lines
540 B
JavaScript
17 lines
540 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 } ) );
|
|
};
|
|
|
|
mw.mmvTestHelpers = MTH;
|
|
} )( mediaWiki, jQuery ); |