From 27d49bf102df9845e3f7fefb366c490a95152f7e Mon Sep 17 00:00:00 2001 From: igor Date: Thu, 12 Nov 2020 17:09:03 +0600 Subject: [PATCH] =?UTF-8?q?+=D0=A1=D1=82=D1=80=D0=B5=D0=BB=D0=BE=D1=87?= =?UTF-8?q?=D0=BD=D1=8B=D0=B5=20=D1=84=D1=83=D0=BD=D0=BA=D1=86=D0=B8=D0=B8?= =?UTF-8?q?!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- metadata/dbms/TCGallery.js | 14 ++++-------- metadata/dbms/editrecord.js | 20 +++++----------- metadata/dbms/images/config.png | Bin 1361 -> 3044 bytes metadata/dbms/login.js | 17 ++++++-------- metadata/dbms/session.js | 2 +- metadata/dbms/showrecord.js | 39 +++++++++----------------------- metadata/dbms/tabs.js | 1 + metadata/dbms/tools.js | 2 +- 8 files changed, 32 insertions(+), 63 deletions(-) diff --git a/metadata/dbms/TCGallery.js b/metadata/dbms/TCGallery.js index 916ac10..d431a72 100644 --- a/metadata/dbms/TCGallery.js +++ b/metadata/dbms/TCGallery.js @@ -7,10 +7,9 @@ function TCGallery(parent) if(this.mas[0].style.opacity > 0.05) { this.mas[0].style.opacity = this.mas[0].style.opacity - 0.05; - this.timeout_id=setTimeout(function(thiz){return function(){thiz.work();}}(this),50); + this.timeout_id=setTimeout(()=>this.work(),50); this.test++; - //console.info(this.test+' 50 '+this.mas[0].style.opacity); }else { //Перестовляем Z индексы первый на последнее место (больший наверху) @@ -29,12 +28,9 @@ function TCGallery(parent) { this.mas[i].style.opacity = 1; } this.mas.sort(function(a,b){return b.style.zIndex-a.style.zIndex;}); //Сортируем с макс Z индексом наверху в 0ле - this.timeout_id=setTimeout(function(thiz){return function(){thiz.work();}}(this),5000); //Перезапускаем таймер через 10 секунд с максимальным Z индексом - + this.timeout_id=setTimeout(()=>this.work(),5000); //Перезапускаем таймер через 10 секунд с максимальным Z индексом this.selected(); - this.test++; - //console.info(this.test+' 5000 '+this.mas[0].style.opacity); } }; //Стартуем галерею @@ -46,7 +42,7 @@ function TCGallery(parent) if(maxz0) - setTimeout(function(thiz){return function(){thiz.work();}}(this),5000); + setTimeout(()=>this.work(),5000); maxz++; //Кнопочки для переключения картинок @@ -87,7 +83,7 @@ function TCGallery(parent) } clearTimeout(this.timeout_id) - this.timeout_id=setTimeout(function(thiz){return function(){thiz.work();}}(this),10000); + this.timeout_id=setTimeout(()=>this.work(),10000); this.selected(); }; //Поменялся элемент @@ -225,7 +221,7 @@ class TCGallery2 if(dx>0) dx=Math.ceil(dx); else dx=Math.floor(dx); this.parent.scrollLeft+=dx; if(this.parent.scrollLeft!=this.pos) - setTimeout(function(thiz){ return function(){ thiz.moveTo(); } }(this),10); + setTimeout(()=>this.moveTo(),10); } } diff --git a/metadata/dbms/editrecord.js b/metadata/dbms/editrecord.js index 7fa830e..bea0eb9 100644 --- a/metadata/dbms/editrecord.js +++ b/metadata/dbms/editrecord.js @@ -785,11 +785,7 @@ class EdtRec button.setAttribute("type","button"); button.style.cssText="margin:0px;margin-right:1px;"; button.setAttribute("value",trt('Apply')); - button.onclick=function(thiz){ - return function(){ - thiz.sendData(); - }; - }(this); + button.onclick=()=>this.sendData(); td.appendChild( button ); button = document.createElement('input'); //Button cancel @@ -798,7 +794,7 @@ class EdtRec button.style.cssText="margin:0px;"; button.setAttribute("value",trt('Cancel')); //button.onclick=function f_exit(this) { alert2(trt('Alert'),this.win.div); } - button.onclick=function(thiz){ return function(){thiz.win.Close();};}(this); + button.onclick=()=>this.win.Close(); td.appendChild( button ); tr.appendChild(td); eTable.tBodies[0].appendChild(tr); @@ -1485,11 +1481,7 @@ class EdtRec let readd=document.getElementById("readd_"+this.uid); if(readd!==null && readd.checked){ - //if(!confirm(trt("Successfully_added_data")+".\n"+trt("Add_more")+"?")) this.win.Close(); - - confirm2(trt('Warning'),trt("Successfully_added_data")+"
"+trt("Add_more")+"?",null,function(thiz){return function(){thiz.win.Close();};}(this)); - - + confirm2(trt('Warning'),trt("Successfully_added_data")+"
"+trt("Add_more")+"?",null,()=>this.win.Close()); }else { this.win.Close(); @@ -1499,9 +1491,9 @@ class EdtRec //The data has been updated successfully now telling the parent to update the record. updateRows(node) { - var typeNode=findFirstNode(node,"type"); - var typeName=typeNode.getAttribute("n"); - var id=typeNode.getAttribute("id"); + let typeNode=findFirstNode(node,"type"); + let typeName=typeNode.getAttribute("n"); + let id=typeNode.getAttribute("id"); if (this.opener!=null) { if(this.opener.f_TypeName==typeName) //It would be better to make an array of open windows then check for everyone. diff --git a/metadata/dbms/images/config.png b/metadata/dbms/images/config.png index 9b58a6c77ace6c9a23791bc5ddeb06eb572d9870..c991601586943e1c509a5093e24de4371efc33b3 100644 GIT binary patch delta 3039 zcmV<53n28-3gj1%BYy>{dQ@0+Qek%>aB^>EX>4U6ba`-PAZ2)IW&i+q+O1b@b}J_g z{m&}81P}Um;-9eY%D`xE2j-A-A^~4qe288aFMBM!6@8$l&hawf1SW2!rdwfz& zl@yKQk5Apd!KeMZKXeX3zw39`0YX=VjE5?E&R6vF*9(_DLVvsOcjX+RaxQcZTo#PB zv+Xu+jYK~k{UMzT)p;~>EplsWJ5BB9#BIv?y}Xn7TpYT)?MMPI4aP>1XvPrz{!NDk z@%Sow0)A}{?2UQ1quU~!mcSu*$Gb@HZyj{!~PamQ2bRh6^ z=WiF^Y#gr^(SQBG3|_t+=lrfU%3AX{ou&+r=95v|*%uGl#0Hng{aVH&_%hnEpNgk= z^&OB8-+jZ=Lk$E}mJ2D2pkal%We*)DCYmIWM4jU9D^aLYH(+A2CoGa!*IiYqN%dC4lPF1@05qWbOm0JU(UMjI)cCx2Je(Cb7lO9V?NY?uKtN&$$AApk;K znE+lPB{Jj;GhYco!2~1OuyG?8Vt_EsK)k{gyD#M4!p(7c3pe@=IcL!QAILdC_Z_z< zs12)geIs^6q50HDL?6ayQAaJ!f+|2o@n`kz&!qdW3oOaHGOO!Z=gP%Gy69LK{j;X~ zVSh%W*;?Gn3{|^rJw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MIY%*r_(9IcXjXmJ-**_&hPxrxk80l?;eci zBv-EttF=%k@CYz%*xYB}iXi6^eLCRR-+r@W+nq}C%47~}+~&nT*nyZgfl!5dQ@|HS znSG~rHMHH8fPZECTY`~0sXYSk0#=2@#mIsj@QiM3bsI7j3wUKu)1#v02=K&R5*OoF zv3wg(e(+Y;qyk>v-TaI)<|I&akH|;Rsf^U0aJO8TP{8oWf4L9jqarM0o?IESykyK2D=XbJd`0Apzl@>*})7obLKIS9@^%6Uw?_m=FTjLd+pOBrL-mk zf&6SMC%Jl=pu>5dM{jR0T5Cd~5UEtU?C1fKsed$yM1oW*g;I)GEH;sAIFqq9Sjw>4 zlxfJ0~3JbrJxI;ntjmpbu058Jj;O3@MTF6X|$G7z1}y7Q|u zM1NGCTRqo#=;2y!W;DtwzZ56`j&rWPi>`Q_a5#WxM^OF=57Fwfr=0SKP`2QyKJ2RL zs9XX7$5L!wz68k+Est^nH2-)WFE=F6uByiK^$@f}<;VfB1o{okDC<>(HB08RuC8{p zCPakJo?eb$xIC3K00~ROWtpOY%-|rYRDX)TzCHkAu^5@b!Kso1v@1c*-%X@a3deD9 z90!p}FIE%4{HYLqddgwOptZ*HJUq`sYhBS69hV2bSDp?Z1(H(E&Ue==*r$E{X()46QQ$z}(MJ}`?UHZob~D}R7| z-s)}|Pyj}meL%M2P*JFGHCZQ2)(WA*)l($L( { var xs='\ \ \n\ - \ - \ + \ + \ '; - 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) diff --git a/metadata/dbms/session.js b/metadata/dbms/session.js index b083c49..2e2041d 100644 --- a/metadata/dbms/session.js +++ b/metadata/dbms/session.js @@ -45,7 +45,7 @@ function CheckSession(path) this.run=function() { this.sendReq('?fn=2&'+this.ses_name+'='+this.ses_id); - this.timer=setTimeout(function(thiz){ return function(){ thiz.run(); }}(this), 60000); + this.timer=setTimeout(()=>this.run(), 60000); }; this.path=path; //URL файла session.php diff --git a/metadata/dbms/showrecord.js b/metadata/dbms/showrecord.js index 96fc04b..8808339 100644 --- a/metadata/dbms/showrecord.js +++ b/metadata/dbms/showrecord.js @@ -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{ for(let i=0;i" - ,function(thiz){ - return function(){ - - for(let i=0;i{ + for(let i=0;i',true)) + if(this.request.callServer(ScriptName,'',true)) { - thiz.showProgressBar(); + this.showProgressBar(); } } } - }; - }(this) - ,null); - - /*if (confirm(trt("Are_you_sure_you_want_to_delete_the_entries")+'?')) - { - for(let i=0;i',true)) - { - this.showProgressBar(); } - } - } - }*/ + ,null); return false; } diff --git a/metadata/dbms/tabs.js b/metadata/dbms/tabs.js index bfcba51..da7f65b 100644 --- a/metadata/dbms/tabs.js +++ b/metadata/dbms/tabs.js @@ -67,6 +67,7 @@ class tcTabs return this.tbs[i]; } } + return null; } } diff --git a/metadata/dbms/tools.js b/metadata/dbms/tools.js index f0f4e9e..4dfd8e8 100644 --- a/metadata/dbms/tools.js +++ b/metadata/dbms/tools.js @@ -1304,7 +1304,7 @@ class TWin this.ca=document.getElementById('TWin_Ca_'+this.tWinId); this.setSel(); - this.div.onmousedown=function(thiz){ return function(e){ thiz.setSel(); } }(this); + this.div.onmousedown=(e)=>this.setSel(); //Кнопка закрыть окно let obj=document.getElementById('TWin_CL_'+this.tWinId); if(obj!=null){