Update OOjs UI to v0.1.0-pre (99ec31d9b9)
authorJames D. Forrester <jforrester@wikimedia.org>
Thu, 16 Oct 2014 18:08:16 +0000 (11:08 -0700)
committerJames D. Forrester <jforrester@wikimedia.org>
Thu, 16 Oct 2014 18:08:22 +0000 (11:08 -0700)
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
resources/lib/oojs-ui/oojs-ui-apex.js
resources/lib/oojs-ui/oojs-ui-apex.svg.css
resources/lib/oojs-ui/oojs-ui-mediawiki.css
resources/lib/oojs-ui/oojs-ui-mediawiki.js
resources/lib/oojs-ui/oojs-ui-mediawiki.svg.css
resources/lib/oojs-ui/oojs-ui-minerva.css
resources/lib/oojs-ui/oojs-ui-minerva.js
resources/lib/oojs-ui/oojs-ui-minerva.svg.css
resources/lib/oojs-ui/oojs-ui.js

index 08b1d0e..2e01aa0 100644 (file)
@@ -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 {
        z-index: 4;
 }
 .oo-ui-popupTool .oo-ui-popupWidget {
+       /* @noflip */
        margin-left: 1.25em;
        font-size: 0.8em;
 }
 }
 .oo-ui-popupWidget {
        position: absolute;
+       /* @noflip */
+       left: 0;
 }
 .oo-ui-popupWidget-popup {
        position: relative;
        display: block;
        position: absolute;
        top: 0;
+       /* @noflip */
+       left: 0;
        background-repeat: no-repeat;
 }
 .oo-ui-popupWidget-head {
index 11b03f6..f080c41 100644 (file)
@@ -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 */
 
index 4805aca..12afea0 100644 (file)
@@ -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 {
        z-index: 4;
 }
 .oo-ui-popupTool .oo-ui-popupWidget {
+       /* @noflip */
        margin-left: 1.25em;
        font-size: 0.8em;
 }
 }
 .oo-ui-popupWidget {
        position: absolute;
+       /* @noflip */
+       left: 0;
 }
 .oo-ui-popupWidget-popup {
        position: relative;
        display: block;
        position: absolute;
        top: 0;
+       /* @noflip */
+       left: 0;
        background-repeat: no-repeat;
 }
 .oo-ui-popupWidget-head {
index 27b49c0..45d9e78 100644 (file)
@@ -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 {
        z-index: 4;
 }
 .oo-ui-popupTool .oo-ui-popupWidget {
+       /* @noflip */
        margin-left: 1.25em;
        font-size: 0.8em;
 }
 }
 .oo-ui-popupWidget {
        position: absolute;
+       /* @noflip */
+       left: 0;
 }
 .oo-ui-popupWidget-popup {
        position: relative;
        display: block;
        position: absolute;
        top: 0;
+       /* @noflip */
+       left: 0;
        background-repeat: no-repeat;
 }
 .oo-ui-popupWidget-head {
        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;
 }
index 2ca1b48..16e7bbd 100644 (file)
@@ -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
index 6fc365b..a59bfea 100644 (file)
@@ -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 {
        z-index: 4;
 }
 .oo-ui-popupTool .oo-ui-popupWidget {
+       /* @noflip */
        margin-left: 1.25em;
        font-size: 0.8em;
 }
 }
 .oo-ui-popupWidget {
        position: absolute;
+       /* @noflip */
+       left: 0;
 }
 .oo-ui-popupWidget-popup {
        position: relative;
        display: block;
        position: absolute;
        top: 0;
+       /* @noflip */
+       left: 0;
        background-repeat: no-repeat;
 }
 .oo-ui-popupWidget-head {
        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;
 }
index 80bfe8d..3c525d8 100644 (file)
@@ -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 {
 }
 .oo-ui-popupWidget {
        position: absolute;
+       /* @noflip */
+       left: 0;
 }
 .oo-ui-popupWidget-popup {
        position: relative;
        display: block;
        position: absolute;
        top: 0;
+       /* @noflip */
+       left: 0;
        background-repeat: no-repeat;
 }
 .oo-ui-popupWidget-head {
index 11b03f6..f080c41 100644 (file)
@@ -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 */
 
index bb793c8..c328987 100644 (file)
@@ -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 {
 }
 .oo-ui-popupWidget {
        position: absolute;
+       /* @noflip */
+       left: 0;
 }
 .oo-ui-popupWidget-popup {
        position: relative;
        display: block;
        position: absolute;
        top: 0;
+       /* @noflip */
+       left: 0;
        background-repeat: no-repeat;
 }
 .oo-ui-popupWidget-head {
index 94ae50e..3e2d096 100644 (file)
@@ -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