From ca3ad6305ec0655ad8475a12ac2228b61cdd9ba0 Mon Sep 17 00:00:00 2001 From: Lionel LASKE Date: Sat, 25 Aug 2012 20:23:36 +0000 Subject: Init commit --- (limited to 'html/lib/onyx/source/PickerDecorator.js') 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 onyx.Picker. It + loosely couples the Picker with an activating + onyx.PickerButton. 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); + } +}); -- cgit v0.9.1