2022-04-21 19:14:52 +00:00
|
|
|
/**
|
|
|
|
* VisualEditor MWTabberContextItem class.
|
|
|
|
*
|
|
|
|
* @class
|
|
|
|
* @extends ve.ui.LinearContextItem
|
|
|
|
*
|
|
|
|
* @constructor
|
|
|
|
* @param {ve.ui.Context} context Context item is in
|
|
|
|
* @param {ve.dm.Model} model Model item is related to
|
|
|
|
* @param {Object} config Configuration options
|
|
|
|
*/
|
|
|
|
ve.ui.MWTabberContextItem = function VeUiMWTabberContextItem() {
|
|
|
|
// Parent constructor
|
|
|
|
ve.ui.MWTabberContextItem.super.apply( this, arguments );
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
|
|
|
OO.inheritClass( ve.ui.MWTabberContextItem, ve.ui.LinearContextItem );
|
|
|
|
|
|
|
|
/* Static Properties */
|
|
|
|
|
|
|
|
ve.ui.MWTabberContextItem.static.name = 'mwTabber';
|
|
|
|
|
2022-04-22 20:31:21 +00:00
|
|
|
ve.ui.MWTabberContextItem.static.icon = 'tabber';
|
2022-04-21 19:14:52 +00:00
|
|
|
|
|
|
|
ve.ui.MWTabberContextItem.static.label = OO.ui.deferMsg( 'tabberneue-visualeditor-mwtabberdialog-title' );
|
|
|
|
|
2022-04-22 23:34:06 +00:00
|
|
|
ve.ui.MWTabberContextItem.static.modelClasses = [ ve.dm.MWTabberNode ];
|
2022-04-21 19:14:52 +00:00
|
|
|
|
|
|
|
ve.ui.MWTabberContextItem.static.commandName = 'mwTabber';
|
|
|
|
|
|
|
|
/* Methods */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @inheritdoc
|
|
|
|
*/
|
|
|
|
ve.ui.MWTabberContextItem.prototype.getDescription = function () {
|
2022-04-23 02:22:44 +00:00
|
|
|
return mw.message( 'tabberneue-visualeditor-mwtabberdialog-desc' ).parse();
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @inheritdoc
|
|
|
|
*/
|
|
|
|
ve.ui.MWTabberContextItem.prototype.renderBody = function () {
|
|
|
|
this.$body.empty().append( this.getDescription() );
|
2022-04-21 19:14:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Registration */
|
|
|
|
|
2022-04-23 00:00:32 +00:00
|
|
|
ve.ui.contextItemFactory.register( ve.ui.MWTabberContextItem );
|