Merge "RCFilters: Style the Saved Links placeholder and add a title"
[lhc/web/wiklou.git] / resources / lib / oojs-ui / oojs-ui-windows.js
index b23949f..3a697e1 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.21.0
+ * OOjs UI v0.21.4
  * 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-05-16T22:31:39Z
  */
 ( function ( OO ) {
 
@@ -1636,6 +1636,26 @@ OO.ui.Window = function OoUiWindow( config ) {
        this.manager = null;
        this.size = config.size || this.constructor.static.size;
        this.$frame = $( '<div>' );
+       /**
+        * Overlay element to use for the `$overlay` configuration option of widgets that support it.
+        * Things put inside of it are overlaid on top of the window and are not bound to its dimensions.
+        * See <https://www.mediawiki.org/wiki/OOjs_UI/Concepts#Overlays>.
+        *
+        *     MyDialog.prototype.initialize = function () {
+        *       ...
+        *       var popupButton = new OO.ui.PopupButtonWidget( {
+        *         $overlay: this.$overlay,
+        *         label: 'Popup button',
+        *         popup: {
+        *           $content: $( '<p>Popup contents.</p><p>Popup contents.</p><p>Popup contents.</p>' ),
+        *           padded: true
+        *         }
+        *       } );
+        *       ...
+        *     };
+        *
+        * @property {jQuery}
+        */
        this.$overlay = $( '<div>' );
        this.$content = $( '<div>' );
 
@@ -2492,21 +2512,15 @@ OO.ui.Dialog.prototype.getTeardownProcess = function ( data ) {
  * @inheritdoc
  */
 OO.ui.Dialog.prototype.initialize = function () {
-       var titleId;
-
        // Parent method
        OO.ui.Dialog.parent.prototype.initialize.call( this );
 
-       titleId = OO.ui.generateElementId();
-
        // Properties
-       this.title = new OO.ui.LabelWidget( {
-               id: titleId
-       } );
+       this.title = new OO.ui.LabelWidget();
 
        // Initialization
        this.$content.addClass( 'oo-ui-dialog-content' );
-       this.$element.attr( 'aria-labelledby', titleId );
+       this.$element.attr( 'aria-labelledby', this.title.getElementId() );
        this.setPendingElement( this.$head );
 };
 
@@ -2772,7 +2786,7 @@ OO.ui.MessageDialog.prototype.getReadyProcess = function ( data ) {
                                return action.getFlags().indexOf( 'primary' ) > -1;
                        } );
                        if ( actions.length > 0 ) {
-                               actions[ 0 ].$button.focus();
+                               actions[ 0 ].focus();
                        }
                }, this );
 };
@@ -3410,3 +3424,5 @@ OO.ui.prompt = function ( text, options ) {
 };
 
 }( OO ) );
+
+//# sourceMappingURL=oojs-ui-windows.js.map
\ No newline at end of file