+Стрелочные функции!

This commit is contained in:
2020-11-12 17:09:03 +06:00
parent 046d957b7d
commit 27d49bf102
8 changed files with 32 additions and 63 deletions

View File

@ -134,24 +134,21 @@ class DBMSUser
obj=document.getElementById('TLogin_E'+this.uid);
if(obj!==null)
{
obj.onclick=function(thiz)
{
return function()
obj.onclick=()=>
{
var xs='<?xml version="1.0" encoding="utf-8"?>\
<metadata fn="7">\
<cmd><![CDATA[3]]></cmd>\n\
<login><![CDATA['+document.getElementById('tcLogin'+thiz.uid).value+']]></login>\
<password><![CDATA['+document.getElementById('tcPassword'+thiz.uid).value+']]></password>\
<login><![CDATA['+document.getElementById('tcLogin'+this.uid).value+']]></login>\
<password><![CDATA['+document.getElementById('tcPassword'+this.uid).value+']]></password>\
</metadata>';
var request=new TRequest(thiz);
var request=new TRequest(this);
if(request.callServer(ScriptName,xs))
{
thiz.win.showProgressBar();
this.win.showProgressBar();
}
};
}(this);
}
}
};
@ -169,8 +166,8 @@ class DBMSUser
//Checking the session without its extension, if it is completed, we display the authorization window.
checkSession()
{
$.getJSON('../session',{},function(thiz){return function(data){ if(data.result=='ERROR'){thiz.showLoginForm();} };}(this));
setTimeout(function(thiz){return function(){thiz.checkSession();};}(this), 10000);
$.getJSON('../session',{},(data)=>{if(data.result=='ERROR'){this.showLoginForm();}});
setTimeout(()=>this.checkSession(), 10000);
};
showShadow(visible)