diff options
Diffstat (limited to 'vendor/oojs/oojs-ui/src/widgets/RadioOptionWidget.js')
-rw-r--r-- | vendor/oojs/oojs-ui/src/widgets/RadioOptionWidget.js | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/vendor/oojs/oojs-ui/src/widgets/RadioOptionWidget.js b/vendor/oojs/oojs-ui/src/widgets/RadioOptionWidget.js deleted file mode 100644 index 97187c0a..00000000 --- a/vendor/oojs/oojs-ui/src/widgets/RadioOptionWidget.js +++ /dev/null @@ -1,66 +0,0 @@ -/** - * RadioOptionWidget is an option widget that looks like a radio button. - * The class is used with OO.ui.RadioSelectWidget to create a selection of radio options. - * Please see the [OOjs UI documentation on MediaWiki] [1] for more information. - * - * [1]: https://www.mediawiki.org/wiki/OOjs_UI/Widgets/Selects_and_Options#Button_selects_and_option - * - * @class - * @extends OO.ui.OptionWidget - * - * @constructor - * @param {Object} [config] Configuration options - */ -OO.ui.RadioOptionWidget = function OoUiRadioOptionWidget( config ) { - // Configuration initialization - config = config || {}; - - // Properties (must be done before parent constructor which calls #setDisabled) - this.radio = new OO.ui.RadioInputWidget( { value: config.data, tabIndex: -1 } ); - - // Parent constructor - OO.ui.RadioOptionWidget.super.call( this, config ); - - // Initialization - this.$element - .addClass( 'oo-ui-radioOptionWidget' ) - .prepend( this.radio.$element ); -}; - -/* Setup */ - -OO.inheritClass( OO.ui.RadioOptionWidget, OO.ui.OptionWidget ); - -/* Static Properties */ - -OO.ui.RadioOptionWidget.static.highlightable = false; - -OO.ui.RadioOptionWidget.static.scrollIntoViewOnSelect = true; - -OO.ui.RadioOptionWidget.static.pressable = false; - -OO.ui.RadioOptionWidget.static.tagName = 'label'; - -/* Methods */ - -/** - * @inheritdoc - */ -OO.ui.RadioOptionWidget.prototype.setSelected = function ( state ) { - OO.ui.RadioOptionWidget.super.prototype.setSelected.call( this, state ); - - this.radio.setSelected( state ); - - return this; -}; - -/** - * @inheritdoc - */ -OO.ui.RadioOptionWidget.prototype.setDisabled = function ( disabled ) { - OO.ui.RadioOptionWidget.super.prototype.setDisabled.call( this, disabled ); - - this.radio.setDisabled( this.isDisabled() ); - - return this; -}; |