2015-11-08 17:05:33 +00:00
|
|
|
/*!
|
|
|
|
* VisualEditor MWSignatureContextItem class.
|
|
|
|
*
|
2023-12-01 16:06:11 +00:00
|
|
|
* @copyright See AUTHORS.txt
|
2015-11-08 17:05:33 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Context item for a MWSignature.
|
|
|
|
*
|
|
|
|
* @class
|
2020-06-20 12:00:25 +00:00
|
|
|
* @extends ve.ui.LinearContextItem
|
2015-11-08 17:05:33 +00:00
|
|
|
*
|
|
|
|
* @constructor
|
2023-07-10 13:31:31 +00:00
|
|
|
* @param {ve.ui.LinearContext} context Context the item is in
|
|
|
|
* @param {ve.dm.Model} model Model the item is related to
|
2023-02-02 09:47:32 +00:00
|
|
|
* @param {Object} [config]
|
2015-11-08 17:05:33 +00:00
|
|
|
*/
|
|
|
|
ve.ui.MWSignatureContextItem = function VeUiMWSignatureContextItem() {
|
|
|
|
// Parent constructor
|
|
|
|
ve.ui.MWSignatureContextItem.super.apply( this, arguments );
|
|
|
|
|
|
|
|
// Initialization
|
|
|
|
this.$element.addClass( 've-ui-mwSignatureContextItem' );
|
|
|
|
this.$actions.remove();
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
2020-06-20 12:00:25 +00:00
|
|
|
OO.inheritClass( ve.ui.MWSignatureContextItem, ve.ui.LinearContextItem );
|
2015-11-08 17:05:33 +00:00
|
|
|
|
|
|
|
/* Static Properties */
|
|
|
|
|
|
|
|
ve.ui.MWSignatureContextItem.static.editable = false;
|
|
|
|
|
|
|
|
ve.ui.MWSignatureContextItem.static.name = 'mwSignature';
|
|
|
|
|
|
|
|
ve.ui.MWSignatureContextItem.static.icon = 'signature';
|
|
|
|
|
|
|
|
ve.ui.MWSignatureContextItem.static.label =
|
|
|
|
OO.ui.deferMsg( 'visualeditor-mwsignature-tool' );
|
|
|
|
|
|
|
|
ve.ui.MWSignatureContextItem.static.modelClasses = [ ve.dm.MWSignatureNode ];
|
|
|
|
|
|
|
|
/* Methods */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @inheritdoc
|
|
|
|
*/
|
|
|
|
ve.ui.MWSignatureContextItem.prototype.getDescription = function () {
|
|
|
|
return '';
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Registration */
|
|
|
|
|
|
|
|
ve.ui.contextItemFactory.register( ve.ui.MWSignatureContextItem );
|