mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 00:30:44 +00:00
6774cd74f3
Changes: * Pass toolGroup into tools instead of toolbar * Split tool labels into title and accel * Make toolbars provide accelerator labels * Remove getLabelText method since it's not being used and is likely not useful * Make tools update their own labels * Only show accelerator information for triggers that are active in the surface * Make surface toolbars listen to commands being added and update tools accordingly * Introduce command object to encapsulate command info Change-Id: Ieac4bfa63b63ac0a9dee154af3007a33b4d447ff
36 lines
796 B
JavaScript
36 lines
796 B
JavaScript
/*!
|
|
* ObjectOriented UserInterface BarToolGroup class.
|
|
*
|
|
* @copyright 2011-2013 OOJS Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/**
|
|
* Horizontal bar layout of tools as icon buttons.
|
|
*
|
|
* @class
|
|
* @abstract
|
|
* @extends OO.ui.ToolGroup
|
|
*
|
|
* @constructor
|
|
* @param {OO.ui.Toolbar} toolbar
|
|
* @param {Object} [config] Configuration options
|
|
*/
|
|
OO.ui.BarToolGroup = function OoUiBarToolGroup( toolbar, config ) {
|
|
// Parent constructor
|
|
OO.ui.ToolGroup.call( this, toolbar, config );
|
|
|
|
// Initialization
|
|
this.$.addClass( 'oo-ui-barToolGroup' );
|
|
};
|
|
|
|
/* Inheritance */
|
|
|
|
OO.inheritClass( OO.ui.BarToolGroup, OO.ui.ToolGroup );
|
|
|
|
/* Static Properties */
|
|
|
|
OO.ui.BarToolGroup.static.labelTooltips = true;
|
|
|
|
OO.ui.BarToolGroup.static.accelTooltips = true;
|