ВЬЮ.js
This commit is contained in:
@ -85,8 +85,8 @@ class EdtRec
|
||||
//Задать CDATA значение для узла "type->properties->prop" по "n"
|
||||
setPropCdata(name,value)
|
||||
{
|
||||
var nodeProperties=findNodeOnPath(this.nodeMetadata, 'type/properties');
|
||||
var nodeProp=nodeProperties.firstChild;
|
||||
let nodeProperties=findNodeOnPath(this.nodeMetadata, 'type/properties');
|
||||
let nodeProp=nodeProperties.firstChild;
|
||||
while(nodeProp!=null)
|
||||
{
|
||||
if(nodeProp.nodeName=="prop")
|
||||
@ -889,15 +889,14 @@ class EdtRec
|
||||
//The result can fill the filter field with complete information or display a window with a further selection of the value.
|
||||
selObj(typeName,propname)
|
||||
{
|
||||
var win=new TWin();
|
||||
let win=new TWin();
|
||||
win.BuildGUI(pageX-10,pageY-10);
|
||||
|
||||
var str='';
|
||||
str+='<table id="thetable'+win+'" bgcolor="SlateGrey" style="border: 1px solid rgb(99, 99, 99);" width="100%">';
|
||||
str+=' <caption></caption>';
|
||||
str+=' <thead><tr><th></th></tr></thead>';
|
||||
str+=' <tbody><tr><td></td></tr></tbody>';
|
||||
str+='</table>';
|
||||
let str=`
|
||||
<table id="thetable`+win+`" bgcolor="SlateGrey" style="border: 1px solid rgb(99, 99, 99);" width="100%">
|
||||
<caption></caption>
|
||||
<thead><tr><th></th></tr></thead>
|
||||
<tbody><tr><td></td></tr></tbody>
|
||||
</table>`;
|
||||
win.setContent(str);
|
||||
};
|
||||
|
||||
@ -924,9 +923,9 @@ class EdtRec
|
||||
//Call the ShowRecord.html window with the parameters for the filter (not just the object name).
|
||||
callWindow(nodeProp)
|
||||
{
|
||||
var xmlString="";
|
||||
var TypeName="";
|
||||
var nT=findNode(nodeProp, "type");
|
||||
let xmlString="";
|
||||
let TypeName="";
|
||||
let nT=findNode(nodeProp, "type");
|
||||
if(nT!=null)
|
||||
{
|
||||
xmlString=getXMLNodeSerialisation(nT);
|
||||
@ -938,11 +937,11 @@ class EdtRec
|
||||
//Write to XML string from GUI
|
||||
while(true)
|
||||
{
|
||||
var sub1=BeforeFirst(xmlString,"${");
|
||||
let sub1=BeforeFirst(xmlString,"${");
|
||||
if(sub1==null) break;
|
||||
var sub2=AfterFirst(xmlString,"}");
|
||||
let sub2=AfterFirst(xmlString,"}");
|
||||
if(sub2==null) break;
|
||||
var val=BeforeFirst(AfterFirst(xmlString,"${"),"}");
|
||||
let val=BeforeFirst(AfterFirst(xmlString,"${"),"}");
|
||||
|
||||
let obj=document.getElementById("prop_"+this.uid+"_"+val);
|
||||
if(obj!=null){
|
||||
@ -950,9 +949,9 @@ class EdtRec
|
||||
}else{
|
||||
xmlString=sub1+sub2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var rec=new SRec();
|
||||
let rec=new SRec();
|
||||
rec.create();
|
||||
rec.f_Settings=xmlString;
|
||||
rec.f_TypeName=TypeName;
|
||||
@ -1031,14 +1030,14 @@ class EdtRec
|
||||
//Function to populate the drop-down lists
|
||||
setDataSelect(node)
|
||||
{
|
||||
var prop_name,prop,option,nodeProp,id,value,cdataNode;
|
||||
var nodeType=findFirstNode(node, 'type');
|
||||
let prop_name,prop,option,nodeProp,id,value,cdataNode;
|
||||
let nodeType=findFirstNode(node, 'type');
|
||||
prop_name=nodeType.getAttribute("pn"); //field name
|
||||
prop=document.getElementById("prop_"+this.uid+"_"+prop_name);
|
||||
|
||||
var selector=null; //find what kind of object object
|
||||
var nodeFilter=findFirstNode(this.nodeMetadata, 'properties');
|
||||
var nodeCur=nodeFilter.firstChild;
|
||||
let selector=null; //find what kind of object object
|
||||
let nodeFilter=findFirstNode(this.nodeMetadata, 'properties');
|
||||
let nodeCur=nodeFilter.firstChild;
|
||||
while(nodeCur!=null)
|
||||
{
|
||||
if((nodeCur.nodeName=="prop")&&(nodeCur.getAttribute("n")==prop_name))
|
||||
@ -1055,7 +1054,7 @@ class EdtRec
|
||||
//in the full can be that the list has arrived after the arrival of all data and therefore the drop-down list must be set to the desired value here
|
||||
//select the value for this list
|
||||
let val=null;
|
||||
var nodeProperties=findFirstNode(this.nodeMetadata, 'properties');
|
||||
let nodeProperties=findFirstNode(this.nodeMetadata, 'properties');
|
||||
nodeProp=nodeProperties.firstChild;
|
||||
while(nodeProp!=null)
|
||||
{
|
||||
@ -1543,16 +1542,16 @@ class TCheckboxListField
|
||||
return result;
|
||||
};
|
||||
// Set checked values divide ";"
|
||||
setValue(val) {
|
||||
var splits;
|
||||
setValue(val) {
|
||||
let splits;
|
||||
if(val.indexOf(';')==-1)
|
||||
splits = val.split('');
|
||||
else
|
||||
splits = val.split(';');
|
||||
|
||||
for(var j=0;j<splits.length;j++)
|
||||
for(let j=0;j<splits.length;j++)
|
||||
{
|
||||
for(var i=0;i<this.array.length;i++)
|
||||
for(let i=0;i<this.array.length;i++)
|
||||
{
|
||||
if(this.array[i].value==splits[j])
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user