mirror of
				https://github.com/esiur/esiur-js.git
				synced 2025-11-03 19:01:35 +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);
 | 
						|
    });
 | 
						|
} |