2016-09-30 16:07:10 +00:00
|
|
|
/*!
|
|
|
|
* VisualEditor MediaWiki Initialization GalleryImageInfoCache class.
|
|
|
|
*
|
2018-01-03 00:54:47 +00:00
|
|
|
* @copyright 2011-2018 VisualEditor Team and others; see AUTHORS.txt
|
2016-09-30 16:07:10 +00:00
|
|
|
* @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',
|
2016-11-19 23:11:06 +00:00
|
|
|
iiprop: 'url|size',
|
2016-09-30 16:07:10 +00:00
|
|
|
titles: subqueue,
|
|
|
|
iiurlwidth: 200,
|
|
|
|
iiurlheight: 200
|
|
|
|
},
|
|
|
|
{ type: 'POST' }
|
|
|
|
);
|
|
|
|
};
|