/*!
- * OOjs UI v0.18.4-fix (d4045dee45)
+ * OOjs UI v0.19.1
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-01-19T20:22:26Z
+ * Date: 2017-02-08T00:38:31Z
*/
( function ( OO ) {
* @cfg {boolean} [actions] Add an actions section to the toolbar. Actions are commands that are included
* in the toolbar, but are not configured as tools. By default, actions are displayed on the right side of
* the toolbar.
- * @cfg {boolean} [shadow] Add a shadow below the toolbar.
+ * @cfg {string} [position='top'] Whether the toolbar is positioned above ('top') or below ('bottom') content.
*/
OO.ui.Toolbar = function OoUiToolbar( toolFactory, toolGroupFactory, config ) {
// Allow passing positional parameters inside the config object
this.toolGroupFactory = toolGroupFactory;
this.groups = [];
this.tools = {};
+ this.position = config.position || 'top';
this.$bar = $( '<div>' );
this.$actions = $( '<div>' );
this.initialized = false;
this.$bar
.addClass( 'oo-ui-toolbar-bar' )
.append( this.$group, '<div style="clear:both"></div>' );
- if ( config.shadow ) {
- this.$bar.append( '<div class="oo-ui-toolbar-shadow"></div>' );
- }
- this.$element.addClass( 'oo-ui-toolbar' ).append( this.$bar );
+ this.$element.addClass( 'oo-ui-toolbar oo-ui-toolbar-position-' + this.position ).append( this.$bar );
};
/* Setup */
*/
OO.ui.ToolGroup.static.autoDisable = true;
+/**
+ * @abstract
+ * @static
+ * @inheritable
+ * @property {string}
+ */
+OO.ui.ToolGroup.static.name = null;
+
/* Methods */
/**
/* Static Properties */
+/**
+ * @static
+ * @inheritdoc
+ */
OO.ui.BarToolGroup.static.titleTooltips = true;
+/**
+ * @static
+ * @inheritdoc
+ */
OO.ui.BarToolGroup.static.accelTooltips = true;
+/**
+ * @static
+ * @inheritdoc
+ */
OO.ui.BarToolGroup.static.name = 'bar';
/**
}
// Configuration initialization
- config = config || {};
+ config = $.extend( {
+ indicator: toolbar.position === 'bottom' ? 'up' : 'down'
+ }, config );
// Parent constructor
OO.ui.PopupToolGroup.parent.call( this, toolbar, config );
* // Configurations for list toolgroup.
* type: 'list',
* label: 'ListToolGroup',
- * indicator: 'down',
* icon: 'ellipsis',
* title: 'This is the title, displayed when user moves the mouse over the list toolgroup',
* header: 'This is the header',
/* Static Properties */
+/**
+ * @static
+ * @inheritdoc
+ */
OO.ui.ListToolGroup.static.name = 'list';
/* Methods */
* type: 'menu',
* header: 'This is the (optional) header',
* title: 'This is the (optional) title',
- * indicator: 'down',
* include: [ 'settings', 'stuff' ]
* }
* ] );
/* Static Properties */
+/**
+ * @static
+ * @inheritdoc
+ */
OO.ui.MenuToolGroup.static.name = 'menu';
/* Methods */
};
}( OO ) );
-
-//# sourceMappingURL=oojs-ui-toolbars.js.map
\ No newline at end of file