This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enyo.ready(function() { | |
enyo.kind({ | |
name: 'Heartbeat', | |
events: { | |
onBeat: '' | |
}, | |
create: function() { | |
this.inherited(arguments); | |
this.timer = window.setInterval(enyo.bind(this, 'beat'), 1000); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enyo.ready(function() { | |
enyo.kind({ | |
name: 'DynamicSample', | |
components: [ | |
{ kind: 'Button', content: 'Click', ontap: 'tapped' } | |
], | |
tapped: function(inSender, inEvent) { | |
this.createComponent({ content: 'A new component' }); | |
this.render(); | |
return true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enyo.ready(function() { | |
enyo.kind({ | |
name: 'ControlSample', | |
components: [ | |
{ kind: 'Button', content: 'Click', ontap: 'tapped' }, | |
{ tag: 'br'}, | |
{ kind: 'Checkbox', checked: true, onchange: 'changed' }, | |
{ tag: 'br'}, | |
{ kind: 'Input', placeholder: 'Enter something', onchange: 'changed' }, | |
{ tag: 'br'}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enyo.ready(function() { | |
enyo.kind({ | |
name: 'ControlSample', | |
components: [ | |
{ kind: 'onyx.Button', content: 'Click', ontap: 'tapped' }, | |
{ tag: 'br'}, | |
{ kind: 'onyx.Checkbox', checked: true, onchange: 'changed' }, | |
{ tag: 'br'}, | |
{ kind: 'onyx.InputDecorator', components: [ | |
{ kind: 'onyx.Input', placeholder: 'Enter something', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enyo.ready(function() { | |
enyo.kind({ | |
name: 'OnyxSample', | |
components: [ | |
{ kind: 'onyx.Toolbar', components: [ | |
{ content: 'Toolbar' }, | |
{ kind: 'onyx.Button', content: 'Toolbar Button' } | |
]}, | |
{ content: 'Radio Group' }, | |
{ kind: 'onyx.RadioGroup', onActivate: 'activated', components: [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enyo.ready(function() { | |
enyo.kind({ | |
name: 'View', | |
classes: 'moon', | |
components: [ | |
{ kind: 'moon.Button', content: 'Hello', ontap: 'tapped' }, | |
{ kind: 'moon.CheckboxItem', checked: true, content: 'Check me', | |
onchange: 'changed' }, | |
{ kind: 'moon.InputDecorator', components: [ | |
{ kind: 'moon.Input', placeholder: 'Enter something', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enyo.ready(function() { | |
enyo.kind({ | |
name: 'Svg', | |
svg: '', | |
rendered: function() { | |
this.inherited(arguments); | |
this.svgChanged(); | |
// Can only call when we have a node | |
}, | |
svgChanged: function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enyo.ready(function() { | |
enyo.kind({ | |
name: 'Expando', | |
components: [ | |
{ name: 'expander', content: 'Presto', | |
style: | |
'width: 100px; background-color: lightblue; text-align: center;' }, | |
{ name: 'animator', kind: 'Animator', duration: 1500, startValue: 100, | |
endValue: 300, onStep: 'expand', onEnd: 'done' }, | |
{ kind: 'Button', content: 'Start', ontap: 'startAnimator' }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enyo.ready(function() { | |
enyo.kind({ | |
name: 'AjaxSample', | |
components: [ | |
{ kind: 'Button', content: 'Fetch Repositories', ontap: 'fetch' }, | |
{ name: 'repos', content: 'Not loaded...', allowHtml: true } | |
], | |
fetch: function() { | |
var ajax = new enyo.Ajax({ | |
url: 'https://api.github.com/users/enyojs/repos' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enyo.ready(function() { | |
enyo.kind({ | |
name: 'RepeaterSample', | |
kind: 'Scroller', | |
components: [{ | |
kind: 'Repeater', | |
count: 100, | |
components: [{ name: 'text' }], | |
onSetupItem: 'setupItem', | |
ontap: 'tapped' |