2015-11-08 17:05:33 +00:00
|
|
|
/*!
|
|
|
|
* VisualEditor MWSignatureContextItem class.
|
|
|
|
*
|
2020-01-08 17:13:04 +00:00
|
|
|
* @copyright 2011-2020 VisualEditor Team and others; see http://ve.mit-license.org
|
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
|
|
|
|
* @param {ve.ui.Context} context Context item is in
|
|
|
|
* @param {ve.dm.Model} model Model 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 );
|