mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-16 02:51:50 +00:00
580c5be915
Objective: * Use CSS to control the styling of empty labels Changes: ve.ui.LabeledElement.js * Remove emptyHtml static property * Add/remove ve-ui-labeledElement-empty class when setting label ve.ui.ToolGroup.css * Hide empty labels inside popup tool group handles ve.ui.Widget.css * Hide empty labels inside icon button widgets ve.ui.Toolbar.js * Only apply default catch-all tool group properties if they were previously undefined ve.ui.IconButtonWidget.js * Remove emptyHtml static property Change-Id: Icd3f772942e74b547e926829c181e914182feb75
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 */
|
|
|
|
ve.inheritClass( ve.ui.IconButtonWidget, ve.ui.ButtonWidget );
|
|
|
|
ve.mixinClass( ve.ui.IconButtonWidget, ve.ui.IconedElement );
|