Created
August 25, 2011 14:01
-
-
Save ryanjduffy/1170733 to your computer and use it in GitHub Desktop.
toaster example
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
var _Example = { | |
name:"com.technisode.example.App", | |
kind:"Control", | |
components:[ | |
{kind:"Button", caption:"click me", onclick:"clicked"}, | |
{kind:"toaster.addtsk", name:"addtsk"} | |
], | |
clicked:function() { | |
this.$.addtsk.openAtCenter(); | |
} | |
}; | |
enyo.kind({ | |
name:"toaster.addtsk", | |
kind: enyo.Toaster, | |
flyInFrom: "right", style: "background-color:#E7E8EA; width:32%;height:100%;padding:0 10px 10px;", components: [ | |
{name: "toasterSpace", style: "background-color: rgba(204,85,0,0.5); height: 100%;", kind: enyo.VFlexBox, components: [ | |
{name: "toasterScroller", kind: enyo.Scroller, flex: 1, components: [ | |
{content: "Change the task", style:"font-weight:600; color:#5D5D5D; margin:15px 0"}, | |
{kind: "RichText", value: " ",alwaysLooksFocused:"true"}, | |
{kind: "RowGroup", caption: "List", components: [ | |
{kind: "HFlexBox", align: "center", tapHighlight: false, components: [ | |
{content: "Business"}, | |
{kind: "Spacer"}, | |
{kind: "CheckBox"} | |
]}, | |
{kind: "HFlexBox", align: "center", tapHighlight: false, components: [ | |
{content: "Private"}, | |
{kind: "Spacer"}, | |
{kind: "CheckBox"} | |
]}, | |
{kind: "HFlexBox", align: "center", tapHighlight: false, components: [ | |
{content: "Shopping"}, | |
{kind: "Spacer"}, | |
{kind: "CheckBox"} | |
]} | |
]}, | |
{content: "Due date"}, | |
{kind: "DatePicker", label: "", onChange: "pickerPick", style:"color:#000; width:25%"}, | |
{layoutKind: "HFlexLayout", align: "center", components: [ | |
{content: "Responsible", flex: 1, onclick: "responsible"}, | |
{kind: "ListSelector", className: "enyo-label", value: "you", hideArrow: false, items: [ | |
{caption: "You", value: "you"}, | |
{caption: "Bob", value: "bob"}, | |
{caption: "Neo", value: "neo"}, | |
{caption: "Natalia", value: "natalia"} | |
]}, | |
{content: "toaster.responsible"}, | |
]}, | |
{kind: "RowGroup", caption: "Reminders", components: [ | |
{kind: "HFlexBox", align: "center", tapHighlight: false, components: [ | |
{kind: "CheckBox", checked: false, style: "margin-right:10px"}, | |
{content: "Standerd Reminder"} | |
]}, | |
{kind: "HFlexBox", align: "center", tapHighlight: false, components: [ | |
{kind: "CheckBox", checked: false, style: "margin-right:10px"}, | |
{content: "Individual Reminder"}, | |
{kind: "Image", src: "images/arrow1.png",style: "margin-left:30px;",onclick:"individualr"}, | |
//individualr | |
{content: "toaster.individualr"}, | |
]}, | |
]}, | |
//{kind: "image", src:"status-available.png"}, | |
{kind: "HFlexBox", align: "center", tapHighlight: false, components: [ | |
{kind: "Button", caption: "Save", onclick: "aconfirmClick"}, | |
{kind: "Button", caption: "Cancel", onclick: "acancelClick", style:"margin-left:30%"} | |
]}, | |
]}, | |
]}, | |
], | |
}); | |
enyo.kind(_Example); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks