Update OOUI to v0.29.4

Release notes:
 https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.29.4

Bug: T143623
Bug: T188886
Bug: T191650
Bug: T208436
Bug: T208507
Bug: T208595
Bug: T208618
Bug: T208627
Depends-On: Ic49477fbfff98e74958c95559768ea1830ebe51a
Change-Id: Ic49477fbfff98e74958c95559768ea1830ebe51b
This commit is contained in:
James D. Forrester 2018-11-06 17:01:56 -08:00
parent 00063e1eb1
commit ab3ddf19d6
22 changed files with 336 additions and 58 deletions

View file

@ -26,7 +26,7 @@
"ext-mbstring": "*",
"ext-xml": "*",
"liuggio/statsd-php-client": "1.0.18",
"oojs/oojs-ui": "0.29.3",
"oojs/oojs-ui": "0.29.4",
"oyejorge/less.php": "1.7.0.14",
"pear/mail": "1.4.1",
"pear/mail_mime": "1.10.2",

View file

@ -112,8 +112,8 @@ oojs:
ooui:
type: tar
src: https://registry.npmjs.org/oojs-ui/-/oojs-ui-0.29.3.tgz
integrity: sha384-7avymoIXfIV6NBK52v9SwKYmqrqChUndvP2vjXeYc4XRq04PTYFrjhfcnP8HXfWb
src: https://registry.npmjs.org/oojs-ui/-/oojs-ui-0.29.4.tgz
integrity: sha384-Nalm0LX+S/mjx+GJBDuJsy0hHK3fYOUpzuijLFAw1Gu1018UeOU+U0Z711VthWVB
dest:
# Main stuff
package/dist/oojs-ui-core.js{,.map.json}:

View file

@ -1,4 +1,28 @@
# OOUI Release History
## v0.29.4 / 2018-11-06
### Features
* TagMultiSelectWidget: Add a `limit` configuration option (Moriel Schottlender)
* TagMultiselectWidget: Make widget invalid if there's text in input (Moriel Schottlender)
### Styles
* PopupTool: Prevent flipping the popup opposite to the toolbar position (Bartosz Dziewoński)
* WindowManager: Better avoid content shifting when disabling page scrollbars (Bartosz Dziewoński)
* WikimediaUI theme: Tame cut-off letter issue (Volker E.)
### Code
* Dialog.detachActions: Make this method chainable, as documented (James D. Forrester)
* FloatableElement: Remove check for `needsCustomPosition` (Bartosz Dziewoński)
* build: Enable `valid-jsdoc` (James D. Forrester)
* demos: Use consistent options descriptions (Volker E.)
* Fix errors flagged by ESLint's `valid-jsdoc` option (Volker E.)
* doc: Add documentation for event handlers (James D. Forrester)
* doc: ButtonWidget.setHref: Add chainable documentation (James D. Forrester)
* doc: Duplicate `@chainable` with manual `@return` comment (James D. Forrester)
* doc: Ensure consistent PHP-DOC annotation (Volker E.)
* doc: TagItemWidget.isFixed: Add return documentation (James D. Forrester)
* doc: WindowManager.openWindow: Explcitly disable `valid-jsdoc` for private parameters (Volker E.)
## v0.29.3 / 2018-10-31
### Features
* LabelElement: Allow invisible accessibility labels (Bartosz Dziewoński)

View file

@ -2,26 +2,24 @@
"@metadata": {
"authors": [
"Milicevic01",
"Prevodim",
"Zoranzoki21"
"Prevodim"
]
},
"ooui-outline-control-move-down": "Premesti stavku nadole",
"ooui-outline-control-move-up": "Premesti stavku nagore",
"ooui-outline-control-move-down": "Premesti stavku na dole",
"ooui-outline-control-move-up": "Premesti stavku na gore",
"ooui-outline-control-remove": "Ukloni stavku",
"ooui-toolbar-more": "Još",
"ooui-toolbar-more": "Više",
"ooui-toolgroup-expand": "Više",
"ooui-toolgroup-collapse": "Manje",
"ooui-item-remove": "Ukloni",
"ooui-dialog-message-accept": "U redu",
"ooui-dialog-message-reject": "Otkaži",
"ooui-dialog-process-error": "Nešto nije u redu",
"ooui-dialog-process-error": "Nešto je pošlo naopako",
"ooui-dialog-process-dismiss": "Odbaci",
"ooui-dialog-process-retry": "Pokušaj ponovo",
"ooui-dialog-process-continue": "Nastavi",
"ooui-selectfile-button-select": "Izaberi datoteku",
"ooui-selectfile-not-supported": "Izbor datoteke nije podržan",
"ooui-selectfile-placeholder": "Datoteka nije izabrana",
"ooui-selectfile-dragdrop-placeholder": "Ovde otpustite datoteku",
"ooui-field-help": "Pomoć"
"ooui-selectfile-not-supported": "Odabir datoteke nije podržan",
"ooui-selectfile-placeholder": "Nije izabrana nijedna datoteka",
"ooui-selectfile-dragdrop-placeholder": "Prevuci datoteku ovde"
}

View file

@ -1,12 +1,12 @@
/*!
* OOUI v0.29.3
* OOUI v0.29.4
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 20112018 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: 2018-11-01T02:03:33Z
* Date: 2018-11-07T00:58:30Z
*/
( function ( OO ) {

View file

@ -1,12 +1,12 @@
/*!
* OOUI v0.29.3
* OOUI v0.29.4
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 20112018 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: 2018-11-01T02:03:40Z
* Date: 2018-11-07T00:58:38Z
*/
.oo-ui-element-hidden {
display: none !important;

View file

@ -1,12 +1,12 @@
/*!
* OOUI v0.29.3
* OOUI v0.29.4
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 20112018 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: 2018-11-01T02:03:40Z
* Date: 2018-11-07T00:58:38Z
*/
.oo-ui-element-hidden {
display: none !important;
@ -792,7 +792,7 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout {
}
.oo-ui-decoratedOptionWidget {
padding: 0.64285714em 0.85714286em 0.57142857em;
padding: 0.57142857em 0.85714286em 0.57142857em;
line-height: 1;
}
.oo-ui-decoratedOptionWidget.oo-ui-iconElement {
@ -802,7 +802,7 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout {
left: 0.78571429em;
}
.oo-ui-decoratedOptionWidget .oo-ui-labelElement-label {
line-height: 1.07142857em;
line-height: 1.14285714em;
}
.oo-ui-decoratedOptionWidget.oo-ui-indicatorElement {
padding-right: 2.28571429em;
@ -1695,7 +1695,7 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout {
.oo-ui-menuSectionOptionWidget {
color: #72777d;
padding: 0.64285714em 0.85714286em 0.28571429em;
padding: 0.57142857em 0.85714286em 0.28571429em;
font-weight: bold;
}
.oo-ui-menuSectionOptionWidget.oo-ui-widget-enabled {

View file

@ -1,12 +1,12 @@
/*!
* OOUI v0.29.3
* OOUI v0.29.4
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 20112018 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: 2018-11-01T02:03:33Z
* Date: 2018-11-07T00:58:30Z
*/
( function ( OO ) {
@ -1379,6 +1379,7 @@ OO.ui.Element.static.reconsiderScrollbars = function ( el ) {
* @param {boolean} [show] Make element visible, omit to toggle visibility
* @fires visible
* @chainable
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.Element.prototype.toggle = function ( show ) {
show = show === undefined ? !this.visible : !!show;
@ -1415,6 +1416,7 @@ OO.ui.Element.prototype.getData = function () {
*
* @param {Mixed} data Element data
* @chainable
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.Element.prototype.setData = function ( data ) {
this.data = data;
@ -1426,6 +1428,7 @@ OO.ui.Element.prototype.setData = function ( data ) {
*
* @param {string} id
* @chainable
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.Element.prototype.setElementId = function ( id ) {
this.elementId = id;
@ -1539,6 +1542,7 @@ OO.ui.Element.prototype.getElementGroup = function () {
*
* @param {OO.ui.mixin.GroupElement|null} group Group element, null if none
* @chainable
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.Element.prototype.setElementGroup = function ( group ) {
this.elementGroup = group;
@ -1644,6 +1648,7 @@ OO.mixinClass( OO.ui.Layout, OO.EventEmitter );
* Reset scroll offsets
*
* @chainable
* @return {OO.ui.Layout} The layout, for chaining
*/
OO.ui.Layout.prototype.resetScroll = function () {
this.$element[ 0 ].scrollTop = 0;
@ -1728,6 +1733,7 @@ OO.ui.Widget.prototype.isDisabled = function () {
*
* @param {boolean} disabled Disable widget
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.Widget.prototype.setDisabled = function ( disabled ) {
var isDisabled;
@ -1750,6 +1756,7 @@ OO.ui.Widget.prototype.setDisabled = function ( disabled ) {
* Update the disabled state, in case of changes in parent widget.
*
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.Widget.prototype.updateDisabled = function () {
this.setDisabled( this.disabled );
@ -1949,6 +1956,7 @@ OO.initClass( OO.ui.mixin.TabIndexedElement );
*
* @param {jQuery} $tabIndexed Element that should use the tabindex functionality
* @chainable
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.mixin.TabIndexedElement.prototype.setTabIndexedElement = function ( $tabIndexed ) {
var tabIndex = this.tabIndex;
@ -1965,6 +1973,7 @@ OO.ui.mixin.TabIndexedElement.prototype.setTabIndexedElement = function ( $tabIn
*
* @param {string|number|null} tabIndex Tabindex value, or `null` for no tabindex
* @chainable
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.mixin.TabIndexedElement.prototype.setTabIndex = function ( tabIndex ) {
tabIndex = /^-?\d+$/.test( tabIndex ) ? Number( tabIndex ) : null;
@ -1983,6 +1992,7 @@ OO.ui.mixin.TabIndexedElement.prototype.setTabIndex = function ( tabIndex ) {
*
* @private
* @chainable
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.mixin.TabIndexedElement.prototype.updateTabIndex = function () {
if ( this.$tabIndexed ) {
@ -2074,6 +2084,7 @@ OO.ui.mixin.TabIndexedElement.prototype.isLabelableNode = function ( $node ) {
* Focus this element.
*
* @chainable
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.mixin.TabIndexedElement.prototype.focus = function () {
if ( !this.isDisabled() ) {
@ -2086,6 +2097,7 @@ OO.ui.mixin.TabIndexedElement.prototype.focus = function () {
* Blur this element.
*
* @chainable
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.mixin.TabIndexedElement.prototype.blur = function () {
this.$tabIndexed.blur();
@ -2209,6 +2221,7 @@ OO.ui.mixin.ButtonElement.prototype.setButtonElement = function ( $button ) {
*
* @protected
* @param {jQuery.Event} e Mouse down event
* @return {undefined/boolean} False to prevent default if event is handled
*/
OO.ui.mixin.ButtonElement.prototype.onMouseDown = function ( e ) {
if ( this.isDisabled() || e.which !== OO.ui.MouseButtons.LEFT ) {
@ -2251,6 +2264,7 @@ OO.ui.mixin.ButtonElement.prototype.onMouseUp = function () {
* @protected
* @param {jQuery.Event} e Mouse click event
* @fires click
* @return {undefined/boolean} False to prevent default if event is handled
*/
OO.ui.mixin.ButtonElement.prototype.onClick = function ( e ) {
if ( !this.isDisabled() && e.which === OO.ui.MouseButtons.LEFT ) {
@ -2303,6 +2317,7 @@ OO.ui.mixin.ButtonElement.prototype.onKeyUp = function () {
* @protected
* @param {jQuery.Event} e Key press event
* @fires click
* @return {undefined/boolean} False to prevent default if event is handled
*/
OO.ui.mixin.ButtonElement.prototype.onKeyPress = function ( e ) {
if ( !this.isDisabled() && ( e.which === OO.ui.Keys.SPACE || e.which === OO.ui.Keys.ENTER ) ) {
@ -2326,6 +2341,7 @@ OO.ui.mixin.ButtonElement.prototype.isFramed = function () {
*
* @param {boolean} [framed] Make button framed, omit to toggle
* @chainable
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.mixin.ButtonElement.prototype.toggleFramed = function ( framed ) {
framed = framed === undefined ? !this.framed : !!framed;
@ -2352,6 +2368,7 @@ OO.ui.mixin.ButtonElement.prototype.toggleFramed = function ( framed ) {
* @protected
* @param {boolean} value Make button active
* @chainable
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.mixin.ButtonElement.prototype.setActive = function ( value ) {
this.active = !!value;
@ -2488,6 +2505,7 @@ OO.ui.mixin.GroupElement.prototype.findItemsFromData = function ( data ) {
* @param {OO.ui.Element[]} items An array of items to add to the group
* @param {number} [index] Index of the insertion point
* @chainable
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.mixin.GroupElement.prototype.addItems = function ( items, index ) {
// Mixin method
@ -2548,6 +2566,7 @@ OO.ui.mixin.GroupElement.prototype.insertItemElements = function ( itemWidget, i
*
* @param {OO.ui.Element[]} items An array of items to remove
* @chainable
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.mixin.GroupElement.prototype.removeItems = function ( items ) {
var i, len, item, index;
@ -2576,6 +2595,7 @@ OO.ui.mixin.GroupElement.prototype.removeItems = function ( items ) {
* To remove only a subset of items from a group, use the #removeItems method.
*
* @chainable
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.mixin.GroupElement.prototype.clearItems = function () {
var i, len;
@ -2722,6 +2742,7 @@ OO.ui.mixin.LabelElement.prototype.setLabelElement = function ( $label ) {
* @param {jQuery|string|OO.ui.HtmlSnippet|Function|null} label Label nodes; text; a function that returns nodes or
* text; or null for no label
* @chainable
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.mixin.LabelElement.prototype.setLabel = function ( label ) {
label = typeof label === 'function' ? OO.ui.resolveMsg( label ) : label;
@ -2745,6 +2766,7 @@ OO.ui.mixin.LabelElement.prototype.setLabel = function ( label ) {
*
* @param {boolean} invisibleLabel
* @chainable
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.mixin.LabelElement.prototype.setInvisibleLabel = function ( invisibleLabel ) {
invisibleLabel = !!invisibleLabel;
@ -2768,6 +2790,7 @@ OO.ui.mixin.LabelElement.prototype.setInvisibleLabel = function ( invisibleLabel
* @param {string} query Substring of text to highlight
* @param {Function} [compare] Optional string comparator, e.g. Intl.Collator().compare
* @chainable
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.mixin.LabelElement.prototype.setHighlightedQuery = function ( text, query, compare ) {
return this.setLabel( this.constructor.static.highlightQuery( text, query, compare ) );
@ -2933,6 +2956,7 @@ OO.ui.mixin.IconElement.prototype.setIconElement = function ( $icon ) {
* @param {Object|string|null} icon A symbolic icon name, a {@link #icon map of icon names} keyed
* by language code, or `null` to remove the icon.
* @chainable
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.mixin.IconElement.prototype.setIcon = function ( icon ) {
icon = OO.isPlainObject( icon ) ? OO.ui.getLocalValue( icon, null, 'default' ) : icon;
@ -2965,6 +2989,7 @@ OO.ui.mixin.IconElement.prototype.setIcon = function ( icon ) {
* @param {string|Function|null} iconTitle A text string used as the icon title,
* a function that returns title text, or `null` for no title.
* @chainable
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.mixin.IconElement.prototype.setIconTitle = function ( iconTitle ) {
iconTitle =
@ -3105,6 +3130,7 @@ OO.ui.mixin.IndicatorElement.prototype.setIndicatorElement = function ( $indicat
*
* @param {string|null} indicator Symbolic name of indicator, or `null` for no indicator
* @chainable
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.mixin.IndicatorElement.prototype.setIndicator = function ( indicator ) {
indicator = typeof indicator === 'string' && indicator.length ? indicator.trim() : null;
@ -3138,6 +3164,7 @@ OO.ui.mixin.IndicatorElement.prototype.setIndicator = function ( indicator ) {
* @param {string|Function|null} indicatorTitle Indicator title text, a function that returns text, or
* `null` for no indicator title
* @chainable
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.mixin.IndicatorElement.prototype.setIndicatorTitle = function ( indicatorTitle ) {
indicatorTitle =
@ -3293,6 +3320,7 @@ OO.ui.mixin.FlaggedElement.prototype.getFlags = function () {
* Clear all flags.
*
* @chainable
* @return {OO.ui.Element} The element, for chaining
* @fires flag
*/
OO.ui.mixin.FlaggedElement.prototype.clearFlags = function () {
@ -3325,6 +3353,7 @@ OO.ui.mixin.FlaggedElement.prototype.clearFlags = function () {
* or an object keyed by flag name with a boolean value that indicates whether the flag should
* be added (`true`) or removed (`false`).
* @chainable
* @return {OO.ui.Element} The element, for chaining
* @fires flag
*/
OO.ui.mixin.FlaggedElement.prototype.setFlags = function ( flags ) {
@ -3465,6 +3494,7 @@ OO.ui.mixin.TitledElement.prototype.setTitledElement = function ( $titled ) {
*
* @param {string|Function|null} title Title text, a function that returns text, or `null` for no title
* @chainable
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.mixin.TitledElement.prototype.setTitle = function ( title ) {
title = typeof title === 'function' ? OO.ui.resolveMsg( title ) : title;
@ -3483,6 +3513,7 @@ OO.ui.mixin.TitledElement.prototype.setTitle = function ( title ) {
*
* @protected
* @chainable
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.mixin.TitledElement.prototype.updateTitle = function () {
var title = this.getTitle();
@ -3595,6 +3626,7 @@ OO.ui.mixin.AccessKeyedElement.prototype.setAccessKeyedElement = function ( $acc
*
* @param {string|Function|null} accessKey Key, a function that returns a key, or `null` for no accesskey
* @chainable
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.mixin.AccessKeyedElement.prototype.setAccessKey = function ( accessKey ) {
accessKey = typeof accessKey === 'string' ? OO.ui.resolveMsg( accessKey ) : null;
@ -3785,6 +3817,8 @@ OO.ui.ButtonWidget.prototype.getNoFollow = function () {
* Set hyperlink location.
*
* @param {string|null} href Hyperlink location, null to remove
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.ButtonWidget.prototype.setHref = function ( href ) {
href = typeof href === 'string' ? href : null;
@ -3806,6 +3840,7 @@ OO.ui.ButtonWidget.prototype.setHref = function ( href ) {
*
* @private
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.ButtonWidget.prototype.updateHref = function () {
if ( this.href !== null && !this.isDisabled() ) {
@ -3831,6 +3866,7 @@ OO.ui.ButtonWidget.prototype.onDisable = function () {
* Set hyperlink target.
*
* @param {string|null} target Hyperlink target, null to remove
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.ButtonWidget.prototype.setTarget = function ( target ) {
target = typeof target === 'string' ? target : null;
@ -3851,6 +3887,7 @@ OO.ui.ButtonWidget.prototype.setTarget = function ( target ) {
* Set search engine traversal hint.
*
* @param {boolean} noFollow True if search engines should avoid traversing this hyperlink
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.ButtonWidget.prototype.setNoFollow = function ( noFollow ) {
noFollow = typeof noFollow === 'boolean' ? noFollow : true;
@ -3945,6 +3982,7 @@ OO.ui.ButtonGroupWidget.static.tagName = 'span';
* Focus the widget
*
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.ButtonGroupWidget.prototype.focus = function () {
if ( !this.isDisabled() ) {
@ -4276,6 +4314,7 @@ OO.ui.mixin.PendingElement.prototype.isPending = function () {
* (i.e., the number of calls to #pushPending and #popPending is the same).
*
* @chainable
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.mixin.PendingElement.prototype.pushPending = function () {
if ( this.pending === 0 ) {
@ -4292,6 +4331,7 @@ OO.ui.mixin.PendingElement.prototype.pushPending = function () {
* (i.e., the number of calls to #pushPending and #popPending is the same).
*
* @chainable
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.mixin.PendingElement.prototype.popPending = function () {
if ( this.pending === 1 ) {
@ -4432,6 +4472,7 @@ OO.ui.mixin.FloatableElement.prototype.setHorizontalPosition = function ( positi
*
* @param {boolean} [positioning] Enable positioning, omit to toggle
* @chainable
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.mixin.FloatableElement.prototype.togglePositioning = function ( positioning ) {
var closestScrollableOfContainer;
@ -4560,6 +4601,7 @@ OO.ui.mixin.FloatableElement.prototype.isFloatableOutOfView = function () {
* This should only be done when both of them are attached to the DOM and visible.
*
* @chainable
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.mixin.FloatableElement.prototype.position = function () {
if ( !this.positioning ) {
@ -4808,6 +4850,7 @@ OO.ui.mixin.ClippableElement.prototype.setClippableContainer = function ( $clipp
*
* @param {boolean} [clipping] Enable clipping, omit to toggle
* @chainable
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.mixin.ClippableElement.prototype.toggleClipping = function ( clipping ) {
clipping = clipping === undefined ? !this.clipping : !!clipping;
@ -4962,6 +5005,7 @@ OO.ui.mixin.ClippableElement.prototype.getVerticalAnchorEdge = function () {
* beyond the edge, something reasonable will happen before clip() is called.
*
* @chainable
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.mixin.ClippableElement.prototype.clip = function () {
var extraHeight, extraWidth, viewportSpacing,
@ -5989,6 +6033,7 @@ OO.mixinClass( OO.ui.mixin.GroupWidget, OO.ui.mixin.GroupElement );
*
* @param {boolean} disabled Disable widget
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.mixin.GroupWidget.prototype.setDisabled = function ( disabled ) {
var i, len;
@ -6044,6 +6089,7 @@ OO.ui.mixin.ItemWidget.prototype.isDisabled = function () {
*
* @param {OO.ui.mixin.GroupElement|null} group Group element, null if none
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.mixin.ItemWidget.prototype.setElementGroup = function ( group ) {
// Parent method
@ -6218,6 +6264,7 @@ OO.ui.OptionWidget.prototype.isPressed = function () {
*
* @param {boolean} [state=false] Select option
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.OptionWidget.prototype.setSelected = function ( state ) {
if ( this.constructor.static.selectable ) {
@ -6241,6 +6288,7 @@ OO.ui.OptionWidget.prototype.setSelected = function ( state ) {
*
* @param {boolean} [state=false] Highlight option
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.OptionWidget.prototype.setHighlighted = function ( state ) {
if ( this.constructor.static.highlightable ) {
@ -6259,6 +6307,7 @@ OO.ui.OptionWidget.prototype.setHighlighted = function ( state ) {
*
* @param {boolean} [state=false] Press option
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.OptionWidget.prototype.setPressed = function ( state ) {
if ( this.constructor.static.pressable ) {
@ -6470,6 +6519,7 @@ OO.ui.SelectWidget.prototype.onFocus = function ( event ) {
*
* @private
* @param {jQuery.Event} e Mouse down event
* @return {undefined/boolean} False to prevent default if event is handled
*/
OO.ui.SelectWidget.prototype.onMouseDown = function ( e ) {
var item;
@ -6492,6 +6542,7 @@ OO.ui.SelectWidget.prototype.onMouseDown = function ( e ) {
*
* @private
* @param {MouseEvent} e Mouse up event
* @return {undefined/boolean} False to prevent default if event is handled
*/
OO.ui.SelectWidget.prototype.onDocumentMouseUp = function ( e ) {
var item;
@ -6550,6 +6601,7 @@ OO.ui.SelectWidget.prototype.onMouseMove = function () {
*
* @private
* @param {jQuery.Event} e Mouse over event
* @return {undefined/boolean} False to prevent default if event is handled
*/
OO.ui.SelectWidget.prototype.onMouseOver = function ( e ) {
var item;
@ -6568,6 +6620,7 @@ OO.ui.SelectWidget.prototype.onMouseOver = function ( e ) {
*
* @private
* @param {jQuery.Event} e Mouse over event
* @return {undefined/boolean} False to prevent default if event is handled
*/
OO.ui.SelectWidget.prototype.onMouseLeave = function () {
if ( !this.isDisabled() ) {
@ -6707,6 +6760,7 @@ OO.ui.SelectWidget.prototype.clearKeyPressBuffer = function () {
*
* @protected
* @param {KeyboardEvent} e Key press event
* @return {undefined/boolean} False to prevent default if event is handled
*/
OO.ui.SelectWidget.prototype.onDocumentKeyPress = function ( e ) {
var c, filter, item;
@ -6914,6 +6968,7 @@ OO.ui.SelectWidget.prototype.togglePressed = function ( pressed ) {
* @param {OO.ui.OptionWidget} [item] Item to highlight, omit for no highlight
* @fires highlight
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.SelectWidget.prototype.highlightItem = function ( item ) {
var i, len, highlighted,
@ -6985,6 +7040,7 @@ OO.ui.SelectWidget.prototype.getItemFromLabel = function ( label, prefix ) {
* @param {boolean} [prefix=false] Allow a prefix match, if only a single item matches
* @fires select
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.SelectWidget.prototype.selectItemByLabel = function ( label, prefix ) {
var itemFromLabel = this.getItemFromLabel( label, !!prefix );
@ -7001,6 +7057,7 @@ OO.ui.SelectWidget.prototype.selectItemByLabel = function ( label, prefix ) {
* @param {Object|string} [data] Value of the item to select, omit to deselect all
* @fires select
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.SelectWidget.prototype.selectItemByData = function ( data ) {
var itemFromData = this.findItemFromData( data );
@ -7017,7 +7074,8 @@ OO.ui.SelectWidget.prototype.selectItemByData = function ( data ) {
* @param {OO.ui.OptionWidget} [item] Item to select, omit to deselect all
* @fires select
* @chainable
*/
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.SelectWidget.prototype.selectItem = function ( item ) {
var i, len, selected,
changed = false;
@ -7053,6 +7111,7 @@ OO.ui.SelectWidget.prototype.selectItem = function ( item ) {
* @param {OO.ui.OptionWidget} [item] Item to press, omit to depress all
* @fires press
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.SelectWidget.prototype.pressItem = function ( item ) {
var i, len, pressed,
@ -7085,6 +7144,7 @@ OO.ui.SelectWidget.prototype.pressItem = function ( item ) {
* @param {OO.ui.OptionWidget} item Item to choose
* @fires choose
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.SelectWidget.prototype.chooseItem = function ( item ) {
if ( item ) {
@ -7152,6 +7212,7 @@ OO.ui.SelectWidget.prototype.findFirstSelectableItem = function () {
* @param {number} [index] Index to insert items after
* @fires add
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.SelectWidget.prototype.addItems = function ( items, index ) {
// Mixin method
@ -7171,6 +7232,7 @@ OO.ui.SelectWidget.prototype.addItems = function ( items, index ) {
* @param {OO.ui.OptionWidget[]} items Items to remove
* @fires remove
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.SelectWidget.prototype.removeItems = function ( items ) {
var i, len, item;
@ -7198,6 +7260,7 @@ OO.ui.SelectWidget.prototype.removeItems = function ( items ) {
*
* @fires remove
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.SelectWidget.prototype.clearItems = function () {
var items = this.items.slice();
@ -7682,6 +7745,7 @@ OO.ui.MenuSelectWidget.prototype.unbindDocumentKeyPressListener = function () {
*
* @param {OO.ui.OptionWidget} item Item to choose
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.MenuSelectWidget.prototype.chooseItem = function ( item ) {
OO.ui.MenuSelectWidget.parent.prototype.chooseItem.call( this, item );
@ -8001,6 +8065,7 @@ OO.ui.DropdownWidget.prototype.onMenuToggle = function ( isVisible ) {
*
* @private
* @param {jQuery.Event} e Mouse click event
* @return {undefined/boolean} False to prevent default if event is handled
*/
OO.ui.DropdownWidget.prototype.onClick = function ( e ) {
if ( !this.isDisabled() && e.which === OO.ui.MouseButtons.LEFT ) {
@ -8014,6 +8079,7 @@ OO.ui.DropdownWidget.prototype.onClick = function ( e ) {
*
* @private
* @param {jQuery.Event} e Key down event
* @return {undefined/boolean} False to prevent default if event is handled
*/
OO.ui.DropdownWidget.prototype.onKeyDown = function ( e ) {
if (
@ -8267,6 +8333,7 @@ OO.ui.MultioptionWidget.prototype.isSelected = function () {
*
* @param {boolean} [state=false] Select option
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.MultioptionWidget.prototype.setSelected = function ( state ) {
state = !!state;
@ -8367,6 +8434,7 @@ OO.ui.MultiselectWidget.prototype.findSelectedItemsData = function () {
*
* @param {OO.ui.MultioptionWidget[]} items Items to select
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.MultiselectWidget.prototype.selectItems = function ( items ) {
this.items.forEach( function ( item ) {
@ -8381,6 +8449,7 @@ OO.ui.MultiselectWidget.prototype.selectItems = function ( items ) {
*
* @param {Object[]|string[]} datas Values of items to select
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.MultiselectWidget.prototype.selectItemsByData = function ( datas ) {
var items,
@ -8638,6 +8707,7 @@ OO.ui.CheckboxMultiselectWidget.prototype.onClick = function ( e ) {
* Focus the widget
*
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.CheckboxMultiselectWidget.prototype.focus = function () {
var item;
@ -8917,6 +8987,7 @@ OO.ui.InputWidget.prototype.getValue = function () {
*
* @param {string} dir Text directionality: 'ltr', 'rtl' or 'auto'
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.InputWidget.prototype.setDir = function ( dir ) {
this.$input.prop( 'dir', dir );
@ -8929,6 +9000,7 @@ OO.ui.InputWidget.prototype.setDir = function ( dir ) {
* @param {string} value New value
* @fires change
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.InputWidget.prototype.setValue = function ( value ) {
value = this.cleanUpValue( value );
@ -8986,6 +9058,7 @@ OO.ui.InputWidget.prototype.setDisabled = function ( state ) {
*
* @param {string} id
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.InputWidget.prototype.setInputId = function ( id ) {
this.$input.attr( 'id', id );
@ -9144,6 +9217,7 @@ OO.ui.ButtonInputWidget.prototype.getInputElement = function ( config ) {
* @param {jQuery|string|Function|null} label Label nodes, text, a function that returns nodes or
* text, or `null` for no label
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.ButtonInputWidget.prototype.setLabel = function ( label ) {
if ( typeof label === 'function' ) {
@ -9170,6 +9244,7 @@ OO.ui.ButtonInputWidget.prototype.setLabel = function ( label ) {
*
* @param {string} value New value
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.ButtonInputWidget.prototype.setValue = function ( value ) {
if ( !this.useInputTag ) {
@ -9300,6 +9375,7 @@ OO.ui.CheckboxInputWidget.prototype.onEdit = function () {
*
* @param {boolean} state `true` for selected
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.CheckboxInputWidget.prototype.setSelected = function ( state ) {
state = !!state;
@ -9476,6 +9552,7 @@ OO.ui.DropdownInputWidget.prototype.setDisabled = function ( state ) {
*
* @param {Object[]} options Array of menu options in the format `{ data: …, label: … }`
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.DropdownInputWidget.prototype.setOptions = function ( options ) {
var value = this.getValue();
@ -9707,6 +9784,7 @@ OO.ui.RadioInputWidget.prototype.onEdit = function () {
*
* @param {boolean} state `true` for selected
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.RadioInputWidget.prototype.setSelected = function ( state ) {
// RadioInputWidget doesn't track its state.
@ -9877,6 +9955,7 @@ OO.ui.RadioSelectInputWidget.prototype.setDisabled = function ( state ) {
*
* @param {Object[]} options Array of menu options in the format `{ data: …, label: … }`
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.RadioSelectInputWidget.prototype.setOptions = function ( options ) {
var value = this.getValue();
@ -10093,6 +10172,7 @@ OO.ui.CheckboxMultiselectInputWidget.prototype.setDisabled = function ( state )
*
* @param {Object[]} options Array of menu options in the format `{ data: …, label: …, disabled: … }`
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.CheckboxMultiselectInputWidget.prototype.setOptions = function ( options ) {
var value = this.getValue();
@ -10327,6 +10407,7 @@ OO.ui.TextInputWidget.static.validationPatterns = {
*
* @private
* @param {jQuery.Event} e Mouse down event
* @return {undefined/boolean} False to prevent default if event is handled
*/
OO.ui.TextInputWidget.prototype.onIconMouseDown = function ( e ) {
if ( e.which === OO.ui.MouseButtons.LEFT ) {
@ -10340,6 +10421,7 @@ OO.ui.TextInputWidget.prototype.onIconMouseDown = function ( e ) {
*
* @private
* @param {jQuery.Event} e Mouse down event
* @return {undefined/boolean} False to prevent default if event is handled
*/
OO.ui.TextInputWidget.prototype.onIndicatorMouseDown = function ( e ) {
if ( e.which === OO.ui.MouseButtons.LEFT ) {
@ -10423,6 +10505,7 @@ OO.ui.TextInputWidget.prototype.isReadOnly = function () {
*
* @param {boolean} state Make input read-only
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.TextInputWidget.prototype.setReadOnly = function ( state ) {
this.readOnly = !!state;
@ -10444,6 +10527,7 @@ OO.ui.TextInputWidget.prototype.isRequired = function () {
*
* @param {boolean} state Make input required
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.TextInputWidget.prototype.setRequired = function ( state ) {
this.required = !!state;
@ -10572,6 +10656,7 @@ OO.ui.TextInputWidget.prototype.getSaneType = function ( config ) {
* @param {number} from Select from offset
* @param {number} [to] Select to offset, defaults to from
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.TextInputWidget.prototype.selectRange = function ( from, to ) {
var isBackwards, start, end,
@ -10631,6 +10716,7 @@ OO.ui.TextInputWidget.prototype.getInputLength = function () {
* Focus the input and select the entire text.
*
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.TextInputWidget.prototype.select = function () {
return this.selectRange( 0, this.getInputLength() );
@ -10640,6 +10726,7 @@ OO.ui.TextInputWidget.prototype.select = function () {
* Focus the input and move the cursor to the start.
*
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.TextInputWidget.prototype.moveCursorToStart = function () {
return this.selectRange( 0 );
@ -10649,6 +10736,7 @@ OO.ui.TextInputWidget.prototype.moveCursorToStart = function () {
* Focus the input and move the cursor to the end.
*
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.TextInputWidget.prototype.moveCursorToEnd = function () {
return this.selectRange( this.getInputLength() );
@ -10659,6 +10747,7 @@ OO.ui.TextInputWidget.prototype.moveCursorToEnd = function () {
*
* @param {string} content Content to be inserted
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.TextInputWidget.prototype.insertContent = function ( content ) {
var start, end,
@ -10679,6 +10768,7 @@ OO.ui.TextInputWidget.prototype.insertContent = function ( content ) {
* @param {string} pre Content to be inserted before the selection
* @param {string} post Content to be inserted after the selection
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.TextInputWidget.prototype.encapsulateContent = function ( pre, post ) {
var start, end,
@ -10787,6 +10877,7 @@ OO.ui.TextInputWidget.prototype.getValidity = function () {
*
* @param {string} labelPosition Label position, 'before' or 'after'
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.TextInputWidget.prototype.setLabelPosition = function ( labelPosition ) {
this.labelPosition = labelPosition;
@ -10805,6 +10896,7 @@ OO.ui.TextInputWidget.prototype.setLabelPosition = function ( labelPosition ) {
* something causes the label to be mispositioned.
*
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.TextInputWidget.prototype.updatePosition = function () {
var after = this.labelPosition === 'after';
@ -10825,6 +10917,7 @@ OO.ui.TextInputWidget.prototype.updatePosition = function () {
*
* @private
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.TextInputWidget.prototype.positionLabel = function () {
var after, rtl, property, newCss;
@ -11068,6 +11161,7 @@ OO.ui.MultilineTextInputWidget.prototype.onKeyPress = function ( e ) {
* This only affects multiline inputs that are {@link #autosize autosized}.
*
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
* @fires resize
*/
OO.ui.MultilineTextInputWidget.prototype.adjustSize = function () {
@ -11418,6 +11512,7 @@ OO.ui.ComboBoxInputWidget.prototype.setDisabled = function ( disabled ) {
*
* @param {Object[]} options Array of menu options in the format `{ data: …, label: … }`
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.ComboBoxInputWidget.prototype.setOptions = function ( options ) {
this.getMenu()
@ -11634,6 +11729,7 @@ OO.ui.FieldLayout.prototype.makeMessage = function ( kind, text ) {
* @private
* @param {string} value Alignment mode, either 'left', 'right', 'top' or 'inline'
* @chainable
* @return {OO.ui.BookletLayout} The layout, for chaining
*/
OO.ui.FieldLayout.prototype.setAlignment = function ( value ) {
if ( value !== this.align ) {
@ -11691,6 +11787,7 @@ OO.ui.FieldLayout.prototype.setAlignment = function ( value ) {
* @param {Array} errors Error messages about the widget, which will be displayed below the widget.
* The array may contain strings or OO.ui.HtmlSnippet instances.
* @chainable
* @return {OO.ui.BookletLayout} The layout, for chaining
*/
OO.ui.FieldLayout.prototype.setErrors = function ( errors ) {
this.errors = errors.slice();
@ -11704,6 +11801,7 @@ OO.ui.FieldLayout.prototype.setErrors = function ( errors ) {
* @param {Array} notices Notices about the widget, which will be displayed below the widget.
* The array may contain strings or OO.ui.HtmlSnippet instances.
* @chainable
* @return {OO.ui.BookletLayout} The layout, for chaining
*/
OO.ui.FieldLayout.prototype.setNotices = function ( notices ) {
this.notices = notices.slice();
@ -12116,6 +12214,7 @@ OO.ui.FormLayout.static.tagName = 'form';
* @private
* @param {jQuery.Event} e Submit event
* @fires submit
* @return {OO.ui.FormLayout} The layout, for chaining
*/
OO.ui.FormLayout.prototype.onFormSubmit = function () {
if ( this.emit( 'submit' ) ) {
@ -12530,6 +12629,7 @@ OO.ui.NumberInputWidget.prototype.onButtonClick = function ( dir ) {
*
* @private
* @param {jQuery.Event} event
* @return {undefined/boolean} False to prevent default if event is handled
*/
OO.ui.NumberInputWidget.prototype.onWheel = function ( event ) {
var delta = 0;
@ -12572,6 +12672,7 @@ OO.ui.NumberInputWidget.prototype.onWheel = function ( event ) {
*
* @private
* @param {jQuery.Event} e Key down event
* @return {undefined/boolean} False to prevent default if event is handled
*/
OO.ui.NumberInputWidget.prototype.onKeyDown = function ( e ) {
if ( !this.isDisabled() ) {

File diff suppressed because one or more lines are too long

View file

@ -1,12 +1,12 @@
/*!
* OOUI v0.29.3
* OOUI v0.29.4
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 20112018 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: 2018-11-01T02:03:40Z
* Date: 2018-11-07T00:58:38Z
*/
.oo-ui-tool > .oo-ui-tool-link > .oo-ui-tool-checkIcon {
display: none;

View file

@ -1,12 +1,12 @@
/*!
* OOUI v0.29.3
* OOUI v0.29.4
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 20112018 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: 2018-11-01T02:03:40Z
* Date: 2018-11-07T00:58:38Z
*/
.oo-ui-tool {
-webkit-box-sizing: border-box;

View file

@ -1,12 +1,12 @@
/*!
* OOUI v0.29.3
* OOUI v0.29.4
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 20112018 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: 2018-11-01T02:03:33Z
* Date: 2018-11-07T00:58:30Z
*/
( function ( OO ) {
@ -400,6 +400,7 @@ OO.ui.Toolbar.prototype.getToolGroupFactory = function () {
*
* @private
* @param {jQuery.Event} e Mouse down event
* @return {undefined/boolean} False to prevent default if event is handled
*/
OO.ui.Toolbar.prototype.onPointerDown = function ( e ) {
var $closestWidgetToEvent = $( e.target ).closest( '.oo-ui-widget' ),
@ -857,6 +858,7 @@ OO.ui.Tool.prototype.setActive = function ( state ) {
*
* @param {string|Function} title Title text or a function that returns text
* @chainable
* @return {OO.ui.Tool} The tool, for chaining
*/
OO.ui.Tool.prototype.setTitle = function ( title ) {
this.title = OO.ui.resolveMsg( title );
@ -1107,6 +1109,7 @@ OO.ui.ToolGroup.prototype.onDisable = function ( isDisabled ) {
*
* @protected
* @param {jQuery.Event} e Mouse down or key down event
* @return {undefined/boolean} False to prevent default if event is handled
*/
OO.ui.ToolGroup.prototype.onMouseKeyDown = function ( e ) {
if (
@ -1553,6 +1556,7 @@ OO.ui.PopupTool = function OoUiPopupTool( toolGroup, config ) {
this.popup.connect( this, { toggle: 'onPopupToggle' } );
// Initialization
this.popup.setAutoFlip( false );
this.popup.setPosition( toolGroup.getToolbar().position === 'bottom' ? 'above' : 'below' );
this.$element.addClass( 'oo-ui-popupTool' );
this.popup.$element.addClass( 'oo-ui-popupTool-popup' );
@ -2049,6 +2053,7 @@ OO.ui.PopupToolGroup.prototype.onMouseKeyDown = function ( e ) {
*
* @protected
* @param {jQuery.Event} e Mouse up or key up event
* @return {undefined/boolean} False to prevent default if event is handled
*/
OO.ui.PopupToolGroup.prototype.onHandleMouseKeyUp = function ( e ) {
if (
@ -2064,6 +2069,7 @@ OO.ui.PopupToolGroup.prototype.onHandleMouseKeyUp = function ( e ) {
*
* @protected
* @param {jQuery.Event} e Mouse down or key down event
* @return {undefined/boolean} False to prevent default if event is handled
*/
OO.ui.PopupToolGroup.prototype.onHandleMouseKeyDown = function ( e ) {
var $focusable;

File diff suppressed because one or more lines are too long

View file

@ -1,12 +1,12 @@
/*!
* OOUI v0.29.3
* OOUI v0.29.4
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 20112018 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: 2018-11-01T02:03:40Z
* Date: 2018-11-07T00:58:38Z
*/
.oo-ui-draggableElement-handle:not( .oo-ui-draggableElement-undraggable ).oo-ui-widget {
cursor: move;
@ -877,6 +877,28 @@
outline: 0;
box-shadow: 0 0 2px 2px #ace;
}
.oo-ui-tagMultiselectWidget.oo-ui-widget-enabled.oo-ui-tagMultiselectWidget-inlined.oo-ui-flaggedElement-invalid .oo-ui-tagMultiselectWidget-handle,
.oo-ui-tagMultiselectWidget.oo-ui-widget-enabled.oo-ui-tagMultiselectWidget-inlined.oo-ui-flaggedElement-invalid:hover .oo-ui-tagMultiselectWidget-handle {
border-color: #d45353;
}
.oo-ui-tagMultiselectWidget.oo-ui-widget-enabled.oo-ui-tagMultiselectWidget-outlined .oo-ui-tagMultiselectWidget-handle {
border-bottom: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
.oo-ui-tagMultiselectWidget.oo-ui-widget-enabled.oo-ui-tagMultiselectWidget-outlined .oo-ui-tagItemWidget.oo-ui-widget-enabled {
background-color: #fff;
}
.oo-ui-tagMultiselectWidget.oo-ui-widget-enabled.oo-ui-tagMultiselectWidget-outlined .oo-ui-inputWidget-input {
border-top-left-radius: 0;
border-top-right-radius: 0;
}
.oo-ui-tagMultiselectWidget.oo-ui-widget-enabled.oo-ui-tagMultiselectWidget-outlined.oo-ui-flaggedElement-invalid .oo-ui-inputWidget-input {
border-color: #d45353;
}
.oo-ui-tagMultiselectWidget.oo-ui-widget-enabled.oo-ui-flaggedElement-invalid .oo-ui-inputWidget-input {
color: #d45353;
}
.oo-ui-tagMultiselectWidget.oo-ui-widget-disabled .oo-ui-tagMultiselectWidget-handle {
color: #ccc;
text-shadow: 0 1px 1px #fff;

View file

@ -1,12 +1,12 @@
/*!
* OOUI v0.29.3
* OOUI v0.29.4
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 20112018 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: 2018-11-01T02:03:40Z
* Date: 2018-11-07T00:58:38Z
*/
.oo-ui-draggableElement-handle:not( .oo-ui-draggableElement-undraggable ).oo-ui-widget {
cursor: move;
@ -954,6 +954,10 @@
outline: 0;
box-shadow: inset 0 0 0 1px #36c;
}
.oo-ui-tagMultiselectWidget.oo-ui-widget-enabled.oo-ui-tagMultiselectWidget-inlined.oo-ui-flaggedElement-invalid .oo-ui-tagMultiselectWidget-handle,
.oo-ui-tagMultiselectWidget.oo-ui-widget-enabled.oo-ui-tagMultiselectWidget-inlined.oo-ui-flaggedElement-invalid:hover .oo-ui-tagMultiselectWidget-handle {
border-color: #d33;
}
.oo-ui-tagMultiselectWidget.oo-ui-widget-enabled.oo-ui-tagMultiselectWidget-outlined .oo-ui-tagMultiselectWidget-handle {
background-color: #f8f9fa;
border-bottom: 0;
@ -967,6 +971,12 @@
border-top-left-radius: 0;
border-top-right-radius: 0;
}
.oo-ui-tagMultiselectWidget.oo-ui-widget-enabled.oo-ui-tagMultiselectWidget-outlined.oo-ui-flaggedElement-invalid .oo-ui-inputWidget-input {
border-color: #d33;
}
.oo-ui-tagMultiselectWidget.oo-ui-widget-enabled.oo-ui-flaggedElement-invalid .oo-ui-inputWidget-input {
color: #d33;
}
.oo-ui-tagMultiselectWidget.oo-ui-widget-disabled .oo-ui-tagMultiselectWidget-handle {
color: #72777d;
text-shadow: 0 1px 1px #fff;

View file

@ -1,12 +1,12 @@
/*!
* OOUI v0.29.3
* OOUI v0.29.4
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 20112018 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: 2018-11-01T02:03:33Z
* Date: 2018-11-07T00:58:30Z
*/
( function ( OO ) {
@ -383,6 +383,7 @@ OO.ui.mixin.DraggableGroupElement.prototype.updateIndexes = function () {
*
* @private
* @param {OO.ui.mixin.DraggableElement} item Dropped item
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.mixin.DraggableGroupElement.prototype.onItemDropOrDragEnd = function () {
var targetIndex, originalIndex,
@ -789,6 +790,7 @@ OO.ui.mixin.LookupElement.prototype.setLookupsDisabled = function ( disabled ) {
*
* @private
* @chainable
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.mixin.LookupElement.prototype.openLookupMenu = function () {
if ( !this.lookupMenu.isEmpty() ) {
@ -802,6 +804,7 @@ OO.ui.mixin.LookupElement.prototype.openLookupMenu = function () {
*
* @private
* @chainable
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.mixin.LookupElement.prototype.closeLookupMenu = function () {
this.lookupMenu.toggle( false );
@ -818,6 +821,7 @@ OO.ui.mixin.LookupElement.prototype.closeLookupMenu = function () {
*
* @private
* @chainable
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.mixin.LookupElement.prototype.populateLookupMenu = function () {
var widget = this,
@ -931,6 +935,7 @@ OO.ui.mixin.LookupElement.prototype.getLookupMenuOptionsFromData = null;
*
* @param {boolean} readOnly Make input read-only
* @chainable
* @return {OO.ui.Element} The element, for chaining
*/
OO.ui.mixin.LookupElement.prototype.setReadOnly = function ( readOnly ) {
// Parent method
@ -1068,6 +1073,7 @@ OO.ui.TabPanelLayout.prototype.getTabItem = function () {
*
* @param {OO.ui.TabOptionWidget|null} tabItem Tab option widget, null to clear
* @chainable
* @return {OO.ui.TabPanelLayout} The layout, for chaining
*/
OO.ui.TabPanelLayout.prototype.setTabItem = function ( tabItem ) {
this.tabItem = tabItem || null;
@ -1086,6 +1092,7 @@ OO.ui.TabPanelLayout.prototype.setTabItem = function ( tabItem ) {
*
* @param {OO.ui.TabOptionWidget} tabItem Tab option widget to set up
* @chainable
* @return {OO.ui.TabPanelLayout} The layout, for chaining
*/
OO.ui.TabPanelLayout.prototype.setupTabItem = function () {
this.$element.attr( 'aria-labelledby', this.tabItem.getElementId() );
@ -1214,6 +1221,7 @@ OO.ui.PageLayout.prototype.getOutlineItem = function () {
*
* @param {OO.ui.OutlineOptionWidget|null} outlineItem Outline option widget, null to clear
* @chainable
* @return {OO.ui.PageLayout} The layout, for chaining
*/
OO.ui.PageLayout.prototype.setOutlineItem = function ( outlineItem ) {
this.outlineItem = outlineItem || null;
@ -1232,6 +1240,7 @@ OO.ui.PageLayout.prototype.setOutlineItem = function ( outlineItem ) {
*
* @param {OO.ui.OutlineOptionWidget} outlineItem Outline option widget to set up
* @chainable
* @return {OO.ui.PageLayout} The layout, for chaining
*/
OO.ui.PageLayout.prototype.setupOutlineItem = function () {
return this;
@ -1426,6 +1435,7 @@ OO.ui.StackLayout.prototype.unsetCurrentItem = function () {
* @param {OO.ui.Layout[]} items Panels to add
* @param {number} [index] Index of the insertion point
* @chainable
* @return {OO.ui.StackLayout} The layout, for chaining
*/
OO.ui.StackLayout.prototype.addItems = function ( items, index ) {
// Update the visibility
@ -1449,6 +1459,7 @@ OO.ui.StackLayout.prototype.addItems = function ( items, index ) {
*
* @param {OO.ui.Layout[]} items Panels to remove
* @chainable
* @return {OO.ui.StackLayout} The layout, for chaining
* @fires set
*/
OO.ui.StackLayout.prototype.removeItems = function ( items ) {
@ -1473,6 +1484,7 @@ OO.ui.StackLayout.prototype.removeItems = function ( items ) {
* a subset of panels, use the #removeItems method.
*
* @chainable
* @return {OO.ui.StackLayout} The layout, for chaining
* @fires set
*/
OO.ui.StackLayout.prototype.clearItems = function () {
@ -1489,6 +1501,7 @@ OO.ui.StackLayout.prototype.clearItems = function () {
*
* @param {OO.ui.Layout} item Panel to show
* @chainable
* @return {OO.ui.StackLayout} The layout, for chaining
* @fires set
*/
OO.ui.StackLayout.prototype.setItem = function ( item ) {
@ -1688,6 +1701,7 @@ OO.inheritClass( OO.ui.MenuLayout, OO.ui.Layout );
*
* @param {boolean} showMenu Show menu, omit to toggle
* @chainable
* @return {OO.ui.MenuLayout} The layout, for chaining
*/
OO.ui.MenuLayout.prototype.toggleMenu = function ( showMenu ) {
showMenu = showMenu === undefined ? !this.showMenu : !!showMenu;
@ -1718,6 +1732,7 @@ OO.ui.MenuLayout.prototype.isMenuVisible = function () {
* @param {string} position Position of menu, either `top`, `after`, `bottom` or `before`
* @throws {Error} If position value is not supported
* @chainable
* @return {OO.ui.MenuLayout} The layout, for chaining
*/
OO.ui.MenuLayout.prototype.setMenuPosition = function ( position ) {
this.$element.removeClass( 'oo-ui-menuLayout-' + this.menuPosition );
@ -1754,7 +1769,7 @@ OO.ui.MenuLayout.prototype.setMenuPanel = function ( menuPanel ) {
/**
* Set the content panel.
*
* @param {OO.ui.PanelLayout} menuPanel Content panel
* @param {OO.ui.PanelLayout} contentPanel Content panel
*/
OO.ui.MenuLayout.prototype.setContentPanel = function ( contentPanel ) {
this.contentPanel = contentPanel;
@ -2083,6 +2098,7 @@ OO.ui.BookletLayout.prototype.isOutlineVisible = function () {
*
* @param {boolean} [show] Show outline, omit to invert current state
* @chainable
* @return {OO.ui.BookletLayout} The layout, for chaining
*/
OO.ui.BookletLayout.prototype.toggleOutline = function ( show ) {
var booklet = this;
@ -2198,6 +2214,7 @@ OO.ui.BookletLayout.prototype.getCurrentPageName = function () {
* @param {number} index Index of the insertion point
* @fires add
* @chainable
* @return {OO.ui.BookletLayout} The layout, for chaining
*/
OO.ui.BookletLayout.prototype.addPages = function ( pages, index ) {
var i, len, name, page, item, currentIndex,
@ -2253,6 +2270,7 @@ OO.ui.BookletLayout.prototype.addPages = function ( pages, index ) {
* @param {OO.ui.PageLayout[]} pages An array of pages to remove
* @fires remove
* @chainable
* @return {OO.ui.BookletLayout} The layout, for chaining
*/
OO.ui.BookletLayout.prototype.removePages = function ( pages ) {
var i, len, name, page,
@ -2284,6 +2302,7 @@ OO.ui.BookletLayout.prototype.removePages = function ( pages ) {
*
* @fires remove
* @chainable
* @return {OO.ui.BookletLayout} The layout, for chaining
*/
OO.ui.BookletLayout.prototype.clearPages = function () {
var i, len,
@ -2379,6 +2398,7 @@ OO.ui.BookletLayout.prototype.resetScroll = function () {
* Select the first selectable page.
*
* @chainable
* @return {OO.ui.BookletLayout} The layout, for chaining
*/
OO.ui.BookletLayout.prototype.selectFirstSelectablePage = function () {
if ( !this.outlineSelectWidget.findSelectedItem() ) {
@ -2668,6 +2688,7 @@ OO.ui.IndexLayout.prototype.getCurrentTabPanelName = function () {
* @param {number} index Index of the insertion point
* @fires add
* @chainable
* @return {OO.ui.BookletLayout} The layout, for chaining
*/
OO.ui.IndexLayout.prototype.addTabPanels = function ( tabPanels, index ) {
var i, len, name, tabPanel, item, currentIndex,
@ -2721,6 +2742,7 @@ OO.ui.IndexLayout.prototype.addTabPanels = function ( tabPanels, index ) {
* @param {OO.ui.TabPanelLayout[]} tabPanels An array of tab panels to remove
* @fires remove
* @chainable
* @return {OO.ui.BookletLayout} The layout, for chaining
*/
OO.ui.IndexLayout.prototype.removeTabPanels = function ( tabPanels ) {
var i, len, name, tabPanel,
@ -2750,6 +2772,7 @@ OO.ui.IndexLayout.prototype.removeTabPanels = function ( tabPanels ) {
*
* @fires remove
* @chainable
* @return {OO.ui.BookletLayout} The layout, for chaining
*/
OO.ui.IndexLayout.prototype.clearTabPanels = function () {
var i, len,
@ -2825,6 +2848,7 @@ OO.ui.IndexLayout.prototype.setTabPanel = function ( name ) {
* Select the first selectable tab panel.
*
* @chainable
* @return {OO.ui.BookletLayout} The layout, for chaining
*/
OO.ui.IndexLayout.prototype.selectFirstSelectableTabPanel = function () {
if ( !this.tabSelectWidget.findSelectedItem() ) {
@ -2893,6 +2917,7 @@ OO.ui.ToggleWidget.prototype.getValue = function () {
* @param {boolean} value The state of the toggle
* @fires change
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.ToggleWidget.prototype.setValue = function ( value ) {
value = !!value;
@ -3100,6 +3125,7 @@ OO.mixinClass( OO.ui.ToggleSwitchWidget, OO.ui.mixin.TabIndexedElement );
*
* @private
* @param {jQuery.Event} e Mouse click event
* @return {undefined/boolean} False to prevent default if event is handled
*/
OO.ui.ToggleSwitchWidget.prototype.onClick = function ( e ) {
if ( !this.isDisabled() && e.which === OO.ui.MouseButtons.LEFT ) {
@ -3113,6 +3139,7 @@ OO.ui.ToggleSwitchWidget.prototype.onClick = function ( e ) {
*
* @private
* @param {jQuery.Event} e Key press event
* @return {undefined/boolean} False to prevent default if event is handled
*/
OO.ui.ToggleSwitchWidget.prototype.onKeyPress = function ( e ) {
if ( !this.isDisabled() && ( e.which === OO.ui.Keys.SPACE || e.which === OO.ui.Keys.ENTER ) ) {
@ -3396,6 +3423,7 @@ OO.ui.OutlineOptionWidget.prototype.setPressed = function ( state ) {
*
* @param {boolean} movable Item is movable
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.OutlineOptionWidget.prototype.setMovable = function ( movable ) {
this.movable = !!movable;
@ -3410,6 +3438,7 @@ OO.ui.OutlineOptionWidget.prototype.setMovable = function ( movable ) {
*
* @param {boolean} removable Item is removable
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.OutlineOptionWidget.prototype.setRemovable = function ( removable ) {
this.removable = !!removable;
@ -3430,6 +3459,7 @@ OO.ui.OutlineOptionWidget.prototype.setSelected = function ( state ) {
*
* @param {number} [level=0] Indentation level, in the range of [0,#maxLevel]
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.OutlineOptionWidget.prototype.setLevel = function ( level ) {
var levels = this.constructor.static.levels,
@ -3812,6 +3842,7 @@ OO.mixinClass( OO.ui.TagItemWidget, OO.ui.mixin.DraggableElement );
*
* @param {string} [state] Item is fixed
* @fires fixed
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.TagItemWidget.prototype.setFixed = function ( state ) {
state = state === undefined ? !this.fixed : !!state;
@ -3836,6 +3867,7 @@ OO.ui.TagItemWidget.prototype.setFixed = function ( state ) {
/**
* Check whether the item is fixed
* @return {boolean}
*/
OO.ui.TagItemWidget.prototype.isFixed = function () {
return this.fixed;
@ -4013,6 +4045,10 @@ OO.ui.TagItemWidget.prototype.isValid = function () {
* invalid tags. These tags will display with an invalid state, and
* the widget as a whole will have an invalid state if any invalid tags
* are present.
* @cfg {number} [limit] An optional limit on the number of selected options.
* If the limit exists and is reached, the input is disabled, not allowing
* for any additions. If the limit is unset or is 0, an unlimited number
* of items can be added.
* @cfg {boolean} [allowReordering=true] Allow reordering of the items
* @cfg {Object[]|String[]} [selected] A set of selected tags. If given,
* these will appear in the tag list on initialization, as long as they
@ -4052,6 +4088,7 @@ OO.ui.TagMultiselectWidget = function OoUiTagMultiselectWidget( config ) {
this.allowedValues = config.allowedValues || [];
this.allowDisplayInvalidTags = config.allowDisplayInvalidTags;
this.hasInput = this.inputPosition !== 'none';
this.limit = config.limit;
this.height = null;
this.valid = true;
@ -4113,6 +4150,7 @@ OO.ui.TagMultiselectWidget = function OoUiTagMultiselectWidget( config ) {
};
this.input.$input.on( inputEvents );
this.inputPlaceholder = this.input.$input.attr( 'placeholder' );
if ( this.inputPosition === 'outline' ) {
// Override max-height for the input widget
@ -4284,6 +4322,8 @@ OO.ui.TagMultiselectWidget.prototype.onInputKeyDown = function ( e ) {
*/
OO.ui.TagMultiselectWidget.prototype.onInputFocus = function () {
this.$element.addClass( 'oo-ui-tagMultiselectWidget-focus' );
// Reset validity
this.toggleValid( true );
};
/**
@ -4291,6 +4331,10 @@ OO.ui.TagMultiselectWidget.prototype.onInputFocus = function () {
*/
OO.ui.TagMultiselectWidget.prototype.onInputBlur = function () {
this.$element.removeClass( 'oo-ui-tagMultiselectWidget-focus' );
// Set the widget as invalid if there's text in the input
this.addTagFromInput();
this.toggleValid( this.checkValidity() && ( !this.hasInput || !this.input.getValue() ) );
};
/**
@ -4409,9 +4453,29 @@ OO.ui.TagMultiselectWidget.prototype.onTagFixed = function ( item ) {
* Respond to change event, where items were added, removed, or cleared.
*/
OO.ui.TagMultiselectWidget.prototype.onChangeTags = function () {
this.toggleValid( this.checkValidity() );
var isUnderLimit = this.isUnderLimit();
// Reset validity
this.toggleValid(
this.checkValidity() &&
( !this.hasInput || !this.input.getValue() )
);
if ( this.hasInput ) {
this.updateInputSize();
if ( !isUnderLimit ) {
// Clear the input
this.input.setValue( '' );
}
if ( this.inputPosition === 'outline' ) {
// Show/clear the placeholder and enable/disable the input
// based on whether we are/aren't under the specified limit
this.input.$input.attr( 'placeholder', isUnderLimit ? this.inputPlaceholder : '' );
this.input.setDisabled( !isUnderLimit );
} else {
// Show/hide the input
this.input.$input.toggleClass( 'oo-ui-element-hidden', !isUnderLimit );
}
}
this.updateIfHeightChanged();
};
@ -4424,7 +4488,7 @@ OO.ui.TagMultiselectWidget.prototype.setDisabled = function ( isDisabled ) {
OO.ui.TagMultiselectWidget.parent.prototype.setDisabled.call( this, isDisabled );
if ( this.hasInput && this.input ) {
this.input.setDisabled( !!isDisabled );
this.input.setDisabled( !!isDisabled && !this.isUnderLimit() );
}
if ( this.items ) {
@ -4472,9 +4536,8 @@ OO.ui.TagMultiselectWidget.prototype.addTagFromInput = function () {
}
if ( isValid || this.allowDisplayInvalidTags ) {
this.addTag( val );
this.clearInput();
this.focus();
this.addTag( val );
}
};
@ -4572,8 +4635,8 @@ OO.ui.TagMultiselectWidget.prototype.getValue = function () {
* { data: 'foo', label: 'Foo item' }
* For multiple items, use an array of objects. For example:
* [
* { data: 'foo', label: 'Foo item' },
* { data: 'bar', label: 'Bar item' }
* { data: 'foo', label: 'Foo item' },
* { data: 'bar', label: 'Bar item' }
* ]
* Value can also be added with plaintext array, for example:
* [ 'foo', 'bar', 'bla' ] or a single string, like 'foo'
@ -4603,15 +4666,28 @@ OO.ui.TagMultiselectWidget.prototype.addTag = function ( data, label ) {
var newItemWidget,
isValid = this.isAllowedData( data );
if ( isValid || this.allowDisplayInvalidTags ) {
if ( this.isUnderLimit() && ( isValid || this.allowDisplayInvalidTags ) ) {
newItemWidget = this.createTagItemWidget( data, label );
newItemWidget.toggleValid( isValid );
this.addItems( [ newItemWidget ] );
return true;
}
return false;
};
/**
* Check whether the current tags are under the limit. Returns true
* if there is no limit set.
*
* @return {boolean} True if current tag count is under the limit
* or if there is no limit set
*/
OO.ui.TagMultiselectWidget.prototype.isUnderLimit = function () {
return !this.limit ||
this.getItemCount() < this.limit;
};
/**
* Remove tag by its data property.
*
@ -5072,6 +5148,16 @@ OO.ui.MenuTagMultiselectWidget.prototype.onInputFocus = function () {
this.menu.toggle( true );
};
/**
* @inheritdoc
*/
OO.ui.MenuTagMultiselectWidget.prototype.onInputBlur = function () {
// Parent method
OO.ui.MenuTagMultiselectWidget.parent.prototype.onInputBlur.call( this );
this.menu.toggle( false );
};
/**
* Respond to input change event
*/
@ -5188,7 +5274,6 @@ OO.ui.MenuTagMultiselectWidget.prototype.addTagFromInput = function () {
if ( validated ) {
this.clearInput();
this.focus();
}
};
@ -5468,6 +5553,7 @@ OO.ui.SelectFileWidget.prototype.setValue = function ( file ) {
* Focusses the select file button.
*
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.SelectFileWidget.prototype.focus = function () {
this.selectButton.focus();
@ -5478,6 +5564,7 @@ OO.ui.SelectFileWidget.prototype.focus = function () {
* Blur the widget.
*
* @chainable
* @return {OO.ui.Widget} The widget, for chaining
*/
OO.ui.SelectFileWidget.prototype.blur = function () {
this.selectButton.blur();
@ -5665,6 +5752,7 @@ OO.ui.SelectFileWidget.prototype.onFileSelected = function ( e ) {
* Handle clear button click events.
*
* @private
* @return {undefined/boolean} False to prevent default if event is handled
*/
OO.ui.SelectFileWidget.prototype.onClearClick = function () {
this.setValue( null );
@ -5676,6 +5764,7 @@ OO.ui.SelectFileWidget.prototype.onClearClick = function () {
*
* @private
* @param {jQuery.Event} e Key press event
* @return {undefined/boolean} False to prevent default if event is handled
*/
OO.ui.SelectFileWidget.prototype.onKeyPress = function ( e ) {
if ( this.isSupported && !this.isDisabled() && this.$input &&
@ -5691,6 +5780,7 @@ OO.ui.SelectFileWidget.prototype.onKeyPress = function ( e ) {
*
* @private
* @param {jQuery.Event} e Key press event
* @return {undefined/boolean} False to prevent default if event is handled
*/
OO.ui.SelectFileWidget.prototype.onDropTargetClick = function () {
if ( this.isSupported && !this.isDisabled() && this.$input ) {
@ -5704,6 +5794,7 @@ OO.ui.SelectFileWidget.prototype.onDropTargetClick = function () {
*
* @private
* @param {jQuery.Event} e Drag event
* @return {undefined/boolean} False to prevent default if event is handled
*/
OO.ui.SelectFileWidget.prototype.onDragEnterOrOver = function ( e ) {
var itemOrFile,
@ -5757,6 +5848,7 @@ OO.ui.SelectFileWidget.prototype.onDragLeave = function () {
*
* @private
* @param {jQuery.Event} e Drop event
* @return {undefined/boolean} False to prevent default if event is handled
*/
OO.ui.SelectFileWidget.prototype.onDrop = function ( e ) {
var file = null,

File diff suppressed because one or more lines are too long

View file

@ -1,12 +1,12 @@
/*!
* OOUI v0.29.3
* OOUI v0.29.4
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 20112018 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: 2018-11-01T02:03:33Z
* Date: 2018-11-07T00:58:30Z
*/
( function ( OO ) {

View file

@ -1,12 +1,12 @@
/*!
* OOUI v0.29.3
* OOUI v0.29.4
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 20112018 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: 2018-11-01T02:03:40Z
* Date: 2018-11-07T00:58:38Z
*/
.oo-ui-actionWidget.oo-ui-pendingElement-pending {
background-image: /* @embed */ url(themes/wikimediaui/images/textures/pending.gif);

View file

@ -1,12 +1,12 @@
/*!
* OOUI v0.29.3
* OOUI v0.29.4
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 20112018 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: 2018-11-01T02:03:40Z
* Date: 2018-11-07T00:58:38Z
*/
.oo-ui-window {

View file

@ -1,12 +1,12 @@
/*!
* OOUI v0.29.3
* OOUI v0.29.4
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 20112018 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: 2018-11-01T02:03:33Z
* Date: 2018-11-07T00:58:30Z
*/
( function ( OO ) {
@ -381,6 +381,7 @@ OO.ui.ActionSet.prototype.getOthers = function () {
* @param {string} mode The mode. Only actions configured to be available in the specified
* mode will be made visible.
* @chainable
* @return {OO.ui.ActionSet} The widget, for chaining
* @fires toggle
* @fires change
*/
@ -410,6 +411,7 @@ OO.ui.ActionSet.prototype.setMode = function ( mode ) {
* @param {Object.<string,boolean>} actions A list keyed by action name with boolean
* values that indicate whether or not the action should be enabled.
* @chainable
* @return {OO.ui.ActionSet} The widget, for chaining
*/
OO.ui.ActionSet.prototype.setAbilities = function ( actions ) {
var i, len, action, item;
@ -435,6 +437,7 @@ OO.ui.ActionSet.prototype.setAbilities = function ( actions ) {
* @param {Function} callback Callback to run for each action; callback is invoked with three
* arguments: the action, the action's index, the list of actions being iterated over
* @chainable
* @return {OO.ui.ActionSet} The widget, for chaining
*/
OO.ui.ActionSet.prototype.forEach = function ( filter, callback ) {
this.changed = false;
@ -453,6 +456,7 @@ OO.ui.ActionSet.prototype.forEach = function ( filter, callback ) {
*
* @param {OO.ui.ActionWidget[]} actions Action widgets to add
* @chainable
* @return {OO.ui.ActionSet} The widget, for chaining
* @fires add
* @fires change
*/
@ -483,6 +487,7 @@ OO.ui.ActionSet.prototype.add = function ( actions ) {
*
* @param {OO.ui.ActionWidget[]} actions Action widgets to remove
* @chainable
* @return {OO.ui.ActionSet} The widget, for chaining
* @fires remove
* @fires change
*/
@ -512,6 +517,7 @@ OO.ui.ActionSet.prototype.remove = function ( actions ) {
* To remove only specified actions, use the {@link #method-remove remove} method instead.
*
* @chainable
* @return {OO.ui.ActionSet} The widget, for chaining
* @fires remove
* @fires change
*/
@ -543,6 +549,7 @@ OO.ui.ActionSet.prototype.clear = function () {
*
* @private
* @chainable
* @return {OO.ui.ActionSet} The widget, for chaining
*/
OO.ui.ActionSet.prototype.organize = function () {
var i, iLen, j, jLen, flag, action, category, list, item, special,
@ -1294,6 +1301,7 @@ OO.ui.WindowManager.prototype.getCurrentWindow = function () {
return this.currentWindow;
};
/* eslint-disable valid-jsdoc */
/**
* Open a window.
*
@ -1308,6 +1316,7 @@ OO.ui.WindowManager.prototype.getCurrentWindow = function () {
* @fires opening
*/
OO.ui.WindowManager.prototype.openWindow = function ( win, data, lifecycle, compatOpening ) {
/* eslint-enable valid-jsdoc */
var error,
manager = this;
data = data || {};
@ -1624,6 +1633,7 @@ OO.ui.WindowManager.prototype.clearWindows = function () {
*
* @param {OO.ui.Window} win Window to update, should be the current window
* @chainable
* @return {OO.ui.WindowManager} The manager, for chaining
*/
OO.ui.WindowManager.prototype.updateWindowSize = function ( win ) {
var isFullscreen;
@ -1650,6 +1660,7 @@ OO.ui.WindowManager.prototype.updateWindowSize = function ( win ) {
* @private
* @param {boolean} [on] Bind global events
* @chainable
* @return {OO.ui.WindowManager} The manager, for chaining
*/
OO.ui.WindowManager.prototype.toggleGlobalEvents = function ( on ) {
var scrollWidth, bodyMargin,
@ -1671,6 +1682,7 @@ OO.ui.WindowManager.prototype.toggleGlobalEvents = function ( on ) {
bodyMargin = parseFloat( $body.css( 'margin-right' ) ) || 0;
$body.css( {
overflow: 'hidden',
position: 'relative',
'margin-right': bodyMargin + scrollWidth
} );
}
@ -1686,6 +1698,7 @@ OO.ui.WindowManager.prototype.toggleGlobalEvents = function ( on ) {
if ( stackDepth === 0 ) {
$body.css( {
overflow: '',
position: '',
'margin-right': ''
} );
}
@ -1702,6 +1715,7 @@ OO.ui.WindowManager.prototype.toggleGlobalEvents = function ( on ) {
* @private
* @param {boolean} [isolate] Make only the window manager visible to screen readers
* @chainable
* @return {OO.ui.WindowManager} The manager, for chaining
*/
OO.ui.WindowManager.prototype.toggleAriaIsolation = function ( isolate ) {
var $topLevelElement;
@ -1881,6 +1895,7 @@ OO.ui.Window.static.size = 'medium';
*
* @private
* @param {jQuery.Event} e Mouse down event
* @return {OO.ui.Window} The window, for chaining
*/
OO.ui.Window.prototype.onMouseDown = function ( e ) {
// Prevent clicking on the click-block from stealing focus
@ -2160,6 +2175,7 @@ OO.ui.Window.prototype.getTeardownProcess = function () {
* @param {OO.ui.WindowManager} manager Manager for this window
* @throws {Error} An error is thrown if the method is called more than once
* @chainable
* @return {OO.ui.Window} The window, for chaining
*/
OO.ui.Window.prototype.setManager = function ( manager ) {
if ( this.manager ) {
@ -2178,6 +2194,7 @@ OO.ui.Window.prototype.setManager = function ( manager ) {
* @param {string} size Symbolic name of size: `small`, `medium`, `large`, `larger` or
* `full`
* @chainable
* @return {OO.ui.Window} The window, for chaining
*/
OO.ui.Window.prototype.setSize = function ( size ) {
this.size = size;
@ -2190,6 +2207,7 @@ OO.ui.Window.prototype.setSize = function ( size ) {
*
* @throws {Error} An error is thrown if the window is not attached to a window manager
* @chainable
* @return {OO.ui.Window} The window, for chaining
*/
OO.ui.Window.prototype.updateSize = function () {
if ( !this.manager ) {
@ -2215,6 +2233,7 @@ OO.ui.Window.prototype.updateSize = function () {
* @param {string|number} [dim.minHeight] Minimum height
* @param {string|number} [dim.maxHeight] Maximum height
* @chainable
* @return {OO.ui.Window} The window, for chaining
*/
OO.ui.Window.prototype.setDimensions = function ( dim ) {
var height,
@ -2255,6 +2274,7 @@ OO.ui.Window.prototype.setDimensions = function ( dim ) {
*
* @throws {Error} An error is thrown if the window is not attached to a window manager
* @chainable
* @return {OO.ui.Window} The window, for chaining
*/
OO.ui.Window.prototype.initialize = function () {
if ( !this.manager ) {
@ -2756,6 +2776,7 @@ OO.ui.Dialog.prototype.attachActions = function () {
*
* @protected
* @chainable
* @return {OO.ui.Dialog} The dialog, for chaining
*/
OO.ui.Dialog.prototype.detachActions = function () {
var i, len;
@ -2765,6 +2786,8 @@ OO.ui.Dialog.prototype.detachActions = function () {
this.attachedActions[ i ].$element.detach();
}
this.attachedActions = [];
return this;
};
/**
@ -2892,6 +2915,7 @@ OO.ui.MessageDialog.static.actions = [
* @private
* @param {boolean} [value] Layout actions vertically, omit to toggle
* @chainable
* @return {OO.ui.MessageDialog} The dialog, for chaining
*/
OO.ui.MessageDialog.prototype.toggleVerticalActionLayout = function ( value ) {
value = value === undefined ? !this.verticalActionLayout : !!value;
@ -3347,6 +3371,7 @@ OO.ui.ProcessDialog.prototype.setDimensions = function () {
*
* @private
* @chainable
* @return {OO.ui.MessageDialog} The dialog, for chaining
*/
OO.ui.ProcessDialog.prototype.fitLabel = function () {
var safeWidth, primaryWidth, biggerWidth, labelWidth, navigationWidth, leftWidth, rightWidth,

File diff suppressed because one or more lines are too long