From e58e025d4e0abd4a743925d81e034b41c10f4cb6 Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Wed, 17 Sep 2014 18:30:19 -0700 Subject: [PATCH] Update OOjs UI to v0.1.0-pre (ec785c2c64) New changes: 09e9d2c Fix documentation lies about dialog labels ec785c2 Followup 6c862e8: position before AND after showing in TextInputMenuWidget Change-Id: Ia1c9aa039503f0f18ac1da7748e7f87bfcdf7092 --- resources/lib/oojs-ui/oojs-ui-apex.css | 4 ++-- resources/lib/oojs-ui/oojs-ui-minerva.css | 4 ++-- resources/lib/oojs-ui/oojs-ui.js | 21 +++++++++++++++------ resources/lib/oojs-ui/oojs-ui.svg.css | 4 ++-- 4 files changed, 21 insertions(+), 12 deletions(-) diff --git a/resources/lib/oojs-ui/oojs-ui-apex.css b/resources/lib/oojs-ui/oojs-ui-apex.css index efda815cfa..b10bb25621 100644 --- a/resources/lib/oojs-ui/oojs-ui-apex.css +++ b/resources/lib/oojs-ui/oojs-ui-apex.css @@ -1,12 +1,12 @@ /*! - * OOjs UI v0.1.0-pre (24ac83a472) + * OOjs UI v0.1.0-pre (ec785c2c64) * https://www.mediawiki.org/wiki/OOjs_UI * * Copyright 2011–2014 OOjs Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * - * Date: 2014-09-17T18:23:50Z + * Date: 2014-09-18T01:30:17Z */ /* * Blank theme mixins. diff --git a/resources/lib/oojs-ui/oojs-ui-minerva.css b/resources/lib/oojs-ui/oojs-ui-minerva.css index 906df74d07..bad16ec279 100644 --- a/resources/lib/oojs-ui/oojs-ui-minerva.css +++ b/resources/lib/oojs-ui/oojs-ui-minerva.css @@ -1,12 +1,12 @@ /*! - * OOjs UI v0.1.0-pre (24ac83a472) + * OOjs UI v0.1.0-pre (ec785c2c64) * https://www.mediawiki.org/wiki/OOjs_UI * * Copyright 2011–2014 OOjs Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * - * Date: 2014-09-17T18:23:50Z + * Date: 2014-09-18T01:30:17Z */ /* * Blank theme mixins. diff --git a/resources/lib/oojs-ui/oojs-ui.js b/resources/lib/oojs-ui/oojs-ui.js index 0921aa963d..525e5a1fd9 100644 --- a/resources/lib/oojs-ui/oojs-ui.js +++ b/resources/lib/oojs-ui/oojs-ui.js @@ -1,12 +1,12 @@ /*! - * OOjs UI v0.1.0-pre (24ac83a472) + * OOjs UI v0.1.0-pre (ec785c2c64) * https://www.mediawiki.org/wiki/OOjs_UI * * Copyright 2011–2014 OOjs Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * - * Date: 2014-09-17T18:23:50Z + * Date: 2014-09-18T01:30:17Z */ ( function ( OO ) { @@ -2293,7 +2293,7 @@ OO.ui.Dialog.prototype.getActionProcess = function ( action ) { * @inheritdoc * * @param {Object} [data] Dialog opening data - * @param {jQuery|string|Function|null} [data.label] Dialog label, omit to use #static-label + * @param {jQuery|string|Function|null} [data.title] Dialog title, omit to use #static-title * @param {Object[]} [data.actions] List of OO.ui.ActionWidget configuration options for each * action item, omit to use #static-actions */ @@ -11097,8 +11097,18 @@ OO.ui.TextInputMenuWidget.prototype.toggle = function ( visible ) { var change = visible !== this.isVisible(); + if ( change && visible ) { + // Make sure the width is set before the parent method runs. + // After this we have to call this.position(); again to actually + // position ourselves correctly. + this.position(); + } + + // Parent method + OO.ui.TextInputMenuWidget.super.prototype.toggle.call( this, visible ); + if ( change ) { - if ( visible ) { + if ( this.isVisible() ) { this.position(); this.$( this.getElementWindow() ).on( 'resize', this.onWindowResizeHandler ); } else { @@ -11106,8 +11116,7 @@ OO.ui.TextInputMenuWidget.prototype.toggle = function ( visible ) { } } - // Parent method - return OO.ui.TextInputMenuWidget.super.prototype.toggle.call( this, visible ); + return this; }; /** diff --git a/resources/lib/oojs-ui/oojs-ui.svg.css b/resources/lib/oojs-ui/oojs-ui.svg.css index 65414271ba..6c55898715 100644 --- a/resources/lib/oojs-ui/oojs-ui.svg.css +++ b/resources/lib/oojs-ui/oojs-ui.svg.css @@ -1,12 +1,12 @@ /*! - * OOjs UI v0.1.0-pre (24ac83a472) + * OOjs UI v0.1.0-pre (ec785c2c64) * https://www.mediawiki.org/wiki/OOjs_UI * * Copyright 2011–2014 OOjs Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * - * Date: 2014-09-17T18:23:50Z + * Date: 2014-09-18T01:30:17Z */ /* * Blank theme mixins. -- 2.20.1