Update OOjs UI to v0.21.1
[lhc/web/wiklou.git] / resources / lib / oojs-ui / oojs-ui-toolbars.js
index 665e9dc..9ef478b 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.21.0
+ * OOjs UI v0.21.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-04-11T22:51:05Z
+ * Date: 2017-04-18T23:32:49Z
  */
 ( function ( OO ) {
 
@@ -1778,6 +1778,7 @@ OO.ui.BarToolGroup.static.name = 'bar';
  * @mixins OO.ui.mixin.IndicatorElement
  * @mixins OO.ui.mixin.LabelElement
  * @mixins OO.ui.mixin.TitledElement
+ * @mixins OO.ui.mixin.FlaggedElement
  * @mixins OO.ui.mixin.ClippableElement
  * @mixins OO.ui.mixin.TabIndexedElement
  *
@@ -1795,7 +1796,7 @@ OO.ui.PopupToolGroup = function OoUiPopupToolGroup( toolbar, config ) {
 
        // Configuration initialization
        config = $.extend( {
-               indicator: toolbar.position === 'bottom' ? 'up' : 'down'
+               indicator: config.indicator === undefined ? ( toolbar.position === 'bottom' ? 'up' : 'down' ) : config.indicator
        }, config );
 
        // Parent constructor
@@ -1812,6 +1813,7 @@ OO.ui.PopupToolGroup = function OoUiPopupToolGroup( toolbar, config ) {
        OO.ui.mixin.IndicatorElement.call( this, config );
        OO.ui.mixin.LabelElement.call( this, config );
        OO.ui.mixin.TitledElement.call( this, config );
+       OO.ui.mixin.FlaggedElement.call( this, config );
        OO.ui.mixin.ClippableElement.call( this, $.extend( {}, config, { $clippable: this.$group } ) );
        OO.ui.mixin.TabIndexedElement.call( this, $.extend( {}, config, { $tabIndexed: this.$handle } ) );
 
@@ -1826,6 +1828,7 @@ OO.ui.PopupToolGroup = function OoUiPopupToolGroup( toolbar, config ) {
        // Initialization
        this.$handle
                .addClass( 'oo-ui-popupToolGroup-handle' )
+               .attr( 'role', 'button' )
                .append( this.$icon, this.$label, this.$indicator );
        // If the pop-up should have a header, add it to the top of the toolGroup.
        // Note: If this feature is useful for other widgets, we could abstract it into an
@@ -1849,6 +1852,7 @@ OO.mixinClass( OO.ui.PopupToolGroup, OO.ui.mixin.IconElement );
 OO.mixinClass( OO.ui.PopupToolGroup, OO.ui.mixin.IndicatorElement );
 OO.mixinClass( OO.ui.PopupToolGroup, OO.ui.mixin.LabelElement );
 OO.mixinClass( OO.ui.PopupToolGroup, OO.ui.mixin.TitledElement );
+OO.mixinClass( OO.ui.PopupToolGroup, OO.ui.mixin.FlaggedElement );
 OO.mixinClass( OO.ui.PopupToolGroup, OO.ui.mixin.ClippableElement );
 OO.mixinClass( OO.ui.PopupToolGroup, OO.ui.mixin.TabIndexedElement );