mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
GalleryContextItem: Only count image node children
Bug: T320874 Change-Id: I524901619820482c7152d7c7b9bc4a2b9f6ee3ca
This commit is contained in:
parent
bf1bacfce1
commit
2a4b4f6b96
|
@ -44,7 +44,9 @@ ve.ui.MWGalleryContextItem.static.commandName = 'gallery';
|
|||
* @inheritdoc
|
||||
*/
|
||||
ve.ui.MWGalleryContextItem.prototype.getDescription = function () {
|
||||
return ve.msg( 'visualeditor-mwgallerycontext-description', this.model.children.length );
|
||||
return ve.msg( 'visualeditor-mwgallerycontext-description', this.model.children.filter( function ( node ) {
|
||||
return node instanceof ve.dm.MWGalleryImageNode;
|
||||
} ).length );
|
||||
};
|
||||
|
||||
/* Registration */
|
||||
|
|
Loading…
Reference in a new issue