The dialog will look like this:
Just create a file LoginDialog.js and add it to your enyo.depends() call.
enyo.kind({ kind : "ModalDialog", name : "FFComputing.LoginDialog", caption : "Login", events: { onOK: "", onCancel: "" }, components : [ { kind : "Group", name : "LoginCaption", caption : "Login", components : [ { kind : "Input", name : "loginInput", hint : "Login...", autoWordComplete : false, spellCheck : false, autocorrect : false } ] }, { kind : "Group", name : "PasswordCaption", caption : "Password", components : [ { kind : "PasswordInput", name : "passwordInput", hint : "Password...", spellCheck : false, autocorrect : false } ] }, { layoutKind : "HFlexLayout", components : [ { kind : "Button", flex : 1, caption : "OK", onclick : "okClicked", className : "enyo-button-blue" }, { kind : "Button", flex : 1, caption : "Cancel", onclick : "cancelClicked" }] }, ], okClicked: function(sender) { this.close(); this.doOK(this.$.loginInput.getValue(), this.$.passwordInput.getValue()); }, cancelClicked: function(sender) { this.close(); this.doCancel(); } });
Hello,
AntwortenLöschenWould be kind enough to post webos tutorial - connection to MYSQL database?
Very much appreciated!
Liz
I doon't know if that is possible. In my option a direct connection would require using a service and node.js to open a raw socket. Then you would have to implement whatever protocol mysql uses to communicate between server and client. That seems like a lot of work to me.
LöschenOn the other hand you could use something along the line of this: http://www.webos-internals.org/wiki/Tutorials_webOS_Getting_JSON_From_An_External_MySQL_Database
But that requires access to a webserver that can connect to the database.
I have an xampp server running which I could use to host my database.
AntwortenLöschenThanks for the link!
Lix