Skip to content

Instantly share code, notes, and snippets.

@rsanchez1
Created July 4, 2011 15:57
Show Gist options
  • Save rsanchez1/1063527 to your computer and use it in GitHub Desktop.
Save rsanchez1/1063527 to your computer and use it in GitHub Desktop.
Modal Dialog Login
enyo.kind({
name: "Login",
kind: "ModalDialog",
caption: "Login",
events: {
onConfirm: "",
onCancel: ""
},
components: [
{kind: "RowGroup", caption: "EMAIL", components: [
{kind: "Input", name: "email", hint: "", value: ""}
]},
{kind: "RowGroup", caption: "PASSWORD", components: [
{kind: "Input", name: "password", hint: "", value: ""}
]},
{layoutKind: "HFlexLayout", pack: "center", components: [
{kind: "Button", caption: "OK", flex: 1, className: "enyo-button-dark", onclick: "confirmClick"},
{kind: "Button", caption: "Cancel", flex: 1, onclick: "cancelClick"}
]}
],
create: function() {
enyo.log("creating dialog box");
this.inherited(arguments);
this.results = [];
},
confirmClick: function() {
enyo.log("clicked OK");
this.doConfirm();
},
cancelClick: function() {
enyo.log("clicked Cancel");
//this.$.close();
this.doCancel();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment