mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-09-24 02:39:37 +00:00
Merge "Do not clone CSS class names as well"
This commit is contained in:
commit
fb40e5b09f
|
@ -275,9 +275,10 @@
|
|||
// know what size it should be. We still assign it to allow for
|
||||
// size calculations in getCurrentImageWidths, which needs to know
|
||||
// the aspect ratio
|
||||
$initialImage.hide();
|
||||
$initialImage.addClass( 'mw-mmv-placeholder-image' );
|
||||
$initialImage.addClass( image.filePageTitle.ext.toLowerCase() );
|
||||
$initialImage.hide()
|
||||
.removeAttr( 'style' )
|
||||
.removeClass()
|
||||
.addClass( 'mw-mmv-placeholder-image ' + image.filePageTitle.ext.toLowerCase() );
|
||||
|
||||
this.ui.canvas.set( image, $initialImage );
|
||||
|
||||
|
|
|
@ -550,16 +550,13 @@
|
|||
$container.addClass( 'metadata' );
|
||||
assert.strictEqual( bootstrap.isAllowedThumb( $thumb ), false, 'Image in a metadata container is disallowed.' );
|
||||
|
||||
$container.prop( 'class', '' );
|
||||
$container.addClass( 'noviewer' );
|
||||
$container.removeClass().addClass( 'noviewer' );
|
||||
assert.strictEqual( bootstrap.isAllowedThumb( $thumb ), false, 'Image in a noviewer container is disallowed.' );
|
||||
|
||||
$container.prop( 'class', '' );
|
||||
$container.addClass( 'noarticletext' );
|
||||
$container.removeClass().addClass( 'noarticletext' );
|
||||
assert.strictEqual( bootstrap.isAllowedThumb( $thumb ), false, 'Image in an empty article is disallowed.' );
|
||||
|
||||
$container.prop( 'class', '' );
|
||||
$thumb.addClass( 'noviewer' );
|
||||
$container.removeClass().addClass( 'noviewer' );
|
||||
assert.strictEqual( bootstrap.isAllowedThumb( $thumb ), false, 'Image with a noviewer class is disallowed.' );
|
||||
} );
|
||||
|
||||
|
|
Loading…
Reference in a new issue