alert focus

This commit is contained in:
2021-11-28 20:04:50 +06:00
parent 07a7e2fff6
commit 17bb5fc67e
2 changed files with 5 additions and 1 deletions

View File

@ -53,6 +53,7 @@ class EdtRec
this.pBarDiv.innerHTML='<table width="100%" height="100%" cellpadding="0" cellspacing="0"><tr><td align="center" style="vertical-align: middle;"><img src="../resources/metadata/dbms/images/loading.gif" alt=""></td></tr></table>'; this.pBarDiv.innerHTML='<table width="100%" height="100%" cellpadding="0" cellspacing="0"><tr><td align="center" style="vertical-align: middle;"><img src="../resources/metadata/dbms/images/loading.gif" alt=""></td></tr></table>';
let eDiv=document.getElementById('eDiv'+this.uid); let eDiv=document.getElementById('eDiv'+this.uid);
if(eDiv==null) return;
eDiv.appendChild(this.pBarDiv); eDiv.appendChild(this.pBarDiv);
} }
}; };
@ -399,7 +400,7 @@ class EdtRec
{ {
if(opt.nodeName=="option") if(opt.nodeName=="option")
{ {
option = document.createElement("option"); let option = document.createElement("option");
option.setAttribute("value",opt.getAttribute("val")); option.setAttribute("value",opt.getAttribute("val"));
option.appendChild(document.createTextNode(opt.getAttribute("d"))); option.appendChild(document.createTextNode(opt.getAttribute("d")));
select.appendChild( option ); select.appendChild( option );
@ -1039,6 +1040,7 @@ class EdtRec
let nodeType=findFirstNode(node, 'type'); let nodeType=findFirstNode(node, 'type');
prop_name=nodeType.getAttribute("pn"); //field name prop_name=nodeType.getAttribute("pn"); //field name
prop=document.getElementById("prop_"+this.uid+"_"+prop_name); prop=document.getElementById("prop_"+this.uid+"_"+prop_name);
if(prop==null) return;
let selector=null; //find what kind of object object let selector=null; //find what kind of object object
let nodeFilter=findFirstNode(this.nodeMetadata, 'properties'); let nodeFilter=findFirstNode(this.nodeMetadata, 'properties');

View File

@ -209,6 +209,7 @@ function alert2(title,text,okFunc=null)
win.setContent(html); win.setContent(html);
let obj=document.getElementById(win.uid+'_close'); let obj=document.getElementById(win.uid+'_close');
obj.focus();
if(obj!=null) obj.onclick=function(win,okFunc){return function(){ win.Close(); if(okFunc!=null) okFunc(); };}(win,okFunc); if(obj!=null) obj.onclick=function(win,okFunc){return function(){ win.Close(); if(okFunc!=null) okFunc(); };}(win,okFunc);
win.setSize("300px","150px"); win.setSize("300px","150px");
win.setCenter(); win.setCenter();
@ -237,6 +238,7 @@ function confirm2(title,text,okFunc,cancelFunc)
win.setContent(html); win.setContent(html);
let btnO=document.getElementById(win.uid+'_ok'); let btnO=document.getElementById(win.uid+'_ok');
btnO.focus();
if(btnO!=null){ if(btnO!=null){
btnO.onclick=function(win){ btnO.onclick=function(win){
return function(){ return function(){