mirror of
https://github.com/esiur/esiur-js.git
synced 2025-05-06 12:32:58 +00:00
30 lines
803 B
JavaScript
30 lines
803 B
JavaScript
|
|
function init()
|
|
{
|
|
iui("dlgLogin").dialog().show();
|
|
|
|
var local = new MemoryStore();
|
|
Warehouse.put(local, "local");
|
|
|
|
iui("divContent").browser();
|
|
}
|
|
|
|
function connect()
|
|
{
|
|
var url = document.getElementById("txtURL").value;
|
|
var domain = document.getElementById("txtDomain").value;
|
|
var username = document.getElementById("txtUsername").value;
|
|
var password = document.getElementById("txtPassword").value;
|
|
|
|
iui("dlgLogin").setLoading(true);
|
|
|
|
var con = new DistributedConnection(url, domain, username, password);
|
|
Warehouse.put(con, "remote");
|
|
|
|
con.on("ready", function (d) {
|
|
iui("divContent").setConnection(con);
|
|
iui("dlgLogin").hide();
|
|
}).on("error", function(sender, code, msg){
|
|
console.log(sender, code, msg);
|
|
});
|
|
} |