Правки при переделки в класс
This commit is contained in:
@ -296,6 +296,7 @@ class EdtRec
|
||||
//td2.style.width=row+"px";
|
||||
}
|
||||
td1.appendChild(document.createTextNode(nodeProp.getAttribute("d")));
|
||||
if(nodeProp.getAttribute("t")!=null) td1.title=nodeProp.getAttribute("t");
|
||||
if (nodeProp.getAttribute("maybenull")=='0') td1.style.cssText="font-weight: bold;";
|
||||
|
||||
var value=getCdata(nodeProp).nodeValue;
|
||||
|
||||
@ -407,11 +407,11 @@ class SRec
|
||||
//The function to collect data from HTML fields in XML
|
||||
appendFilter()
|
||||
{
|
||||
nodeType=findFirstNode(this.nodeMetadata, "type");
|
||||
nodeFilter=findNodeOnPath(nodeType,"objects-list/filter");
|
||||
let nodeType=findFirstNode(this.nodeMetadata, "type");
|
||||
let nodeFilter=findNodeOnPath(nodeType,"objects-list/filter");
|
||||
if (nodeFilter!=null)
|
||||
{
|
||||
columnNode=nodeFilter.firstChild;
|
||||
let columnNode=nodeFilter.firstChild;
|
||||
while (columnNode != null)
|
||||
{
|
||||
if (columnNode.nodeName=="column")
|
||||
@ -429,7 +429,6 @@ class SRec
|
||||
if(isNaN(value)) value='';
|
||||
}
|
||||
}
|
||||
|
||||
getCdata(columnNode).nodeValue=value; //TODO do check for data type
|
||||
}
|
||||
columnNode = columnNode.nextSibling;
|
||||
@ -687,7 +686,7 @@ class SRec
|
||||
{
|
||||
if(opt.nodeName=="option")
|
||||
{
|
||||
option = document.createElement("option");
|
||||
let option = document.createElement("option");
|
||||
option.setAttribute("value",opt.getAttribute("val"));
|
||||
if(opt.getAttribute("val")==value) option.selected=true;
|
||||
option.appendChild(document.createTextNode(opt.getAttribute("d")));
|
||||
@ -1100,9 +1099,10 @@ class SRec
|
||||
if(pagecount>1)
|
||||
{
|
||||
let newRow=tablepages.insertRow(-1);
|
||||
for(i=0;i<pagecount;i++)
|
||||
for(let i=0;i<pagecount;i++)
|
||||
{
|
||||
if (i%2==0) bgColor='#EEEEEE'; else bgColor='#DDDDDD';
|
||||
let bgColor='#DDDDDD';
|
||||
if (i%2==0) bgColor='#EEEEEE';
|
||||
if (this.pagepos==i) bgColor='DodgerBlue';
|
||||
let newCell = newRow.insertCell(-1);
|
||||
newCell.setAttribute("bgColor",bgColor);
|
||||
@ -1143,14 +1143,14 @@ class SRec
|
||||
//Add new entries
|
||||
let nColor=findNumNodeOnAttribute(findNodeOnPath(this.nodeMetadata,"type/objects-list"),"column","n","color");
|
||||
let TypeName = nodeType.getAttribute("n");
|
||||
i=0; //The position should be received from the server.
|
||||
let i=0; //The position should be received from the server.
|
||||
|
||||
let nodeRecord = nodeType.firstChild;
|
||||
while (nodeRecord != null)
|
||||
{
|
||||
if(nodeRecord.nodeName=="record")
|
||||
{
|
||||
bgColor='';
|
||||
let bgColor='';
|
||||
let i=theTable.rows.length; //number of rows in the table
|
||||
if (i%2==0) bgColor='white'; else bgColor='whitesmoke';
|
||||
|
||||
@ -1219,7 +1219,7 @@ class SRec
|
||||
return function(){
|
||||
obj.callWindow(val1,val2);
|
||||
}
|
||||
}(this,id,i);
|
||||
}(this,id,colN);
|
||||
}else
|
||||
{
|
||||
if((this.f_pU=="1" && nodeRecord.getAttribute("a").indexOf("u")!=-1)||(this.f_State=="1"))
|
||||
@ -1231,11 +1231,10 @@ class SRec
|
||||
{
|
||||
td.style.cssText="cursor: default;";
|
||||
}
|
||||
|
||||
}
|
||||
tr.appendChild(td);
|
||||
}
|
||||
i++;
|
||||
colN++;
|
||||
}
|
||||
cdataNode = cdataNode.nextSibling;
|
||||
}
|
||||
@ -1284,7 +1283,7 @@ class SRec
|
||||
callWindow(id,col)
|
||||
{
|
||||
//we represent xml as a string and replace values of type $ {id} with values from the current record
|
||||
typeName=this.masCT[col].getAttribute("n");
|
||||
let typeName=this.masCT[col].getAttribute("n");
|
||||
let xmlString=getXMLNodeSerialisation(this.masCT[col]);
|
||||
while(true)
|
||||
{
|
||||
@ -1439,9 +1438,9 @@ class SRec
|
||||
|
||||
this.appendFilter();
|
||||
//Call data from server
|
||||
nodeType=findFirstNode(this.nodeMetadata, "type");
|
||||
typename=nodeType.getAttribute("n");
|
||||
nodeFilter=findNodeOnPath(nodeType,"objects-list/filter");
|
||||
let nodeType=findFirstNode(this.nodeMetadata, "type");
|
||||
let typename=nodeType.getAttribute("n");
|
||||
let nodeFilter=findNodeOnPath(nodeType,"objects-list/filter");
|
||||
let xs='';
|
||||
xs+='<?xml version="1.0" encoding="utf-8"?>\n';
|
||||
xs+='<metadata fn="8">\n';
|
||||
|
||||
Reference in New Issue
Block a user