X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=resources%2Flib%2Foojs-ui%2Foojs-ui-widgets.js;h=8242c86c7dfb47afa3e9c533c64d151ae58551dc;hp=636e3f58b7d4f2650de07700e87d4f9c94334be2;hb=b47fbb4fde9ddddc6f94d07638150834d49bc73b;hpb=afb713a1fa51bb194d4ffac2d495796c0030fc14 diff --git a/resources/lib/oojs-ui/oojs-ui-widgets.js b/resources/lib/oojs-ui/oojs-ui-widgets.js index 636e3f58b7..8242c86c7d 100644 --- a/resources/lib/oojs-ui/oojs-ui-widgets.js +++ b/resources/lib/oojs-ui/oojs-ui-widgets.js @@ -1,12 +1,12 @@ /*! - * OOjs UI v0.17.10 + * OOjs UI v0.18.1 * 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-10-03T18:59:01Z + * Date: 2016-11-29T22:57:37Z */ ( function ( OO ) { @@ -85,7 +85,7 @@ OO.ui.mixin.DraggableElement.static.cancelButtonMouseDownEvents = false; * Respond to mousedown event. * * @private - * @param {jQuery.Event} e jQuery event + * @param {jQuery.Event} e Drag event */ OO.ui.mixin.DraggableElement.prototype.onDragMouseDown = function ( e ) { this.wasHandleUsed = @@ -99,7 +99,8 @@ OO.ui.mixin.DraggableElement.prototype.onDragMouseDown = function ( e ) { * Respond to dragstart event. * * @private - * @param {jQuery.Event} e jQuery event + * @param {jQuery.Event} e Drag event + * @return {boolean} False if the event is cancelled * @fires dragstart */ OO.ui.mixin.DraggableElement.prototype.onDragStart = function ( e ) { @@ -149,7 +150,7 @@ OO.ui.mixin.DraggableElement.prototype.onDragEnd = function () { * Handle drop event. * * @private - * @param {jQuery.Event} e jQuery event + * @param {jQuery.Event} e Drop event * @fires drop */ OO.ui.mixin.DraggableElement.prototype.onDrop = function ( e ) { @@ -161,6 +162,7 @@ OO.ui.mixin.DraggableElement.prototype.onDrop = function ( e ) { * In order for drag/drop to work, the dragover event must * return false and stop propogation. * + * @param {jQuery.Event} e Drag event * @private */ OO.ui.mixin.DraggableElement.prototype.onDragOver = function ( e ) { @@ -3103,13 +3105,10 @@ OO.ui.OutlineOptionWidget.prototype.getLevel = function () { */ OO.ui.OutlineOptionWidget.prototype.setPressed = function ( state ) { OO.ui.OutlineOptionWidget.parent.prototype.setPressed.call( this, state ); - if ( this.constructor.static.pressable ) { - this.pressed = !!state; - if ( this.pressed ) { - this.setFlags( 'progressive' ); - } else if ( !this.selected ) { - this.clearFlags(); - } + if ( this.pressed ) { + this.setFlags( 'progressive' ); + } else if ( !this.selected ) { + this.clearFlags(); } return this; }; @@ -3147,13 +3146,10 @@ OO.ui.OutlineOptionWidget.prototype.setRemovable = function ( removable ) { */ OO.ui.OutlineOptionWidget.prototype.setSelected = function ( state ) { OO.ui.OutlineOptionWidget.parent.prototype.setSelected.call( this, state ); - if ( this.constructor.static.selectable ) { - this.selected = !!state; - if ( this.selected ) { - this.setFlags( 'progressive' ); - } else { - this.clearFlags(); - } + if ( this.selected ) { + this.setFlags( 'progressive' ); + } else { + this.clearFlags(); } return this; }; @@ -3496,6 +3492,8 @@ OO.ui.CapsuleItemWidget.prototype.onClick = function () { /** * Handle keyDown event for the entire capsule + * + * @param {jQuery.Event} e Key down event */ OO.ui.CapsuleItemWidget.prototype.onKeyDown = function ( e ) { var element = this.getElementGroup(); @@ -3573,6 +3571,7 @@ OO.ui.CapsuleItemWidget.prototype.focus = function () { * * @constructor * @param {Object} [config] Configuration options + * @cfg {string} [placeholder] Placeholder text * @cfg {boolean} [allowArbitrary=false] Allow data items to be added even if not present in the menu. * @cfg {Object} [menu] (required) Configuration options to pass to the * {@link OO.ui.MenuSelectWidget menu select widget}. @@ -3599,8 +3598,11 @@ OO.ui.CapsuleMultiselectWidget = function OoUiCapsuleMultiselectWidget( config ) }, config ); // Properties (must be set before mixin constructor calls) - this.$input = config.popup ? null : $( '' ); this.$handle = $( '