This commit is contained in:
2023-10-23 17:09:58 +06:00
parent f3618efc7e
commit 8d37cbc5d9
3 changed files with 15 additions and 13 deletions

View File

@ -1101,7 +1101,7 @@ class EdtRec
} }
nodeProp=nodeProp.nextSibling; nodeProp=nodeProp.nextSibling;
} }
//console.log('Значение в XML '+prop_name+'='+val); //log.info('Значение в XML '+prop_name+'='+val);
//The first line in the select as NULL value = 1 //The first line in the select as NULL value = 1
option = document.createElement('option'); option = document.createElement('option');
@ -1134,7 +1134,7 @@ class EdtRec
//option.style.color="graytext" //option.style.color="graytext"
option.setAttribute("value",id); option.setAttribute("value",id);
option.appendChild(document.createTextNode(caption)); option.appendChild(document.createTextNode(caption));
//console.log('id='+id+' val='+val); //log.info('id='+id+' val='+val);
if (id==val) option.selected=true; if (id==val) option.selected=true;
prop.appendChild( option ); prop.appendChild( option );
} }
@ -1365,7 +1365,7 @@ class EdtRec
if (nodeProp.nodeName=="prop") if (nodeProp.nodeName=="prop")
{ {
let value=getCdata(nodeProp).nodeValue; let value=getCdata(nodeProp).nodeValue;
//console.log("name = "+nodeProp.getAttribute("n")+" value= "+value); //log.info("name = "+nodeProp.getAttribute("n")+" value= "+value);
if ((value=="true")||(value=="t")) value=1; if ((value=="true")||(value=="t")) value=1;
if ((value=="false")||(value=="f")) value=0; if ((value=="false")||(value=="f")) value=0;
@ -1460,7 +1460,7 @@ class EdtRec
if(document.getElementById("prop_"+this.uid+"_"+nodeProp.getAttribute("n")+"_visible").value=="") if(document.getElementById("prop_"+this.uid+"_"+nodeProp.getAttribute("n")+"_visible").value=="")
value=""; value="";
} }
//console.log("name = "+nodeProp.getAttribute("n")+" value= "+value+" object = "+document.getElementById("prop_"+this.uid+"_"+nodeProp.getAttribute("n"))); //log.info("name = "+nodeProp.getAttribute("n")+" value= "+value+" object = "+document.getElementById("prop_"+this.uid+"_"+nodeProp.getAttribute("n")));
}else{ }else{
//For special fields (look "TCheckboxListField" class) //For special fields (look "TCheckboxListField" class)
value=nodeProp.field.getValue(); value=nodeProp.field.getValue();
@ -1488,7 +1488,7 @@ class EdtRec
//Check the field according to its type //Check the field according to its type
checkData(value,type,maybenull) checkData(value,type,maybenull)
{ {
//console.log("checkData value = "+value+" type= "+type+" maybenull = "+maybenull); //log.info("checkData value = "+value+" type= "+type+" maybenull = "+maybenull);
if(value==undefined) return false; if(value==undefined) return false;
if(type=="i4") if(type=="i4")
{ {

View File

@ -1518,18 +1518,20 @@ class SRec
} }
} }
//Updating data in an HTML table //Updating data in an HTML table
let jj=0;
tr.style.textDecoration="underline"; tr.style.textDecoration="underline";
for(let j=0;j<node.data[i].row.length;j++) for(let j=0;j<node.data[i].row.length;j++)
{ {
if(this.masCL[j].getAttribute("visible")!="0") if(this.masCL[j].getAttribute("visible")!="0")
{ {
while(tr.childNodes[j+2].childNodes[0]) { while(tr.childNodes[jj+2].childNodes[0]) {
tr.childNodes[j + 2].removeChild(tr.childNodes[j + 2].childNodes[0]); tr.childNodes[jj+2].removeChild(tr.childNodes[jj + 2].childNodes[0]);
} }
let textNode; let textNode;
if(node.data[i].row[j]!=null) textNode=document.createTextNode(node.data[i].row[j]); if(node.data[i].row[j]!=null) textNode=document.createTextNode(node.data[i].row[j]);
else textNode=document.createTextNode(""); else textNode=document.createTextNode("");
tr.childNodes[j+2].appendChild(textNode); tr.childNodes[jj+2].appendChild(textNode);
jj++;
} }
} }
} }

View File

@ -28,7 +28,7 @@ function resizeDivTile(parent,minWidth)
if(parent==null) return; if(parent==null) return;
let dx=Math.floor(parent.offsetWidth/(minWidth)); let dx=Math.floor(parent.offsetWidth/(minWidth));
//console.log("parent.offsetWidth="+parent.offsetWidth+" minWidth="+minWidth+" margin="+margin+" dx="+dx); //log.info("parent.offsetWidth="+parent.offsetWidth+" minWidth="+minWidth+" margin="+margin+" dx="+dx);
let addW=0; let addW=0;
for(let i=0;i<minWidth+2;i++) for(let i=0;i<minWidth+2;i++)
@ -36,24 +36,24 @@ function resizeDivTile(parent,minWidth)
if(dx>=parent.offsetWidth/(minWidth+i)) if(dx>=parent.offsetWidth/(minWidth+i))
{ {
addW=i-1; addW=i-1;
//console.log("addW="+addW+" parent.offsetWidth/(minWidth+margin+i)="+(parent.offsetWidth/(minWidth+margin+i))); //log.info("addW="+addW+" parent.offsetWidth/(minWidth+margin+i)="+(parent.offsetWidth/(minWidth+margin+i)));
break; break;
} }
} }
for(let i = 0; i < parent.children.length; i++) { for(let i = 0; i < parent.children.length; i++) {
//console.log(parent.children[i].tagName); //log.info(parent.children[i].tagName);
if(parent.children[i].tagName.toUpperCase()=='DIV') if(parent.children[i].tagName.toUpperCase()=='DIV')
{ {
parent.children[i].style.width = (minWidth+addW)+"px"; parent.children[i].style.width = (minWidth+addW)+"px";
} }
} }
//console.log("minWidth+addW="+(minWidth+addW)); //log.info("minWidth+addW="+(minWidth+addW));
//Центрирую, путем добавления пространства с лева //Центрирую, путем добавления пространства с лева
parent.style.paddingLeft = Math.floor((parent.offsetWidth-(dx*(minWidth+addW)))/2) + "px"; parent.style.paddingLeft = Math.floor((parent.offsetWidth-(dx*(minWidth+addW)))/2) + "px";
//console.log("parent.style.paddingLeft="+parent.style.paddingLeft+" calc="+(Math.floor((parent.offsetWidth-(dx*(minWidth+addW)))/2))); //log.info("parent.style.paddingLeft="+parent.style.paddingLeft+" calc="+(Math.floor((parent.offsetWidth-(dx*(minWidth+addW)))/2)));
} }
//Получить уникальный идентификатор в рамках текущего NAMESPACE из глобальной переменной //Получить уникальный идентификатор в рамках текущего NAMESPACE из глобальной переменной