mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-09-29 13:17:35 +00:00
Merge "Show caption on thumbnails"
This commit is contained in:
commit
cb95413903
|
@ -164,6 +164,9 @@
|
||||||
if ( $thumbContain.length !== 0 && $thumbContain.is( '.thumb' ) ) {
|
if ( $thumbContain.length !== 0 && $thumbContain.is( '.thumb' ) ) {
|
||||||
$thumbCaption = $thumbContain.find( '.thumbcaption' ).clone();
|
$thumbCaption = $thumbContain.find( '.thumbcaption' ).clone();
|
||||||
$thumbCaption.find( '.magnify' ).remove();
|
$thumbCaption.find( '.magnify' ).remove();
|
||||||
|
if ( !$thumbCaption.length ) { // gallery, maybe
|
||||||
|
$thumbCaption = $thumbContain.closest( '.gallerybox' ).find( '.gallerytext' ).clone();
|
||||||
|
}
|
||||||
caption = this.htmlUtils.htmlToTextWithLinks( $thumbCaption.html() || '' );
|
caption = this.htmlUtils.htmlToTextWithLinks( $thumbCaption.html() || '' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue