|
| 1 | +enyo.kind({ |
| 2 | + name: "InputSample", |
| 3 | + classes: "onyx onyx-sample", |
| 4 | + components: [ |
| 5 | + {classes: "onyx-sample-divider", content: "Inputs"}, |
| 6 | + {classes: "onyx-toolbar-inline", components: [ |
| 7 | + {kind: "onyx.InputDecorator", components: [ |
| 8 | + {kind: "onyx.Input", placeholder: "Enter text here", onchange:"inputChanged"} |
| 9 | + ]}, |
| 10 | + {kind: "onyx.InputDecorator", components: [ |
| 11 | + {kind: "onyx.Input", placeholder: "Search term", onchange:"inputChanged"}, |
| 12 | + {kind: "Image", src: "assets/search-input-search.png"} |
| 13 | + ]}, |
| 14 | + {kind: "onyx.InputDecorator", components: [ |
| 15 | + {kind: "onyx.Input", type:"password", placeholder: "Enter password", onchange:"inputChanged"} |
| 16 | + ]} |
| 17 | + ]}, |
| 18 | + {tag: "br"}, |
| 19 | + {classes: "onyx-sample-divider", content: "RichTexts"}, |
| 20 | + {classes: "onyx-toolbar-inline", components: [ |
| 21 | + {kind: "onyx.InputDecorator", components: [ |
| 22 | + {kind: "onyx.RichText", style: "width: 200px;", placeholder: "Enter text here", onchange:"inputChanged"} |
| 23 | + ]}, |
| 24 | + {kind: "onyx.InputDecorator", components: [ |
| 25 | + {kind: "onyx.RichText", style: "width: 200px;", placeholder: "Search term", onchange:"inputChanged"}, |
| 26 | + {kind: "Image", src: "assets/search-input-search.png"} |
| 27 | + ]} |
| 28 | + ]}, |
| 29 | + {tag: "br"}, |
| 30 | + {classes: "onyx-sample-divider", content: "TextAreas"}, |
| 31 | + {classes: "onyx-toolbar-inline", components: [ |
| 32 | + {kind: "onyx.InputDecorator", components: [ |
| 33 | + {kind: "onyx.TextArea", placeholder: "Enter text here", onchange:"inputChanged"} |
| 34 | + ]}, |
| 35 | + {kind: "onyx.InputDecorator", components: [ |
| 36 | + {kind: "onyx.TextArea", placeholder: "Search term", onchange:"inputChanged"}, |
| 37 | + {kind: "Image", src: "assets/search-input-search.png"} |
| 38 | + ]} |
| 39 | + ]}, |
| 40 | + {tag: "br"}, |
| 41 | + {kind: "onyx.Groupbox", classes:"onyx-sample-result-box", components: [ |
| 42 | + {kind: "onyx.GroupboxHeader", content: "Result"}, |
| 43 | + {name:"result", classes:"onyx-sample-result", content:"No input entered yet."} |
| 44 | + ]} |
| 45 | + ], |
| 46 | + inputChanged: function(inSender, inEvent) { |
| 47 | + this.$.result.setContent("Input: " + inSender.getValue()); |
| 48 | + } |
| 49 | +}); |
0 commit comments