diff options
author | Volker E <volker.e@wikimedia.org> | 2017-04-25 18:28:38 -0700 |
---|---|---|
committer | Volker E <volker.e@wikimedia.org> | 2017-04-25 18:28:38 -0700 |
commit | 580d8de9b1542f88f104707cb179de96ba0c261e (patch) | |
tree | b0851b6045ee97643255c76a46abbc0d6d508b7c /resources/lib/oojs-ui/oojs-ui-windows.js | |
parent | 762d73a3c67908d4155d7f0ef844c8693304d498 (diff) | |
download | mediawikicore-580d8de9b1542f88f104707cb179de96ba0c261e.tar.gz mediawikicore-580d8de9b1542f88f104707cb179de96ba0c261e.zip |
Update OOjs UI to v0.21.2
Release notes:
https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.21.2
Change-Id: Id7cae80a4f3d84ea5d50003f2409537b307c0c58
Diffstat (limited to 'resources/lib/oojs-ui/oojs-ui-windows.js')
-rw-r--r-- | resources/lib/oojs-ui/oojs-ui-windows.js | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/resources/lib/oojs-ui/oojs-ui-windows.js b/resources/lib/oojs-ui/oojs-ui-windows.js index c955919d9171..5a06841e1b0b 100644 --- a/resources/lib/oojs-ui/oojs-ui-windows.js +++ b/resources/lib/oojs-ui/oojs-ui-windows.js @@ -1,12 +1,12 @@ /*! - * OOjs UI v0.21.1 + * OOjs UI v0.21.2 * 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-18T23:32:49Z + * Date: 2017-04-26T01:05:10Z */ ( 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 ); }; |