RevisionStoreDbTestBase, remove redundant needsDB override
[lhc/web/wiklou.git] / resources / lib / oojs-ui / oojs-ui-core.js
index 45dd832..6f22972 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOUI v0.27.4
+ * OOUI v0.28.0
  * https://www.mediawiki.org/wiki/OOUI
  *
  * Copyright 2011–2018 OOUI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2018-06-27T17:25:08Z
+ * Date: 2018-08-14T23:16:18Z
  */
 ( function ( OO ) {
 
@@ -5056,7 +5056,7 @@ OO.ui.mixin.ClippableElement.prototype.clip = function () {
 /**
  * PopupWidget is a container for content. The popup is overlaid and positioned absolutely.
  * By default, each popup has an anchor that points toward its origin.
- * Please see the [OOUI documentation on Mediawiki] [1] for more information and examples.
+ * Please see the [OOUI documentation on MediaWiki.org] [1] for more information and examples.
  *
  * Unlike most widgets, PopupWidget is initially hidden and must be shown by calling #toggle.
  *
@@ -7325,7 +7325,6 @@ OO.ui.MenuSelectWidget = function OoUiMenuSelectWidget( config ) {
        this.onInputEditHandler = OO.ui.debounce( this.updateItemVisibility.bind( this ), 100 );
        this.highlightOnFilter = !!config.highlightOnFilter;
        this.width = config.width;
-       this.filterQuery = '';
 
        // Initialization
        this.$element.addClass( 'oo-ui-menuSelectWidget' );
@@ -7437,10 +7436,9 @@ OO.ui.MenuSelectWidget.prototype.updateItemVisibility = function () {
                showAll = !this.isVisible(),
                exactMatch = false;
 
-       if ( this.$input && this.filterFromInput && this.filterQuery !== this.$input.val() ) {
+       if ( this.$input && this.filterFromInput ) {
                filter = showAll ? null : this.getItemMatcher( this.$input.val() );
                exactFilter = this.getItemMatcher( this.$input.val(), true );
-               this.filterQuery = this.$input.val();
                // Hide non-matching options, and also hide section headers if all options
                // in their section are hidden.
                for ( i = 0; i < len; i++ ) {
@@ -9253,13 +9251,22 @@ OO.ui.CheckboxInputWidget.prototype.restorePreInfuseState = function ( state ) {
  * @param {Object} [config] Configuration options
  * @cfg {Object[]} [options=[]] Array of menu options in the format `{ data: …, label: … }`
  * @cfg {Object} [dropdown] Configuration options for {@link OO.ui.DropdownWidget DropdownWidget}
+ * @cfg {jQuery} [$overlay] Render the menu into a separate layer. This configuration is useful in cases where
+ *  the expanded menu is larger than its containing `<div>`. The specified overlay layer is usually on top of the
+ *  containing `<div>` and has a larger area. By default, the menu uses relative positioning.
+ *  See <https://www.mediawiki.org/wiki/OOUI/Concepts#Overlays>.
  */
 OO.ui.DropdownInputWidget = function OoUiDropdownInputWidget( config ) {
        // Configuration initialization
        config = config || {};
 
        // Properties (must be done before parent constructor which calls #setDisabled)
-       this.dropdownWidget = new OO.ui.DropdownWidget( config.dropdown );
+       this.dropdownWidget = new OO.ui.DropdownWidget( $.extend(
+               {
+                       $overlay: config.$overlay
+               },
+               config.dropdown
+       ) );
        // Set up the options before parent constructor, which uses them to validate config.value.
        // Use this instead of setOptions() because this.$input is not set up yet.
        this.setOptionsData( config.options || [] );
@@ -10848,6 +10855,8 @@ OO.ui.MultilineTextInputWidget = function OoUiMultilineTextInputWidget( config )
        if ( this.autosize ) {
                this.$clone = this.$input
                        .clone()
+                       .removeAttr( 'id' )
+                       .removeAttr( 'name' )
                        .insertAfter( this.$input )
                        .attr( 'aria-hidden', 'true' )
                        .addClass( 'oo-ui-element-hidden' );
@@ -11521,7 +11530,10 @@ OO.ui.FieldLayout.prototype.setAlignment = function ( value ) {
                // Reorder elements
 
                if ( this.helpInline ) {
-                       if ( value === 'inline' ) {
+                       if ( value === 'top' ) {
+                               this.$header.append( this.$label );
+                               this.$body.append( this.$header, this.$field, this.$help );
+                       } else if ( value === 'inline' ) {
                                this.$header.append( this.$label, this.$help );
                                this.$body.append( this.$field, this.$header );
                        } else {