Jforrester has uploaded a new change for review.
https://gerrit.wikimedia.org/r/96223
Change subject: Provide a CheckboxInputWidget
......................................................................
Provide a CheckboxInputWidget
Change-Id: I84bd5e46753d3627b2e26820082c2aeca15b0772
---
A src/widgets/OO.ui.CheckboxInputWidget.js
1 file changed, 40 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/23/96223/1
diff --git a/src/widgets/OO.ui.CheckboxInputWidget.js
b/src/widgets/OO.ui.CheckboxInputWidget.js
new file mode 100644
index 0000000..30b756c
--- /dev/null
+++ b/src/widgets/OO.ui.CheckboxInputWidget.js
@@ -0,0 +1,40 @@
+/**
+ * Creates an OO.ui.CheckboxInputWidget object.
+ *
+ * @class
+ * @extends OO.ui.InputWidget
+ *
+ * @constructor
+ * @param {Object} [config] Configuration options
+ * @cfg {string} [label=''] Label
+ */
+OO.ui.CheckboxInputWidget = function OoUiCheckboxInputWidget( config ) {
+ config = config || {};
+
+ // Parent constructor
+ OO.ui.InputWidget.call( this, config );
+
+ // Initialization
+ this.$element.addClass( 'oo-ui-checkboxInputWidget' );
+};
+
+/* Inheritance */
+
+OO.inheritClass( OO.ui.CheckboxInputWidget, OO.ui.InputLabelWidget );
+
+/* Events */
+
+/* Methods */
+
+/**
+ * Get input element.
+ *
+ * @method
+ * @param {Object} [config] Configuration options
+ * @returns {jQuery} Input element
+ */
+OO.ui.CheckboxInputWidget.prototype.getInputElement = function ( config ) {
+ this.label = config.label || '';
+ var $returnValue = this.$( '<input>' ).prop( 'type', 'checkbox' );
+ return $returnValue;
+};
--
To view, visit https://gerrit.wikimedia.org/r/96223
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I84bd5e46753d3627b2e26820082c2aeca15b0772
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Jforrester <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits