mediawiki-extensions-Visual.../modules/ve-mw/init/ve.init.mw.GalleryImageInfoCache.js
Alex Monk c843824c97 Batch gallery imageinfo requests via ImageInfoCache subclass
Also get rid of .join( '|' ) for API request parameters per Bartosz

Bug: T147067
Change-Id: If4444cca300d65e28d6fb9003fcac5e076a5129a
2016-12-06 22:10:19 +00:00

41 lines
876 B
JavaScript

/*!
* VisualEditor MediaWiki Initialization GalleryImageInfoCache class.
*
* @copyright 2011-2016 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
/**
* Get thumbnail URL information about gallery images.
*
* @class
* @extends ve.init.mw.ImageInfoCache
* @constructor
*/
ve.init.mw.GalleryImageInfoCache = function VeInitMwGalleryImageInfoCache() {
ve.init.mw.GalleryImageInfoCache.super.call( this );
};
/* Inheritance */
OO.inheritClass( ve.init.mw.GalleryImageInfoCache, ve.init.mw.ImageInfoCache );
/* Methods */
/**
* @inheritdoc
*/
ve.init.mw.GalleryImageInfoCache.prototype.getRequestPromise = function ( subqueue ) {
return new mw.Api().get(
{
action: 'query',
prop: 'imageinfo',
iiprop: 'url',
titles: subqueue,
iiurlwidth: 200,
iiurlheight: 200
},
{ type: 'POST' }
);
};