From: Volker E Date: Wed, 8 Feb 2017 00:50:58 +0000 (-0800) Subject: Update OOjs UI to v0.19.1 X-Git-Tag: 1.31.0-rc.0~4130 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22lang_raccourcis%22%2C%22module=%24nom_module%22%29%20.%20%22?a=commitdiff_plain;h=0993a9f442153155fd94bae61135e0fabfe91dc2;p=lhc%2Fweb%2Fwiklou.git Update OOjs UI to v0.19.1 Release notes: https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.19.1 Change-Id: I6ef09c5285f89feee040a894785c02dab728e6ad --- diff --git a/composer.json b/composer.json index 5966f4b5d2..164549570a 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.19.0", + "oojs/oojs-ui": "0.19.1", "oyejorge/less.php": "1.7.0.10", "php": ">=5.5.9", "psr/log": "1.0.0", diff --git a/resources/lib/oojs-ui/i18n/bqi.json b/resources/lib/oojs-ui/i18n/bqi.json new file mode 100644 index 0000000000..8b85a206fc --- /dev/null +++ b/resources/lib/oojs-ui/i18n/bqi.json @@ -0,0 +1,16 @@ +{ + "@metadata": { + "authors": [ + "Mogoeilor" + ] + }, + "ooui-toolbar-more": "بیشتر", + "ooui-toolgroup-expand": "بیشتر", + "ooui-toolgroup-collapse": "کمتر", + "ooui-dialog-message-accept": "خۈڤإ", + "ooui-dialog-message-reject": "أنجومشيڤ کردن", + "ooui-dialog-process-retry": "ز نۉ تلاش کونين", + "ooui-dialog-process-continue": "ديندا گرهڌن", + "ooui-selectfile-button-select": "گولإڤورچين کردن جانیا", + "ooui-selectfile-placeholder": "هيژ جانيایي گولإ ڤورچين نڤابيڌإ" +} diff --git a/resources/lib/oojs-ui/oojs-ui-apex.js b/resources/lib/oojs-ui/oojs-ui-apex.js index 124278b919..3fc8b45574 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.19.0 + * OOjs UI v0.19.1 * https://www.mediawiki.org/wiki/OOjs_UI * * Copyright 2011–2017 OOjs UI Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * - * Date: 2017-02-01T23:04:40Z + * Date: 2017-02-08T00:38:31Z */ ( 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 d2e9674e5a..31447341ca 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.19.0 + * OOjs UI v0.19.1 * https://www.mediawiki.org/wiki/OOjs_UI * * Copyright 2011–2017 OOjs UI Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * - * Date: 2017-02-01T23:04:44Z + * Date: 2017-02-08T00:38:35Z */ .oo-ui-element-hidden { display: none !important; diff --git a/resources/lib/oojs-ui/oojs-ui-core-mediawiki.css b/resources/lib/oojs-ui/oojs-ui-core-mediawiki.css index 004a244ad2..d1d4a573e5 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.19.0 + * OOjs UI v0.19.1 * https://www.mediawiki.org/wiki/OOjs_UI * * Copyright 2011–2017 OOjs UI Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * - * Date: 2017-02-01T23:04:44Z + * Date: 2017-02-08T00:38:35Z */ .oo-ui-element-hidden { display: none !important; @@ -868,7 +868,7 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout { .oo-ui-popupWidget-anchored .oo-ui-popupWidget-anchor:before { bottom: -10px; left: -9px; - border-bottom-color: #888; + border-bottom-color: #a2a9b1; border-width: 10px; } .oo-ui-popupWidget-anchored .oo-ui-popupWidget-anchor:after { @@ -1329,6 +1329,12 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout { border-color: #c8ccd1; box-shadow: inset 0 0 0 1px #c8ccd1; } +@media screen and (min-width: 0) { + .oo-ui-textInputWidget.oo-ui-widget-enabled textarea:focus { + outline: 1px solid #36c; + outline-offset: -2px; + } +} .oo-ui-textInputWidget.oo-ui-widget-enabled :-moz-placeholder { color: #72777d; opacity: 1; diff --git a/resources/lib/oojs-ui/oojs-ui-core.js b/resources/lib/oojs-ui/oojs-ui-core.js index 7cfa9c136b..53ddf48cbf 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.19.0 + * OOjs UI v0.19.1 * https://www.mediawiki.org/wiki/OOjs_UI * * Copyright 2011–2017 OOjs UI Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * - * Date: 2017-02-01T23:04:40Z + * Date: 2017-02-08T00:38:31Z */ ( function ( OO ) { @@ -3463,6 +3463,7 @@ OO.mixinClass( OO.ui.ButtonWidget, OO.ui.mixin.AccessKeyedElement ); /* Static Properties */ /** + * @static * @inheritdoc */ OO.ui.ButtonWidget.static.cancelButtonMouseDownEvents = false; @@ -3697,6 +3698,10 @@ OO.mixinClass( OO.ui.IconWidget, OO.ui.mixin.FlaggedElement ); /* Static Properties */ +/** + * @static + * @inheritdoc + */ OO.ui.IconWidget.static.tagName = 'span'; /** @@ -3750,6 +3755,10 @@ OO.mixinClass( OO.ui.IndicatorWidget, OO.ui.mixin.TitledElement ); /* Static Properties */ +/** + * @static + * @inheritdoc + */ OO.ui.IndicatorWidget.static.tagName = 'span'; /** @@ -3805,12 +3814,10 @@ OO.ui.LabelWidget = function OoUiLabelWidget( config ) { // Properties this.input = config.input; - // Events + // Initialization if ( this.input instanceof OO.ui.InputWidget ) { - this.$element.on( 'click', this.onClick.bind( this ) ); + this.$element.attr( 'for', this.input.getInputId() ); } - - // Initialization this.$element.addClass( 'oo-ui-labelWidget' ); }; @@ -3822,20 +3829,11 @@ OO.mixinClass( OO.ui.LabelWidget, OO.ui.mixin.TitledElement ); /* Static Properties */ -OO.ui.LabelWidget.static.tagName = 'span'; - -/* Methods */ - /** - * Handles label mouse click events. - * - * @private - * @param {jQuery.Event} e Mouse click event + * @static + * @inheritdoc */ -OO.ui.LabelWidget.prototype.onClick = function () { - this.input.simulateLabelClick(); - return false; -}; +OO.ui.LabelWidget.static.tagName = 'label'; /** * PendingElement is a mixin that is used to create elements that notify users that something is happening @@ -3853,6 +3851,7 @@ OO.ui.LabelWidget.prototype.onClick = function () { * } * OO.inheritClass( MessageDialog, OO.ui.MessageDialog ); * + * MessageDialog.static.name = 'myMessageDialog'; * MessageDialog.static.actions = [ * { action: 'save', label: 'Done', flags: 'primary' }, * { label: 'Cancel', flags: 'safe' } @@ -5144,12 +5143,40 @@ OO.mixinClass( OO.ui.OptionWidget, OO.ui.mixin.AccessKeyedElement ); /* Static Properties */ +/** + * Whether this option can be selected. See #setSelected. + * + * @static + * @inheritable + * @property {boolean} + */ OO.ui.OptionWidget.static.selectable = true; +/** + * Whether this option can be highlighted. See #setHighlighted. + * + * @static + * @inheritable + * @property {boolean} + */ OO.ui.OptionWidget.static.highlightable = true; +/** + * Whether this option can be pressed. See #setPressed. + * + * @static + * @inheritable + * @property {boolean} + */ OO.ui.OptionWidget.static.pressable = true; +/** + * Whether this option will be scrolled into view when it is selected. + * + * @static + * @inheritable + * @property {boolean} + */ OO.ui.OptionWidget.static.scrollIntoViewOnSelect = false; /* Methods */ @@ -6232,6 +6259,10 @@ OO.inheritClass( OO.ui.MenuOptionWidget, OO.ui.DecoratedOptionWidget ); /* Static Properties */ +/** + * @static + * @inheritdoc + */ OO.ui.MenuOptionWidget.static.scrollIntoViewOnSelect = true; /** @@ -6285,8 +6316,16 @@ OO.inheritClass( OO.ui.MenuSectionOptionWidget, OO.ui.DecoratedOptionWidget ); /* Static Properties */ +/** + * @static + * @inheritdoc + */ OO.ui.MenuSectionOptionWidget.static.selectable = false; +/** + * @static + * @inheritdoc + */ OO.ui.MenuSectionOptionWidget.static.highlightable = false; /** @@ -6819,12 +6858,28 @@ OO.inheritClass( OO.ui.RadioOptionWidget, OO.ui.OptionWidget ); /* Static Properties */ +/** + * @static + * @inheritdoc + */ OO.ui.RadioOptionWidget.static.highlightable = false; +/** + * @static + * @inheritdoc + */ OO.ui.RadioOptionWidget.static.scrollIntoViewOnSelect = true; +/** + * @static + * @inheritdoc + */ OO.ui.RadioOptionWidget.static.pressable = false; +/** + * @static + * @inheritdoc + */ OO.ui.RadioOptionWidget.static.tagName = 'label'; /* Methods */ @@ -7154,6 +7209,10 @@ OO.inheritClass( OO.ui.CheckboxMultioptionWidget, OO.ui.MultioptionWidget ); /* Static Properties */ +/** + * @static + * @inheritdoc + */ OO.ui.CheckboxMultioptionWidget.static.tagName = 'label'; /* Methods */ @@ -7514,6 +7573,10 @@ OO.inheritClass( OO.ui.ProgressBarWidget, OO.ui.Widget ); /* Static Properties */ +/** + * @static + * @inheritdoc + */ OO.ui.ProgressBarWidget.static.tagName = 'div'; /* Methods */ @@ -7615,6 +7678,10 @@ OO.mixinClass( OO.ui.InputWidget, OO.ui.mixin.AccessKeyedElement ); /* Static Properties */ +/** + * @static + * @inheritdoc + */ OO.ui.InputWidget.static.supportsSimpleLabel = true; /* Static Methods */ @@ -7668,6 +7735,25 @@ OO.ui.InputWidget.prototype.getInputElement = function () { return $( '' ); }; +/** + * Get input element's ID. + * + * If the element already has an ID then that is returned, otherwise unique ID is + * generated, set on the element, and returned. + * + * @return {string} The ID of the element + */ +OO.ui.InputWidget.prototype.getInputId = function () { + var id = this.$input.attr( 'id' ); + + if ( id === undefined ) { + id = OO.ui.generateElementId(); + this.$input.attr( 'id', id ); + } + + return id; +}; + /** * Handle potentially value-changing events. * @@ -7756,6 +7842,7 @@ OO.ui.InputWidget.prototype.cleanUpValue = function ( value ) { * called directly. */ OO.ui.InputWidget.prototype.simulateLabelClick = function () { + OO.ui.warnDeprecation( 'InputWidget: simulateLabelClick() is deprecated.' ); if ( !this.isDisabled() ) { if ( this.$input.is( ':checkbox, :radio' ) ) { this.$input.click(); @@ -7887,6 +7974,9 @@ OO.mixinClass( OO.ui.ButtonInputWidget, OO.ui.mixin.TitledElement ); /** * Disable generating `