*/
enyo.kind(
/** @lends XV.PickerWidget# */{
- name: "XV.Picker",
+ name: "XV.PickerWidget",
kind: "enyo.Control",
- classes: "xv-input",
+ classes: "xv-pickerwidget",
events: /** @lends XV.PickerWidget# */{
/**
@property {Object} inEvent The payload that's attached to bubbled-up events
noneClasses: "",
showNone: true,
prerender: true,
- defaultValue: null
+ defaultValue: null,
+ showLabel: true,
+ label: ""
},
handlers: {
onSelect: "itemSelected"
},
components: [
- {kind: "onyx.PickerDecorator",
- components: [
- {kind: "XV.PickerButton", name: "pickerButton", content: "_none".loc(), onkeyup: "keyUp"},
- {name: "picker", kind: "onyx.Picker"}
+ {controlClasses: 'enyo-inline', components: [
+ {name: "label", classes: "xv-label"},
+ {kind: "onyx.InputDecorator", name: "inputWrapper", components: [
+ {kind: "onyx.PickerDecorator", components: [
+ {kind: "XV.PickerButton", name: "pickerButton", content: "_none".loc(), onkeyup: "keyUp"},
+ {name: "picker", kind: "onyx.Picker"}
+ ]}
+ ]}
]}
],
/**
if (defaultValue) {
this.setValue(defaultValue, {silent: true});
}
+
+ this.labelChanged();
+ this.showLabelChanged();
},
destroy: function () {
if (this._collection && this._collection.off) {
}
}
}
- }
- });
-
- /**
- @name XV.PickerWidget
- @class A picker control that implements a dropdown list of items which can be selected.<br />
- Unlike the {@link XV.RelationWidget}, the collection is stored local to the widget.<br />
- The superkind of {@link XV.CharacteristicPicker}.<br />
- Derived from <a href="http://enyojs.com/api/#enyo.Control">enyo.Control</a>.
- @extends enyo.Control
- */
- enyo.kind(/** @lends XV.PickerWidget# */{
- name: "XV.PickerWidget",
- kind: "XV.Picker",
- published: {
- label: "",
- showLabel: true
- },
- components: [
- {kind: "FittableColumns", components: [
- {name: "label", content: "", classes: "xv-label"},
- {kind: "onyx.InputDecorator", name: "inputWrapper", classes: "xv-input-decorator",
- components: [
- {kind: "onyx.PickerDecorator",
- components: [
- {kind: "XV.PickerButton", name: "pickerButton", content: "_none".loc(), onkeyup: "keyUp"},
- {name: "picker", kind: "onyx.Picker"}
- ]}
- ]}
- ]}
- ],
- /**
- @todo Document the create method.
- */
- create: function () {
- this.inherited(arguments);
- this.labelChanged();
- this.showLabelChanged();
},
/**
@todo Document the labelChanged method.