From 21396744b457039d0ff429e34ccff1b94b97c628 Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Tue, 19 Apr 2016 15:00:12 -0700 Subject: [PATCH] Update OOjs UI to v0.16.6 Release notes: https://git.wikimedia.org/blob/oojs%2Fui.git/v0.16.6/History.md Change-Id: Ib9bb35d87633d06211dd75e237d7b105947f8df1 --- composer.json | 2 +- resources/lib/oojs-ui/i18n/krc.json | 3 +- resources/lib/oojs-ui/oojs-ui-apex.js | 4 +- resources/lib/oojs-ui/oojs-ui-core-apex.css | 48 ++++-------- .../lib/oojs-ui/oojs-ui-core-mediawiki.css | 59 +++++--------- resources/lib/oojs-ui/oojs-ui-core.js | 65 ++++++++++++---- resources/lib/oojs-ui/oojs-ui-mediawiki.js | 4 +- .../lib/oojs-ui/oojs-ui-toolbars-apex.css | 7 +- .../oojs-ui/oojs-ui-toolbars-mediawiki.css | 7 +- resources/lib/oojs-ui/oojs-ui-toolbars.js | 4 +- .../lib/oojs-ui/oojs-ui-widgets-apex.css | 31 +++----- .../lib/oojs-ui/oojs-ui-widgets-mediawiki.css | 53 +++++-------- resources/lib/oojs-ui/oojs-ui-widgets.js | 73 ++++++++++-------- .../lib/oojs-ui/oojs-ui-windows-apex.css | 4 +- .../lib/oojs-ui/oojs-ui-windows-mediawiki.css | 4 +- resources/lib/oojs-ui/oojs-ui-windows.js | 4 +- .../themes/apex/images/icons/flagUndo-ltr.png | Bin 279 -> 229 bytes .../themes/apex/images/icons/flagUndo-ltr.svg | 4 +- .../themes/apex/images/icons/flagUndo-rtl.png | Bin 283 -> 272 bytes .../themes/apex/images/icons/flagUndo-rtl.svg | 4 +- .../images/icons/flagUndo-ltr-invert.png | Bin 269 -> 232 bytes .../images/icons/flagUndo-ltr-invert.svg | 4 +- .../mediawiki/images/icons/flagUndo-ltr.png | Bin 279 -> 229 bytes .../mediawiki/images/icons/flagUndo-ltr.svg | 4 +- .../images/icons/flagUndo-rtl-invert.png | Bin 282 -> 257 bytes .../images/icons/flagUndo-rtl-invert.svg | 4 +- .../mediawiki/images/icons/flagUndo-rtl.png | Bin 283 -> 272 bytes .../mediawiki/images/icons/flagUndo-rtl.svg | 4 +- .../icons/speechBubbleAdd-ltr-invert.png | Bin 152 -> 183 bytes .../icons/speechBubbleAdd-ltr-invert.svg | 3 +- .../images/icons/speechBubbleAdd-ltr.png | Bin 173 -> 177 bytes .../images/icons/speechBubbleAdd-ltr.svg | 3 +- .../icons/speechBubbleAdd-rtl-invert.png | Bin 153 -> 188 bytes .../icons/speechBubbleAdd-rtl-invert.svg | 3 +- .../images/icons/speechBubbleAdd-rtl.png | Bin 196 -> 191 bytes .../images/icons/speechBubbleAdd-rtl.svg | 3 +- 36 files changed, 185 insertions(+), 223 deletions(-) diff --git a/composer.json b/composer.json index 6b7898ddd1..3bea9ea6ca 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "ext-xml": "*", "liuggio/statsd-php-client": "1.0.18", "mediawiki/at-ease": "1.1.0", - "oojs/oojs-ui": "0.16.5", + "oojs/oojs-ui": "0.16.6", "oyejorge/less.php": "1.7.0.10", "php": ">=5.5.9", "psr/log": "1.0.0", diff --git a/resources/lib/oojs-ui/i18n/krc.json b/resources/lib/oojs-ui/i18n/krc.json index d4068c87c9..6f17b34637 100644 --- a/resources/lib/oojs-ui/i18n/krc.json +++ b/resources/lib/oojs-ui/i18n/krc.json @@ -1,7 +1,8 @@ { "@metadata": { "authors": [ - "Iltever" + "Iltever", + "Ernác" ] }, "ooui-outline-control-move-down": "Элементни тюбюне кёчюр", diff --git a/resources/lib/oojs-ui/oojs-ui-apex.js b/resources/lib/oojs-ui/oojs-ui-apex.js index 4bd04297da..14508b6b93 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.16.5 + * OOjs UI v0.16.6 * https://www.mediawiki.org/wiki/OOjs_UI * * Copyright 2011–2016 OOjs UI Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * - * Date: 2016-04-07T15:12:41Z + * Date: 2016-04-19T21:57:49Z */ ( function ( OO ) { diff --git a/resources/lib/oojs-ui/oojs-ui-core-apex.css b/resources/lib/oojs-ui/oojs-ui-core-apex.css index 1accc2a5f4..1a241cb461 100644 --- a/resources/lib/oojs-ui/oojs-ui-core-apex.css +++ b/resources/lib/oojs-ui/oojs-ui-core-apex.css @@ -1,12 +1,12 @@ /*! - * OOjs UI v0.16.5 + * OOjs UI v0.16.6 * https://www.mediawiki.org/wiki/OOjs_UI * * Copyright 2011–2016 OOjs UI Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * - * Date: 2016-04-07T15:12:44Z + * Date: 2016-04-19T21:57:53Z */ .oo-ui-element-hidden { display: none !important; @@ -56,17 +56,11 @@ margin-left: 0; } .oo-ui-buttonElement.oo-ui-indicatorElement > .oo-ui-buttonElement-button > .oo-ui-indicatorElement-indicator { - width: 0.9375em; - height: 0.9375em; margin: 0.46875em; } .oo-ui-buttonElement.oo-ui-iconElement > .oo-ui-buttonElement-button > .oo-ui-indicatorElement-indicator { margin-left: 0.46875em; } -.oo-ui-buttonElement.oo-ui-iconElement > .oo-ui-buttonElement-button > .oo-ui-iconElement-icon { - width: 1.875em; - height: 1.875em; -} .oo-ui-buttonElement-frameless > .oo-ui-buttonElement-button:hover, .oo-ui-buttonElement-frameless > .oo-ui-buttonElement-button:focus { outline: none; @@ -244,6 +238,10 @@ background-size: contain; background-position: center center; background-repeat: no-repeat; + min-width: 24px; + width: 1.875em; + min-height: 24px; + height: 1.875em; } .oo-ui-iconElement .oo-ui-iconElement-icon, .oo-ui-iconElement.oo-ui-iconElement-icon { @@ -254,6 +252,10 @@ background-size: contain; background-position: center center; background-repeat: no-repeat; + min-width: 12px; + width: 0.9375em; + min-height: 12px; + height: 0.9375em; } .oo-ui-indicatorElement .oo-ui-indicatorElement-indicator, .oo-ui-indicatorElement.oo-ui-indicatorElement-indicator { @@ -417,8 +419,6 @@ .oo-ui-fieldsetLayout.oo-ui-iconElement > .oo-ui-iconElement-icon { left: 0; top: 0.25em; - width: 1.875em; - height: 1.875em; } .oo-ui-fieldsetLayout > .oo-ui-popupButtonWidget { margin-right: 0; @@ -516,11 +516,9 @@ height: 100%; } .oo-ui-decoratedOptionWidget.oo-ui-iconElement .oo-ui-iconElement-icon { - width: 1.875em; left: 0.5em; } .oo-ui-decoratedOptionWidget.oo-ui-indicatorElement .oo-ui-indicatorElement-indicator { - width: 0.9375em; right: 0.5em; } .oo-ui-decoratedOptionWidget.oo-ui-widget-disabled .oo-ui-iconElement-icon, @@ -556,8 +554,6 @@ display: inline-block; vertical-align: middle; line-height: 2.5em; - height: 1.875em; - width: 1.875em; } .oo-ui-iconWidget.oo-ui-widget-disabled { opacity: 0.2; @@ -566,8 +562,6 @@ display: inline-block; vertical-align: middle; line-height: 2.5em; - height: 0.9375em; - width: 0.9375em; margin: 0.46875em; } .oo-ui-indicatorWidget.oo-ui-widget-disabled { @@ -706,11 +700,11 @@ } .oo-ui-popupButtonWidget.oo-ui-buttonElement-frameless > .oo-ui-popupWidget { /* @noflip */ - left: 1em; + left: 0.9375em; } .oo-ui-popupButtonWidget.oo-ui-buttonElement-framed > .oo-ui-popupWidget { /* @noflip */ - left: 1.25em; + left: 1.2375em; } .oo-ui-inputWidget { margin-right: 0.5em; @@ -836,22 +830,18 @@ .oo-ui-textInputWidget.oo-ui-labelElement > .oo-ui-labelElement-label { display: block; } -.oo-ui-textInputWidget > .oo-ui-iconElement-icon { +.oo-ui-textInputWidget > .oo-ui-iconElement-icon, +.oo-ui-textInputWidget-labelPosition-before > .oo-ui-labelElement-label { left: 0; } -.oo-ui-textInputWidget > .oo-ui-indicatorElement-indicator { +.oo-ui-textInputWidget > .oo-ui-indicatorElement-indicator, +.oo-ui-textInputWidget-labelPosition-after > .oo-ui-labelElement-label { right: 0; } .oo-ui-textInputWidget > .oo-ui-labelElement-label { position: absolute; top: 0; } -.oo-ui-textInputWidget-labelPosition-after > .oo-ui-labelElement-label { - right: 0; -} -.oo-ui-textInputWidget-labelPosition-before > .oo-ui-labelElement-label { - left: 0; -} .oo-ui-textInputWidget input, .oo-ui-textInputWidget textarea { padding: 0.5em; @@ -905,7 +895,6 @@ padding-left: 2.475em; } .oo-ui-textInputWidget.oo-ui-iconElement .oo-ui-iconElement-icon { - width: 1.875em; max-height: 2.375em; margin-left: 0.3em; } @@ -914,7 +903,6 @@ padding-right: 2.4875em; } .oo-ui-textInputWidget.oo-ui-indicatorElement .oo-ui-indicatorElement-indicator { - width: 0.9375em; max-height: 2.375em; margin-right: 0.775em; } @@ -1025,14 +1013,10 @@ } .oo-ui-dropdownWidget-handle .oo-ui-indicatorElement-indicator { top: 0; - width: 0.9375em; - height: 0.9375em; margin: 0.775em; } .oo-ui-dropdownWidget-handle .oo-ui-iconElement-icon { top: 0; - width: 1.875em; - height: 1.875em; margin: 0.3em; } .oo-ui-dropdownWidget.oo-ui-widget-disabled .oo-ui-dropdownWidget-handle { diff --git a/resources/lib/oojs-ui/oojs-ui-core-mediawiki.css b/resources/lib/oojs-ui/oojs-ui-core-mediawiki.css index 431a9e4074..c47ce7f61f 100644 --- a/resources/lib/oojs-ui/oojs-ui-core-mediawiki.css +++ b/resources/lib/oojs-ui/oojs-ui-core-mediawiki.css @@ -1,12 +1,12 @@ /*! - * OOjs UI v0.16.5 + * OOjs UI v0.16.6 * https://www.mediawiki.org/wiki/OOjs_UI * * Copyright 2011–2016 OOjs UI Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * - * Date: 2016-04-07T15:12:44Z + * Date: 2016-04-19T21:57:53Z */ .oo-ui-element-hidden { display: none !important; @@ -56,17 +56,9 @@ .oo-ui-buttonElement.oo-ui-iconElement > .oo-ui-buttonElement-button > .oo-ui-iconElement-icon { margin-left: 0; } -.oo-ui-buttonElement.oo-ui-indicatorElement > .oo-ui-buttonElement-button > .oo-ui-indicatorElement-indicator { - width: 0.9375em; - height: 0.9375em; -} .oo-ui-buttonElement.oo-ui-iconElement > .oo-ui-buttonElement-button > .oo-ui-indicatorElement-indicator { margin-left: 0.46875em; } -.oo-ui-buttonElement.oo-ui-iconElement > .oo-ui-buttonElement-button > .oo-ui-iconElement-icon { - width: 1.875em; - height: 1.875em; -} .oo-ui-buttonElement-frameless > .oo-ui-buttonElement-button:focus { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.2); outline: 0; @@ -350,12 +342,20 @@ background-size: contain; background-position: center center; background-repeat: no-repeat; + min-width: 24px; + width: 1.875em; + min-height: 24px; + height: 1.875em; } .oo-ui-indicatorElement .oo-ui-indicatorElement-indicator, .oo-ui-indicatorElement.oo-ui-indicatorElement-indicator { background-size: contain; background-position: center center; background-repeat: no-repeat; + min-width: 12px; + width: 0.9375em; + min-height: 12px; + height: 0.9375em; } .oo-ui-labelElement .oo-ui-labelElement-label-highlight { font-weight: bold; @@ -513,8 +513,6 @@ .oo-ui-fieldsetLayout.oo-ui-iconElement > .oo-ui-iconElement-icon { left: 0; top: 0.25em; - width: 1.875em; - height: 1.875em; } .oo-ui-fieldsetLayout > .oo-ui-popupButtonWidget { margin-right: 0; @@ -611,11 +609,9 @@ height: 100%; } .oo-ui-decoratedOptionWidget.oo-ui-iconElement .oo-ui-iconElement-icon { - width: 1.875em; left: 0.5em; } .oo-ui-decoratedOptionWidget.oo-ui-indicatorElement .oo-ui-indicatorElement-indicator { - width: 0.9375em; right: 0.5em; } .oo-ui-decoratedOptionWidget.oo-ui-widget-disabled .oo-ui-iconElement-icon, @@ -650,8 +646,6 @@ display: inline-block; vertical-align: middle; line-height: 2.5em; - width: 1.875em; - height: 1.875em; } .oo-ui-iconWidget.oo-ui-widget-disabled { opacity: 0.2; @@ -660,8 +654,6 @@ display: inline-block; vertical-align: middle; line-height: 2.5em; - width: 0.9375em; - height: 0.9375em; margin: 0.46875em; } .oo-ui-indicatorWidget.oo-ui-widget-disabled { @@ -800,11 +792,11 @@ } .oo-ui-popupButtonWidget.oo-ui-buttonElement-frameless > .oo-ui-popupWidget { /* @noflip */ - left: 1em; + left: 0.9375em; } .oo-ui-popupButtonWidget.oo-ui-buttonElement-framed > .oo-ui-popupWidget { /* @noflip */ - left: 1.75em; + left: 1.5em; } .oo-ui-inputWidget { margin-right: 0.5em; @@ -1078,22 +1070,18 @@ .oo-ui-textInputWidget.oo-ui-labelElement > .oo-ui-labelElement-label { display: block; } -.oo-ui-textInputWidget > .oo-ui-iconElement-icon { +.oo-ui-textInputWidget > .oo-ui-iconElement-icon, +.oo-ui-textInputWidget-labelPosition-before > .oo-ui-labelElement-label { left: 0; } -.oo-ui-textInputWidget > .oo-ui-indicatorElement-indicator { +.oo-ui-textInputWidget > .oo-ui-indicatorElement-indicator, +.oo-ui-textInputWidget-labelPosition-after > .oo-ui-labelElement-label { right: 0; } .oo-ui-textInputWidget > .oo-ui-labelElement-label { position: absolute; top: 0; } -.oo-ui-textInputWidget-labelPosition-after > .oo-ui-labelElement-label { - right: 0; -} -.oo-ui-textInputWidget-labelPosition-before > .oo-ui-labelElement-label { - left: 0; -} .oo-ui-textInputWidget input, .oo-ui-textInputWidget textarea { padding: 0.5em; @@ -1109,8 +1097,7 @@ -moz-box-sizing: border-box; box-sizing: border-box; } -.oo-ui-textInputWidget input.oo-ui-pendingElement-pending, -.oo-ui-textInputWidget textarea.oo-ui-pendingElement-pending { +.oo-ui-textInputWidget .oo-ui-pendingElement-pending { background-color: transparent; } .oo-ui-textInputWidget.oo-ui-widget-enabled input, @@ -1157,7 +1144,7 @@ opacity: 0.2; } .oo-ui-textInputWidget.oo-ui-widget-disabled .oo-ui-labelElement-label { - color: #dddddd; + color: #cccccc; text-shadow: 0 1px 1px #ffffff; } .oo-ui-textInputWidget.oo-ui-iconElement input, @@ -1166,10 +1153,9 @@ } .oo-ui-textInputWidget.oo-ui-iconElement .oo-ui-iconElement-icon { left: 0; - width: 1.875em; + height: 100%; max-height: 2.375em; margin-left: 0.5em; - height: 100%; background-position: right center; } .oo-ui-textInputWidget.oo-ui-indicatorElement input, @@ -1177,10 +1163,9 @@ padding-right: 2.4875em; } .oo-ui-textInputWidget.oo-ui-indicatorElement .oo-ui-indicatorElement-indicator { - width: 0.9375em; + height: 100%; max-height: 2.375em; margin: 0 0.775em; - height: 100%; } .oo-ui-textInputWidget > .oo-ui-labelElement-label { padding: 0.4em; @@ -1295,14 +1280,10 @@ } .oo-ui-dropdownWidget-handle .oo-ui-indicatorElement-indicator { top: 0; - width: 0.9375em; - height: 0.9375em; margin: 0.775em; } .oo-ui-dropdownWidget-handle .oo-ui-iconElement-icon { top: 0; - width: 1.875em; - height: 1.875em; margin: 0.3em; } .oo-ui-dropdownWidget:hover .oo-ui-dropdownWidget-handle { diff --git a/resources/lib/oojs-ui/oojs-ui-core.js b/resources/lib/oojs-ui/oojs-ui-core.js index a05193ea44..64c6be68b3 100644 --- a/resources/lib/oojs-ui/oojs-ui-core.js +++ b/resources/lib/oojs-ui/oojs-ui-core.js @@ -1,12 +1,12 @@ /*! - * OOjs UI v0.16.5 + * OOjs UI v0.16.6 * https://www.mediawiki.org/wiki/OOjs_UI * * Copyright 2011–2016 OOjs UI Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * - * Date: 2016-04-07T15:12:41Z + * Date: 2016-04-19T21:57:49Z */ ( function ( OO ) { @@ -4079,12 +4079,16 @@ OO.ui.mixin.ClippableElement.prototype.setIdealSize = function ( width, height ) }; /** - * Clip element to visible boundaries and allow scrolling when needed. Call this method when - * the element's natural height changes. + * Clip element to visible boundaries and allow scrolling when needed. You should call this method + * when the element's natural height changes. * * Element will be clipped the bottom or right of the element is within 10px of the edge of, or * overlapped by, the visible area of the nearest scrollable container. * + * Because calling clip() when the natural height changes isn't always possible, we also set + * max-height when the element isn't being clipped. This means that if the element tries to grow + * beyond the edge, something reasonable will happen before clip() is called. + * * @chainable */ OO.ui.mixin.ClippableElement.prototype.clip = function () { @@ -4128,14 +4132,30 @@ OO.ui.mixin.ClippableElement.prototype.clip = function () { clipHeight = allotedHeight < naturalHeight; if ( clipWidth ) { - this.$clippable.css( { overflowX: 'scroll', width: Math.max( 0, allotedWidth ) } ); + this.$clippable.css( { + overflowX: 'scroll', + width: Math.max( 0, allotedWidth ), + maxWidth: '' + } ); } else { - this.$clippable.css( { width: this.idealWidth ? this.idealWidth - extraWidth : '', overflowX: '' } ); + this.$clippable.css( { + overflowX: '', + width: this.idealWidth ? this.idealWidth - extraWidth : '', + maxWidth: Math.max( 0, allotedWidth ) + } ); } if ( clipHeight ) { - this.$clippable.css( { overflowY: 'scroll', height: Math.max( 0, allotedHeight ) } ); + this.$clippable.css( { + overflowY: 'scroll', + height: Math.max( 0, allotedHeight ), + maxHeight: '' + } ); } else { - this.$clippable.css( { height: this.idealHeight ? this.idealHeight - extraHeight : '', overflowY: '' } ); + this.$clippable.css( { + overflowY: '', + height: this.idealHeight ? this.idealHeight - extraHeight : '', + maxHeight: Math.max( 0, allotedHeight ) + } ); } // If we stopped clipping in at least one of the dimensions @@ -7837,7 +7857,7 @@ OO.ui.RadioSelectInputWidget.prototype.setOptions = function ( options ) { * @constructor * @param {Object} [config] Configuration options * @cfg {string} [type='text'] The value of the HTML `type` attribute: 'text', 'password', 'search', - * 'email', 'url' or 'date'. Ignored if `multiline` is true. + * 'email', 'url', 'date' or 'number'. Ignored if `multiline` is true. * * Some values of `type` result in additional behaviors: * @@ -8024,7 +8044,6 @@ OO.ui.TextInputWidget.static.gatherPreInfuseState = function ( node, config ) { * * @private * @param {jQuery.Event} e Mouse down event - * @fires icon */ OO.ui.TextInputWidget.prototype.onIconMouseDown = function ( e ) { if ( e.which === OO.ui.MouseButtons.LEFT ) { @@ -8038,7 +8057,6 @@ OO.ui.TextInputWidget.prototype.onIconMouseDown = function ( e ) { * * @private * @param {jQuery.Event} e Mouse down event - * @fires indicator */ OO.ui.TextInputWidget.prototype.onIndicatorMouseDown = function ( e ) { if ( e.which === OO.ui.MouseButtons.LEFT ) { @@ -8280,9 +8298,15 @@ OO.ui.TextInputWidget.prototype.adjustSize = function () { * @protected */ OO.ui.TextInputWidget.prototype.getInputElement = function ( config ) { - return config.multiline ? - $( '