| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
ve.ui.MWGalleryContextItem = function VeUiMWGalleryContextItem() { |
| 18 |
|
| 19 |
ve.ui.MWGalleryContextItem.super.apply( this, arguments ); |
| 20 |
|
| 21 |
|
| 22 |
this.$element.addClass( 've-ui-mwGalleryContextItem' ); |
| 23 |
}; |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
OO.inheritClass( ve.ui.MWGalleryContextItem, ve.ui.LinearContextItem ); |
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
ve.ui.MWGalleryContextItem.static.name = 'mwGallery'; |
| 32 |
|
| 33 |
ve.ui.MWGalleryContextItem.static.icon = 'imageGallery'; |
| 34 |
|
| 35 |
ve.ui.MWGalleryContextItem.static.label = OO.ui.deferMsg( 'visualeditor-mwgallerydialog-title' ); |
| 36 |
|
| 37 |
ve.ui.MWGalleryContextItem.static.modelClasses = [ ve.dm.MWGalleryNode ]; |
| 38 |
|
| 39 |
ve.ui.MWGalleryContextItem.static.commandName = 'gallery'; |
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
ve.ui.MWGalleryContextItem.prototype.getDescription = function () { |
| 47 |
return ve.msg( 'visualeditor-mwgallerycontext-description', this.model.getImageNodes().length ); |
| 48 |
}; |
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
ve.ui.contextItemFactory.register( ve.ui.MWGalleryContextItem ); |