Add showThumbnails option to slideshow galleries

This option causes the thumbnail images for the slideshow to be visible
as soon as the slideshow is loaded. They can still be closed normally.`

Bug: T147913
Change-Id: Iae6fd4f016d9fc98280d4ba92e4332ff06e1fb9e
This commit is contained in:
pppery 2016-12-16 21:11:12 -05:00 committed by Pppery
parent 58a8a98ac0
commit 7fd737c4aa
2 changed files with 5 additions and 1 deletions

View file

@ -34,4 +34,8 @@ class SlideshowImageGallery extends TraditionalImageGallery {
protected function getModules() {
return [ 'mediawiki.page.gallery.slideshow' ];
}
public function setAdditionalOptions( $params ) {
$this->mAttribs['data-showthumbnails'] = isset( $params['showthumbnails'] );
}
}

View file

@ -26,7 +26,7 @@
// Initialize
this.drawCarousel();
this.setSizeRequirement();
this.toggleThumbnails( false );
this.toggleThumbnails( !!this.$gallery.attr( 'data-showthumbnails' ) );
this.showCurrentImage();
// Events