Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/html/lib/onyx/source/PickerDecorator.js
diff options
context:
space:
mode:
Diffstat (limited to 'html/lib/onyx/source/PickerDecorator.js')
-rw-r--r--html/lib/onyx/source/PickerDecorator.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/html/lib/onyx/source/PickerDecorator.js b/html/lib/onyx/source/PickerDecorator.js
new file mode 100644
index 0000000..bf16109
--- /dev/null
+++ b/html/lib/onyx/source/PickerDecorator.js
@@ -0,0 +1,30 @@
+/**
+ A control that activates an <a href="#onyx.Picker">onyx.Picker</a>. It
+ loosely couples the Picker with an activating
+ <a href="#onyx.PickerButton">onyx.PickerButton</a>. The decorator must
+ surround both the activating button and the picker itself. When the button
+ is activated, the picker shows itself in the correct position relative to
+ the activator.
+
+ {kind: "onyx.PickerDecorator", components: [
+ {}, //this uses the defaultKind property of PickerDecorator to inherit from PickerButton
+ {kind: "onyx.Picker", components: [
+ {content: "Gmail", active: true},
+ {content: "Yahoo"},
+ {content: "Outlook"},
+ {content: "Hotmail"}
+ ]}
+ ]}
+ */
+enyo.kind({
+ name: "onyx.PickerDecorator",
+ kind: "onyx.MenuDecorator",
+ classes: "onyx-picker-decorator",
+ defaultKind: "onyx.PickerButton",
+ handlers: {
+ onChange: "change"
+ },
+ change: function(inSender, inEvent) {
+ this.waterfallDown("onChange", inEvent);
+ }
+});