diff options
author | James D. Forrester <jforrester@wikimedia.org> | 2014-04-16 18:45:37 -0700 |
---|---|---|
committer | James D. Forrester <jforrester@wikimedia.org> | 2014-04-16 18:45:37 -0700 |
commit | dd877c916a4588dc6a59e4e6b37d5e633b2505ab (patch) | |
tree | 6e943fcd99567ddcc33afce9a3e9192ff952c3bd /resources/lib/oojs-ui/oojs-ui.js | |
parent | 4750d6a69bfc193e1a87373ab10f192c557e3a80 (diff) | |
download | mediawikicore-dd877c916a4588dc6a59e4e6b37d5e633b2505ab.tar.gz mediawikicore-dd877c916a4588dc6a59e4e6b37d5e633b2505ab.zip |
Update OOjs UI to v0.1.0-pre (9d291a9222)
New changes:
b0a3738 Localisation updates from https://translatewiki.net.
722ad64 Followup 099f26ec: fix $content in FieldsetLayout
0a75f92 Check for left click and disabled state on ButtonedElements
Change-Id: I3efff5b337e7852ab90fd76473cbce88cd16702a
Diffstat (limited to 'resources/lib/oojs-ui/oojs-ui.js')
-rw-r--r-- | resources/lib/oojs-ui/oojs-ui.js | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/resources/lib/oojs-ui/oojs-ui.js b/resources/lib/oojs-ui/oojs-ui.js index 6ea6ec9f2d27..bed97f35b353 100644 --- a/resources/lib/oojs-ui/oojs-ui.js +++ b/resources/lib/oojs-ui/oojs-ui.js @@ -1,12 +1,12 @@ /*! - * OOjs UI v0.1.0-pre (c58b498573) + * OOjs UI v0.1.0-pre (9d291a9222) * https://www.mediawiki.org/wiki/OOjs_UI * * Copyright 2011–2014 OOjs Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * - * Date: Wed Apr 16 2014 11:09:39 GMT-0700 (PDT) + * Date: Wed Apr 16 2014 18:45:32 GMT-0700 (PDT) */ ( function ( OO ) { @@ -1880,7 +1880,10 @@ OO.ui.ButtonedElement = function OoUiButtonedElement( $button, config ) { * * @param {jQuery.Event} e Mouse down event */ -OO.ui.ButtonedElement.prototype.onMouseDown = function () { +OO.ui.ButtonedElement.prototype.onMouseDown = function ( e ) { + if ( this.disabled || e.which !== 1 ) { + return false; + } // tabIndex should generally be interacted with via the property, // but it's not possible to reliably unset a tabIndex via a property // so we use the (lowercase) "tabindex" attribute instead. @@ -1898,7 +1901,10 @@ OO.ui.ButtonedElement.prototype.onMouseDown = function () { * * @param {jQuery.Event} e Mouse up event */ -OO.ui.ButtonedElement.prototype.onMouseUp = function () { +OO.ui.ButtonedElement.prototype.onMouseUp = function ( e ) { + if ( this.disabled || e.which !== 1 ) { + return false; + } // Restore the tab-index after the button is up to restore the button's accesssibility this.$button .attr( 'tabindex', this.tabIndex ) @@ -3644,7 +3650,7 @@ OO.ui.FieldsetLayout = function OoUiFieldsetLayout( config ) { // Initialization this.$element .addClass( 'oo-ui-fieldsetLayout' ) - .append( this.$icon, this.$label, this.$group ); + .prepend( this.$icon, this.$label, this.$group ); if ( $.isArray( config.items ) ) { this.addItems( config.items ); } |