(function () {
- /**
- @name XV.Checkbox
- @class An input control that shows or hides a checkmark when clicked.</br >
- To implement a checkbox, see {@link XV.CheckboxWidget}.<br />
- Derived from <a href="http://enyojs.com/api/#onyx.Checkbox">onyx.Checkbox</a>.
- @extends onyx.Checkbox
- */
- enyo.kind(
- /** @lends XV.Checkbox# */{
- name: "XV.Checkbox",
- kind: "onyx.Checkbox",
- published: {
- attr: null
- },
- events: {
- onValueChange: ""
- },
- handlers: {
- onchange: "changed"
- },
- /**
- @todo Document the clear method.
- */
- clear: function (options) {
- this.setValue(false, options);
- },
- /**
- @todo Document the setValue method.
- */
- setValue: function (value, options) {
- options = options || {};
- this._silent = options.silent;
- this.inherited(arguments);
- this._silent = false;
- },
- /**
- @todo Document the changed method.
- */
- changed: function (inSender, inEvent) {
- if (!this._silent) {
- inEvent.value = this.getValue();
- this.doValueChange(inEvent);
- }
- }
- });
-
/**
@name XV.CheckboxWidget
@class An input control consisting of fittable columns:
which is made up of a checkbox input control and its label.
@extends XV.Input
*/
- enyo.kind(/** @lends XV.CheckboxWidget# */{
+ enyo.kind({
name: "XV.CheckboxWidget",
kind: "XV.InputWidget",
classes: "xv-checkboxwidget",
components: [
- {kind: "FittableColumns", components: [
- {name: "label", content: "", classes: "xv-label"},
- {kind: "onyx.InputDecorator", classes: "xv-input-decorator",
- components: [
+ {controlClasses: 'enyo-inline', components: [
+ {name: "label", classes: "xv-label"},
+ {kind: "onyx.InputDecorator", components: [
{name: "input", kind: "onyx.Checkbox", onchange: "inputChanged"}
]}
]}
onValueChange: ""
},
components: [
- {kind: "FittableColumns", components: [
- {name: "label", content: "", classes: "xv-label"},
- {kind: "onyx.InputDecorator", classes: "xv-input-decorator",
- components: [
+ {controlClasses: 'enyo-inline', components: [
+ {name: "label", classes: "xv-label"},
+ {kind: "onyx.InputDecorator", components: [
{name: "input", kind: "onyx.Checkbox", onchange: "inputChanged"}
]}
]}