mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 18:39:52 +00:00
efafed3231
Change-Id: I8df9226a358a76b661eab6e967ff0d63d361f691
35 lines
856 B
JavaScript
35 lines
856 B
JavaScript
/*!
|
|
* VisualEditor UserInterface IconButtonWidget class.
|
|
*
|
|
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/**
|
|
* Creates an ve.ui.IconButtonWidget object.
|
|
*
|
|
* @class
|
|
* @extends ve.ui.ButtonWidget
|
|
* @mixins ve.ui.IconedElement
|
|
*
|
|
* @constructor
|
|
* @param {Object} [config] Configuration options
|
|
*/
|
|
ve.ui.IconButtonWidget = function VeUiIconButtonWidget( config ) {
|
|
// Parent constructor
|
|
ve.ui.ButtonWidget.call( this, config );
|
|
|
|
// Mixin constructors
|
|
ve.ui.IconedElement.call( this, this.$$( '<span>' ), config );
|
|
|
|
// Initialization
|
|
this.$button.prepend( this.$icon );
|
|
this.$.addClass( 've-ui-iconButtonWidget' );
|
|
};
|
|
|
|
/* Inheritance */
|
|
|
|
OO.inheritClass( ve.ui.IconButtonWidget, ve.ui.ButtonWidget );
|
|
|
|
OO.mixinClass( ve.ui.IconButtonWidget, ve.ui.IconedElement );
|