From 895078479739977847cc47aa209fce1f189728d5 Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Thu, 16 Oct 2014 11:08:16 -0700 Subject: [PATCH] Update OOjs UI to v0.1.0-pre (99ec31d9b9) New changes: 6298415 ButtonWidget: Fix titled button 918ebed MediaWiki theme: Fix styling of SearchWidget bd03644 Refine global event handling in non-isolated window managers 9a7633c WindowManager: Wait for window to open before trying to close it 5516490 Element: Correct method name reference in documentation 99ec31d Position popups and their anchors correctly in RTL Change-Id: I4266c58ec1a2e6cee54ffc55891a5c2097f0222f --- resources/lib/oojs-ui/oojs-ui-apex.css | 9 ++++++-- resources/lib/oojs-ui/oojs-ui-apex.js | 4 ++-- resources/lib/oojs-ui/oojs-ui-apex.svg.css | 9 ++++++-- resources/lib/oojs-ui/oojs-ui-mediawiki.css | 21 ++++++++++++++++-- resources/lib/oojs-ui/oojs-ui-mediawiki.js | 4 ++-- .../lib/oojs-ui/oojs-ui-mediawiki.svg.css | 21 ++++++++++++++++-- resources/lib/oojs-ui/oojs-ui-minerva.css | 8 +++++-- resources/lib/oojs-ui/oojs-ui-minerva.js | 4 ++-- resources/lib/oojs-ui/oojs-ui-minerva.svg.css | 8 +++++-- resources/lib/oojs-ui/oojs-ui.js | 22 +++++++++++-------- 10 files changed, 83 insertions(+), 27 deletions(-) diff --git a/resources/lib/oojs-ui/oojs-ui-apex.css b/resources/lib/oojs-ui/oojs-ui-apex.css index 08b1d0e65e..2e01aa03b5 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 (1829141230) + * OOjs UI v0.1.0-pre (99ec31d9b9) * 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-10-15T22:50:09Z + * Date: 2014-10-16T18:08:12Z */ /* @noflip */ .oo-ui-rtl { @@ -430,6 +430,7 @@ z-index: 4; } .oo-ui-popupTool .oo-ui-popupWidget { + /* @noflip */ margin-left: 1.25em; font-size: 0.8em; } @@ -1099,6 +1100,8 @@ } .oo-ui-popupWidget { position: absolute; + /* @noflip */ + left: 0; } .oo-ui-popupWidget-popup { position: relative; @@ -1113,6 +1116,8 @@ display: block; position: absolute; top: 0; + /* @noflip */ + left: 0; background-repeat: no-repeat; } .oo-ui-popupWidget-head { diff --git a/resources/lib/oojs-ui/oojs-ui-apex.js b/resources/lib/oojs-ui/oojs-ui-apex.js index 11b03f68a9..f080c41f00 100644 --- a/resources/lib/oojs-ui/oojs-ui-apex.js +++ b/resources/lib/oojs-ui/oojs-ui-apex.js @@ -1,12 +1,12 @@ /*! - * OOjs UI v0.1.0-pre (1829141230) + * OOjs UI v0.1.0-pre (99ec31d9b9) * 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-10-15T22:49:59Z + * Date: 2014-10-16T18:08:01Z */ /* Instantiation */ diff --git a/resources/lib/oojs-ui/oojs-ui-apex.svg.css b/resources/lib/oojs-ui/oojs-ui-apex.svg.css index 4805acab4c..12afea0d42 100644 --- a/resources/lib/oojs-ui/oojs-ui-apex.svg.css +++ b/resources/lib/oojs-ui/oojs-ui-apex.svg.css @@ -1,12 +1,12 @@ /*! - * OOjs UI v0.1.0-pre (1829141230) + * OOjs UI v0.1.0-pre (99ec31d9b9) * 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-10-15T22:50:09Z + * Date: 2014-10-16T18:08:12Z */ /* @noflip */ .oo-ui-rtl { @@ -430,6 +430,7 @@ z-index: 4; } .oo-ui-popupTool .oo-ui-popupWidget { + /* @noflip */ margin-left: 1.25em; font-size: 0.8em; } @@ -1099,6 +1100,8 @@ } .oo-ui-popupWidget { position: absolute; + /* @noflip */ + left: 0; } .oo-ui-popupWidget-popup { position: relative; @@ -1113,6 +1116,8 @@ display: block; position: absolute; top: 0; + /* @noflip */ + left: 0; background-repeat: no-repeat; } .oo-ui-popupWidget-head { diff --git a/resources/lib/oojs-ui/oojs-ui-mediawiki.css b/resources/lib/oojs-ui/oojs-ui-mediawiki.css index 27b49c087b..45d9e78216 100644 --- a/resources/lib/oojs-ui/oojs-ui-mediawiki.css +++ b/resources/lib/oojs-ui/oojs-ui-mediawiki.css @@ -1,12 +1,12 @@ /*! - * OOjs UI v0.1.0-pre (1829141230) + * OOjs UI v0.1.0-pre (99ec31d9b9) * 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-10-15T22:50:09Z + * Date: 2014-10-16T18:08:12Z */ /* @noflip */ .oo-ui-rtl { @@ -417,6 +417,7 @@ z-index: 4; } .oo-ui-popupTool .oo-ui-popupWidget { + /* @noflip */ margin-left: 1.25em; font-size: 0.8em; } @@ -986,6 +987,8 @@ } .oo-ui-popupWidget { position: absolute; + /* @noflip */ + left: 0; } .oo-ui-popupWidget-popup { position: relative; @@ -1000,6 +1003,8 @@ display: block; position: absolute; top: 0; + /* @noflip */ + left: 0; background-repeat: no-repeat; } .oo-ui-popupWidget-head { @@ -1391,6 +1396,18 @@ overflow-x: hidden; overflow-y: auto; } +.oo-ui-searchWidget-query { + height: 2.4em; + top: 1px; +} +.oo-ui-searchWidget-query .oo-ui-textInputWidget input { + border-width: 1px 0; +} +.oo-ui-searchWidget-results { + top: 2.2em; + bottom: 0.2em; + line-height: 0; +} .oo-ui-window { line-height: 1em; } diff --git a/resources/lib/oojs-ui/oojs-ui-mediawiki.js b/resources/lib/oojs-ui/oojs-ui-mediawiki.js index 2ca1b48bcb..16e7bbd3da 100644 --- a/resources/lib/oojs-ui/oojs-ui-mediawiki.js +++ b/resources/lib/oojs-ui/oojs-ui-mediawiki.js @@ -1,12 +1,12 @@ /*! - * OOjs UI v0.1.0-pre (1829141230) + * OOjs UI v0.1.0-pre (99ec31d9b9) * 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-10-15T22:49:59Z + * Date: 2014-10-16T18:08:01Z */ /** * @class diff --git a/resources/lib/oojs-ui/oojs-ui-mediawiki.svg.css b/resources/lib/oojs-ui/oojs-ui-mediawiki.svg.css index 6fc365b113..a59bfead76 100644 --- a/resources/lib/oojs-ui/oojs-ui-mediawiki.svg.css +++ b/resources/lib/oojs-ui/oojs-ui-mediawiki.svg.css @@ -1,12 +1,12 @@ /*! - * OOjs UI v0.1.0-pre (1829141230) + * OOjs UI v0.1.0-pre (99ec31d9b9) * 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-10-15T22:50:09Z + * Date: 2014-10-16T18:08:12Z */ /* @noflip */ .oo-ui-rtl { @@ -417,6 +417,7 @@ z-index: 4; } .oo-ui-popupTool .oo-ui-popupWidget { + /* @noflip */ margin-left: 1.25em; font-size: 0.8em; } @@ -986,6 +987,8 @@ } .oo-ui-popupWidget { position: absolute; + /* @noflip */ + left: 0; } .oo-ui-popupWidget-popup { position: relative; @@ -1000,6 +1003,8 @@ display: block; position: absolute; top: 0; + /* @noflip */ + left: 0; background-repeat: no-repeat; } .oo-ui-popupWidget-head { @@ -1391,6 +1396,18 @@ overflow-x: hidden; overflow-y: auto; } +.oo-ui-searchWidget-query { + height: 2.4em; + top: 1px; +} +.oo-ui-searchWidget-query .oo-ui-textInputWidget input { + border-width: 1px 0; +} +.oo-ui-searchWidget-results { + top: 2.2em; + bottom: 0.2em; + line-height: 0; +} .oo-ui-window { line-height: 1em; } diff --git a/resources/lib/oojs-ui/oojs-ui-minerva.css b/resources/lib/oojs-ui/oojs-ui-minerva.css index 80bfe8da0c..3c525d8529 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 (1829141230) + * OOjs UI v0.1.0-pre (99ec31d9b9) * 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-10-15T22:50:09Z + * Date: 2014-10-16T18:08:12Z */ /* @noflip */ .oo-ui-rtl { @@ -696,6 +696,8 @@ } .oo-ui-popupWidget { position: absolute; + /* @noflip */ + left: 0; } .oo-ui-popupWidget-popup { position: relative; @@ -710,6 +712,8 @@ display: block; position: absolute; top: 0; + /* @noflip */ + left: 0; background-repeat: no-repeat; } .oo-ui-popupWidget-head { diff --git a/resources/lib/oojs-ui/oojs-ui-minerva.js b/resources/lib/oojs-ui/oojs-ui-minerva.js index 11b03f68a9..f080c41f00 100644 --- a/resources/lib/oojs-ui/oojs-ui-minerva.js +++ b/resources/lib/oojs-ui/oojs-ui-minerva.js @@ -1,12 +1,12 @@ /*! - * OOjs UI v0.1.0-pre (1829141230) + * OOjs UI v0.1.0-pre (99ec31d9b9) * 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-10-15T22:49:59Z + * Date: 2014-10-16T18:08:01Z */ /* Instantiation */ diff --git a/resources/lib/oojs-ui/oojs-ui-minerva.svg.css b/resources/lib/oojs-ui/oojs-ui-minerva.svg.css index bb793c8cf6..c3289876b8 100644 --- a/resources/lib/oojs-ui/oojs-ui-minerva.svg.css +++ b/resources/lib/oojs-ui/oojs-ui-minerva.svg.css @@ -1,12 +1,12 @@ /*! - * OOjs UI v0.1.0-pre (1829141230) + * OOjs UI v0.1.0-pre (99ec31d9b9) * 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-10-15T22:50:09Z + * Date: 2014-10-16T18:08:12Z */ /* @noflip */ .oo-ui-rtl { @@ -696,6 +696,8 @@ } .oo-ui-popupWidget { position: absolute; + /* @noflip */ + left: 0; } .oo-ui-popupWidget-popup { position: relative; @@ -710,6 +712,8 @@ display: block; position: absolute; top: 0; + /* @noflip */ + left: 0; background-repeat: no-repeat; } .oo-ui-popupWidget-head { diff --git a/resources/lib/oojs-ui/oojs-ui.js b/resources/lib/oojs-ui/oojs-ui.js index 94ae50e0cd..3e2d096ffe 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 (1829141230) + * OOjs UI v0.1.0-pre (99ec31d9b9) * 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-10-15T22:49:59Z + * Date: 2014-10-16T18:08:01Z */ ( function ( OO ) { @@ -727,7 +727,7 @@ OO.initClass( OO.ui.Element ); /** * HTML tag name. * - * This may be ignored if getTagName is overridden. + * This may be ignored if #getTagName is overridden. * * @static * @inheritable @@ -2604,8 +2604,10 @@ OO.ui.WindowManager.prototype.afterWindowResize = function () { * * @param {jQuery.Event} e Mouse wheel event */ -OO.ui.WindowManager.prototype.onWindowMouseWheel = function () { - return false; +OO.ui.WindowManager.prototype.onWindowMouseWheel = function ( e ) { + // Kill all events in the parent window if the child window is isolated, + // or if the event didn't come from the child window + return !( this.shouldIsolate() || !$.contains( this.getCurrentWindow().$frame[0], e.target ) ); }; /** @@ -2623,8 +2625,9 @@ OO.ui.WindowManager.prototype.onDocumentKeyDown = function ( e ) { case OO.ui.Keys.UP: case OO.ui.Keys.RIGHT: case OO.ui.Keys.DOWN: - // Prevent any key events that might cause scrolling - return false; + // Kill all events in the parent window if the child window is isolated, + // or if the event didn't come from the child window + return !( this.shouldIsolate() || !$.contains( this.getCurrentWindow().$frame[0], e.target ) ); } }; @@ -2866,7 +2869,7 @@ OO.ui.WindowManager.prototype.closeWindow = function ( win, data ) { var manager = this, preparing = [], closing = $.Deferred(), - opened = this.opened; + opened; // Argument handling if ( typeof win === 'string' ) { @@ -2903,6 +2906,7 @@ OO.ui.WindowManager.prototype.closeWindow = function ( win, data ) { manager.closing = closing; manager.preparingToClose = null; manager.emit( 'closing', win, closing, data ); + opened = manager.opened; manager.opened = null; opened.resolve( closing.promise(), data ); setTimeout( function () { @@ -8174,7 +8178,7 @@ OO.ui.ButtonWidget = function OoUiButtonWidget( config ) { OO.ui.IconElement.call( this, config ); OO.ui.IndicatorElement.call( this, config ); OO.ui.LabelElement.call( this, config ); - OO.ui.TitledElement.call( this, config, $.extend( {}, config, { $titled: this.$button } ) ); + OO.ui.TitledElement.call( this, $.extend( {}, config, { $titled: this.$button } ) ); OO.ui.FlaggedElement.call( this, config ); // Properties -- 2.20.1