diff options
Diffstat (limited to 'vendor/oojs/oojs-ui/src/toolgroups/BarToolGroup.js')
-rw-r--r-- | vendor/oojs/oojs-ui/src/toolgroups/BarToolGroup.js | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/vendor/oojs/oojs-ui/src/toolgroups/BarToolGroup.js b/vendor/oojs/oojs-ui/src/toolgroups/BarToolGroup.js new file mode 100644 index 00000000..038894d6 --- /dev/null +++ b/vendor/oojs/oojs-ui/src/toolgroups/BarToolGroup.js @@ -0,0 +1,35 @@ +/** + * Horizontal bar layout of tools as icon buttons. + * + * @class + * @extends OO.ui.ToolGroup + * + * @constructor + * @param {OO.ui.Toolbar} toolbar + * @param {Object} [config] Configuration options + */ +OO.ui.BarToolGroup = function OoUiBarToolGroup( toolbar, config ) { + // Allow passing positional parameters inside the config object + if ( OO.isPlainObject( toolbar ) && config === undefined ) { + config = toolbar; + toolbar = config.toolbar; + } + + // Parent constructor + OO.ui.BarToolGroup.super.call( this, toolbar, config ); + + // Initialization + this.$element.addClass( 'oo-ui-barToolGroup' ); +}; + +/* Setup */ + +OO.inheritClass( OO.ui.BarToolGroup, OO.ui.ToolGroup ); + +/* Static Properties */ + +OO.ui.BarToolGroup.static.titleTooltips = true; + +OO.ui.BarToolGroup.static.accelTooltips = true; + +OO.ui.BarToolGroup.static.name = 'bar'; |