Merge branch 'master' of https://git.dirt.kz/igor/Metadata_PHP
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")
|
||||
@ -416,13 +416,9 @@ class EdtRec
|
||||
}else
|
||||
if(vt=="i4")
|
||||
{
|
||||
|
||||
//alert2(trt('Alert'),"prop name = "+nodeProp.getAttribute("n"));
|
||||
|
||||
//If there is a node "list" with the elements "CheckBox" then create them.
|
||||
let opt=findNode(nodeProp, "options");
|
||||
if(opt!=null) //If combobox
|
||||
{
|
||||
let select = document.createElement('select');
|
||||
select.classList.add('DBMS');
|
||||
select.style.cssText="width: 100%;";
|
||||
@ -433,7 +429,7 @@ class EdtRec
|
||||
{
|
||||
if(opt.nodeName=="option")
|
||||
{
|
||||
option = document.createElement("option");
|
||||
let option = document.createElement("option");
|
||||
option.setAttribute("value",opt.getAttribute("val"));
|
||||
option.appendChild(document.createTextNode(opt.getAttribute("d")));
|
||||
select.appendChild( option );
|
||||
@ -911,15 +907,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);
|
||||
};
|
||||
|
||||
@ -946,9 +941,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);
|
||||
@ -960,11 +955,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){
|
||||
@ -972,9 +967,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;
|
||||
@ -1053,14 +1048,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))
|
||||
@ -1077,7 +1072,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)
|
||||
{
|
||||
@ -1566,16 +1561,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