+Стрелочные функции!
This commit is contained in:
@ -183,10 +183,10 @@ class SRec
|
||||
htmlElement.innerHTML=str;
|
||||
}
|
||||
|
||||
document.getElementById('SRec_Add_'+this.uid).onclick=function(thiz){return function(){thiz.insertRecord();};}(this);
|
||||
document.getElementById('SRec_Del_'+this.uid).onclick=function(thiz){return function(){thiz.deleteRecord();};}(this);
|
||||
document.getElementById('SRec_Exc_'+this.uid).onclick=function(thiz){return function(){thiz.showreport('xls');};}(this);
|
||||
document.getElementById('SRec_Rfr_'+this.uid).onclick=function(thiz){return function(){thiz.appendFilter(); thiz.sendFilter(-1,0);};}(this);
|
||||
document.getElementById('SRec_Add_'+this.uid).onclick = ()=>this.insertRecord();
|
||||
document.getElementById('SRec_Del_'+this.uid).onclick = ()=>this.deleteRecord();
|
||||
document.getElementById('SRec_Exc_'+this.uid).onclick = ()=>this.showreport('xls');
|
||||
document.getElementById('SRec_Rfr_'+this.uid).onclick = ()=>{this.appendFilter(); this.sendFilter(-1,0);};
|
||||
}
|
||||
|
||||
//Update dimensions of the elements (the main table in absolute coordinates).
|
||||
@ -1040,7 +1040,7 @@ class SRec
|
||||
th.style.cssText='width: 1%; cursor: pointer; text-decoration: underline;';
|
||||
th.onmouseover=function(){ this.style.backgroundColor=g_rowColor2; };
|
||||
th.onmouseout=function(){ this.style.backgroundColor='var(--header-color)'; };
|
||||
th.onclick=function(thiz){return function(){ for(let i=0;i<thiz.masChBox.length;i++){ if(!thiz.masChBox[i].disabled) thiz.masChBox[i].checked = ! thiz.masChBox[i].checked; }};}(this);
|
||||
th.onclick= ()=>{ for(let i=0;i<this.masChBox.length;i++){ if(!this.masChBox[i].disabled) this.masChBox[i].checked = ! this.masChBox[i].checked; }};
|
||||
tr.appendChild(th);
|
||||
|
||||
let pos=0;
|
||||
@ -1520,36 +1520,19 @@ class SRec
|
||||
deleteRecord(recordid)
|
||||
{
|
||||
confirm2(trt('Warning'),trt("Are_you_sure_you_want_to_delete_the_entries")+"<br>"
|
||||
,function(thiz){
|
||||
return function(){
|
||||
|
||||
for(let i=0;i<thiz.masChBox.length;i++)
|
||||
,()=>{
|
||||
for(let i=0;i<this.masChBox.length;i++)
|
||||
{
|
||||
if(thiz.masChBox[i].checked)
|
||||
if(this.masChBox[i].checked)
|
||||
{
|
||||
if(thiz.request.callServer(ScriptName,'<?xml version="1.0" encoding="utf-8"?><metadata fn="3"><type n="'+thiz.f_TypeName+'" id="'+thiz.masChBox[i].value+'"></type></metadata>',true))
|
||||
if(this.request.callServer(ScriptName,'<?xml version="1.0" encoding="utf-8"?><metadata fn="3"><type n="'+this.f_TypeName+'" id="'+this.masChBox[i].value+'"></type></metadata>',true))
|
||||
{
|
||||
thiz.showProgressBar();
|
||||
this.showProgressBar();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}(this)
|
||||
,null);
|
||||
|
||||
/*if (confirm(trt("Are_you_sure_you_want_to_delete_the_entries")+'?'))
|
||||
{
|
||||
for(let i=0;i<this.masChBox.length;i++)
|
||||
{
|
||||
if(this.masChBox[i].checked)
|
||||
{
|
||||
if(this.request.callServer(ScriptName,'<?xml version="1.0" encoding="utf-8"?><metadata fn="3"><type n="'+this.f_TypeName+'" id="'+this.masChBox[i].value+'"></type></metadata>',true))
|
||||
{
|
||||
this.showProgressBar();
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
,null);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user