X-Git-Url: https://git.cyclocoop.org/admin/?a=blobdiff_plain;f=resources%2Flib%2Foojs-ui%2Foojs-ui-toolbars.js;h=83a4c94e34b88ce93868f4cabbb04f26ed464190;hb=5a30e36b69175e475292d168a2f0dc64ce863357;hp=aba8e37cd39b88c4cc278aa8cb932b0f69942d5f;hpb=fb79f30319b9ad2a7eb0f5f4d1668143ec8f963e;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/lib/oojs-ui/oojs-ui-toolbars.js b/resources/lib/oojs-ui/oojs-ui-toolbars.js index aba8e37cd3..83a4c94e34 100644 --- a/resources/lib/oojs-ui/oojs-ui-toolbars.js +++ b/resources/lib/oojs-ui/oojs-ui-toolbars.js @@ -1,12 +1,12 @@ /*! - * OOjs UI v0.22.4 + * OOjs UI v0.23.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-08-03T19:36:51Z + * Date: 2017-09-20T00:31:56Z */ ( function ( OO ) { @@ -631,7 +631,7 @@ OO.ui.Tool = function OoUiTool( toolGroup, config ) { this.$element .data( 'oo-ui-tool', this ) .addClass( 'oo-ui-tool' ) - .addClass( 'oo-ui-tool-name-' + this.constructor.static.name.replace( /^([^\/]+)\/([^\/]+).*$/, '$1-$2' ) ) + .addClass( 'oo-ui-tool-name-' + this.constructor.static.name.replace( /^([^/]+)\/([^/]+).*$/, '$1-$2' ) ) .toggleClass( 'oo-ui-tool-with-label', this.constructor.static.displayBothIconAndLabel ) .append( this.$link ); this.setTitle( config.title || this.constructor.static.title ); @@ -1037,7 +1037,7 @@ OO.ui.ToolGroup.prototype.onMouseKeyDown = function ( e ) { !this.isDisabled() && ( e.which === OO.ui.MouseButtons.LEFT || e.which === OO.ui.Keys.SPACE || e.which === OO.ui.Keys.ENTER ) ) { - this.pressed = this.getTargetTool( e ); + this.pressed = this.findTargetTool( e ); if ( this.pressed ) { this.pressed.setActive( true ); this.getElementDocument().addEventListener( 'mouseup', this.onCapturedMouseKeyUpHandler, true ); @@ -1068,7 +1068,7 @@ OO.ui.ToolGroup.prototype.onCapturedMouseKeyUp = function ( e ) { * @param {MouseEvent|KeyboardEvent} e Mouse up or key up event */ OO.ui.ToolGroup.prototype.onMouseKeyUp = function ( e ) { - var tool = this.getTargetTool( e ); + var tool = this.findTargetTool( e ); if ( !this.isDisabled() && this.pressed && this.pressed === tool && @@ -1090,7 +1090,7 @@ OO.ui.ToolGroup.prototype.onMouseKeyUp = function ( e ) { * @param {jQuery.Event} e Mouse over or focus event */ OO.ui.ToolGroup.prototype.onMouseOverFocus = function ( e ) { - var tool = this.getTargetTool( e ); + var tool = this.findTargetTool( e ); if ( this.pressed && this.pressed === tool ) { this.pressed.setActive( true ); @@ -1104,7 +1104,7 @@ OO.ui.ToolGroup.prototype.onMouseOverFocus = function ( e ) { * @param {jQuery.Event} e Mouse out or blur event */ OO.ui.ToolGroup.prototype.onMouseOutBlur = function ( e ) { - var tool = this.getTargetTool( e ); + var tool = this.findTargetTool( e ); if ( this.pressed && this.pressed === tool ) { this.pressed.setActive( false ); @@ -1121,7 +1121,7 @@ OO.ui.ToolGroup.prototype.onMouseOutBlur = function ( e ) { * @param {jQuery.Event} e * @return {OO.ui.Tool|null} Tool, `null` if none was found */ -OO.ui.ToolGroup.prototype.getTargetTool = function ( e ) { +OO.ui.ToolGroup.prototype.findTargetTool = function ( e ) { var tool, $item = $( e.target ).closest( '.oo-ui-tool-link' ); @@ -1890,7 +1890,7 @@ OO.ui.PopupToolGroup.prototype.onBlur = function ( e ) { OO.ui.PopupToolGroup.prototype.onMouseKeyUp = function ( e ) { // Only close toolgroup when a tool was actually selected if ( - !this.isDisabled() && this.pressed && this.pressed === this.getTargetTool( e ) && + !this.isDisabled() && this.pressed && this.pressed === this.findTargetTool( e ) && ( e.which === OO.ui.MouseButtons.LEFT || e.which === OO.ui.Keys.SPACE || e.which === OO.ui.Keys.ENTER ) ) { this.setActive( false );