From 9c51f78a12e9817da0593631c1c3426abb574915 Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Thu, 5 Jun 2014 18:43:28 -0700 Subject: [PATCH] Update OOjs UI to v0.1.0-pre (c9b9f8345d) New changes: c9b9f83 Allow programmatic selection of options while disabled Change-Id: I5624a50e493c9466e3f3ce746425b586639a64f4 --- resources/lib/oojs-ui/oojs-ui.js | 14 ++++++++------ resources/lib/oojs-ui/oojs-ui.svg.css | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/resources/lib/oojs-ui/oojs-ui.js b/resources/lib/oojs-ui/oojs-ui.js index 1f2da19e8a..0ed95a282c 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 (cbc62ac803) + * OOjs UI v0.1.0-pre (c9b9f8345d) * 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 Jun 04 2014 17:11:52 GMT-0700 (PDT) + * Date: Thu Jun 05 2014 18:43:23 GMT-0700 (PDT) */ ( function ( OO ) { @@ -6377,7 +6377,7 @@ OO.ui.OptionWidget.prototype.isPressed = function () { * @chainable */ OO.ui.OptionWidget.prototype.setSelected = function ( state ) { - if ( !this.isDisabled() && this.constructor.static.selectable ) { + if ( this.constructor.static.selectable ) { this.selected = !!state; if ( this.selected ) { this.$element.addClass( 'oo-ui-optionWidget-selected' ); @@ -6398,7 +6398,7 @@ OO.ui.OptionWidget.prototype.setSelected = function ( state ) { * @chainable */ OO.ui.OptionWidget.prototype.setHighlighted = function ( state ) { - if ( !this.isDisabled() && this.constructor.static.highlightable ) { + if ( this.constructor.static.highlightable ) { this.highlighted = !!state; if ( this.highlighted ) { this.$element.addClass( 'oo-ui-optionWidget-highlighted' ); @@ -6416,7 +6416,7 @@ OO.ui.OptionWidget.prototype.setHighlighted = function ( state ) { * @chainable */ OO.ui.OptionWidget.prototype.setPressed = function ( state ) { - if ( !this.isDisabled() && this.constructor.static.pressable ) { + if ( this.constructor.static.pressable ) { this.pressed = !!state; if ( this.pressed ) { this.$element.addClass( 'oo-ui-optionWidget-pressed' ); @@ -7703,7 +7703,9 @@ OO.ui.ButtonOptionWidget.static.cancelButtonMouseDownEvents = false; OO.ui.ButtonOptionWidget.prototype.setSelected = function ( state ) { OO.ui.ButtonOptionWidget.super.prototype.setSelected.call( this, state ); - this.setActive( state ); + if ( this.constructor.static.selectable ) { + this.setActive( state ); + } return this; }; diff --git a/resources/lib/oojs-ui/oojs-ui.svg.css b/resources/lib/oojs-ui/oojs-ui.svg.css index 1f787b37db..46f8741d59 100644 --- a/resources/lib/oojs-ui/oojs-ui.svg.css +++ b/resources/lib/oojs-ui/oojs-ui.svg.css @@ -1,12 +1,12 @@ /*! - * OOjs UI v0.1.0-pre (cbc62ac803) + * OOjs UI v0.1.0-pre (c9b9f8345d) * 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 Jun 04 2014 17:11:52 GMT-0700 (PDT) + * Date: Thu Jun 05 2014 18:43:23 GMT-0700 (PDT) */ /* Textures */ -- 2.20.1