Delete types
This commit is contained in:
@ -127,7 +127,14 @@ class SRec
|
||||
//Apply the parameters to the current XML filter if there are filter settings in the parent window!
|
||||
if(xml===null || typeof(xml) == "undefined" || xml=="") return;
|
||||
if(typeof(xml) == "string"){
|
||||
applyNodeToNode(findFirstNodeOnAttribute(CreateXMLDOC(xml), "type", "n", this.f_TypeName), findFirstNodeOnAttribute(this.nodeMetadata, "type", "n", this.f_TypeName), "n");
|
||||
let doc=CreateXMLDOC(xml);
|
||||
if(doc==null)
|
||||
alert2(trt('Alert'),xml);
|
||||
else {
|
||||
let node=findFirstNodeOnAttribute(doc, "type", "n", this.f_TypeName);
|
||||
if(node!=null)
|
||||
applyNodeToNode(node, findFirstNodeOnAttribute(this.nodeMetadata, "type", "n", this.f_TypeName), "n");
|
||||
}
|
||||
}else
|
||||
if(typeof(xml) == "object"){
|
||||
if(xml.getAttribute("n")==this.f_TypeName)
|
||||
@ -146,12 +153,12 @@ class SRec
|
||||
<caption></caption><thead></thead><tbody></tbody>\
|
||||
</table>\
|
||||
</td></tr><tr><td>\
|
||||
<table style="width:100%;"><tr><td><img src="../resources/metadata/dbms/images/rplus.png" alt="add" id="SRec_Add_'+this.uid+'" title="'+trt('Add_record')+'" border="0" style="cursor: pointer;"/></td>\
|
||||
<td><img src="../resources/metadata/dbms/images/rdel.png" alt="del" id="SRec_Del_'+this.uid+'" title="'+trt('Delete_record')+'" border="0" style="cursor: pointer;"/></td>\
|
||||
<td><img src="../resources/metadata/dbms/images/excel.png" alt="excel" id="SRec_Exc_'+this.uid+'" title="'+trt('Export_to_Excel')+'" border="0" style="cursor: pointer;"/></td>\
|
||||
<table style="width:100%;"><tr><td><img src="../resources/metadata/dbms/images/rplus.png" alt="add" id="SRec_Add_'+this.uid+'" title="'+trt('Add_record')+'" style="cursor: pointer;"/></td>\
|
||||
<td><img src="../resources/metadata/dbms/images/rdel.png" alt="del" id="SRec_Del_'+this.uid+'" title="'+trt('Delete_record')+'" style="cursor: pointer;"/></td>\
|
||||
<td><img src="../resources/metadata/dbms/images/excel.png" alt="excel" id="SRec_Exc_'+this.uid+'" title="'+trt('Export_to_Excel')+'" style="cursor: pointer;"/></td>\
|
||||
<td style="width: 99%;"> </td>\
|
||||
<td><img src="../resources/metadata/dbms/images/config.png" alt="'+trt('Settings')+'" id="SRec_Cnf_'+this.uid+'" title="'+trt('Settings')+'" border="0" style="cursor: pointer;"/></td>\
|
||||
<td><img src="../resources/metadata/dbms/images/refresh.png" alt="'+trt('Refresh')+'" id="SRec_Rfr_'+this.uid+'" title="'+trt('Update')+'" border="0" style="cursor: pointer;"/></td></tr>\
|
||||
<td><img src="../resources/metadata/dbms/images/config.png" alt="'+trt('Settings')+'" id="SRec_Cnf_'+this.uid+'" title="'+trt('Settings')+'" style="cursor: pointer;"/></td>\
|
||||
<td><img src="../resources/metadata/dbms/images/refresh.png" alt="'+trt('Refresh')+'" id="SRec_Rfr_'+this.uid+'" title="'+trt('Update')+'" style="cursor: pointer;"/></td></tr>\
|
||||
</table>\
|
||||
</td></tr><tr><td id="tblContainer_'+this.uid+'" style="vertical-align:top; overflow:hidden; width:100%; height:100%; text-align:center;">\
|
||||
<div id="tblSContainer_'+this.uid+'" style="position: absolute; overflow:scroll; width: 400px; height: 400px;">\
|
||||
@ -209,7 +216,7 @@ class SRec
|
||||
{
|
||||
this.pBarDiv=document.createElement('div');
|
||||
this.pBarDiv.style.cssText='position: absolute; left: 0px; top: 0px; z-index: 1; background-color: rgba(0,0,0,0.5); width:100%; height: 100%;';
|
||||
this.pBarDiv.innerHTML='<table width="100%" height="100%" border="0" 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);
|
||||
eDiv.appendChild(this.pBarDiv);
|
||||
@ -581,6 +588,7 @@ class SRec
|
||||
newCell2.style.cssText="padding:0px;width:25px;";
|
||||
|
||||
let input = document.createElement('input');
|
||||
input.classList.add('DBMS');
|
||||
input.style.cssText="width: 100%;";
|
||||
input.setAttribute("type","text");
|
||||
/*input.onkeydown=function(event){
|
||||
@ -626,7 +634,8 @@ class SRec
|
||||
let newCell2 = newRow.insertCell(1);
|
||||
newCell2.style.cssText="padding:0px;width:25px;";
|
||||
|
||||
input = document.createElement('input');
|
||||
let input = document.createElement('input');
|
||||
input.classList.add('DBMS');
|
||||
input.style.cssText="width: 100%;";
|
||||
input.setAttribute("type","text");
|
||||
/*input.onkeydown=function(event){
|
||||
@ -662,6 +671,7 @@ class SRec
|
||||
if (columnNode.getAttribute("vt")==="b")
|
||||
{
|
||||
let select = document.createElement('select');
|
||||
select.classList.add('DBMS');
|
||||
select.onkeydown=function(){
|
||||
if(event.keyCode==13) event.keyCode=9;
|
||||
};
|
||||
@ -706,6 +716,7 @@ class SRec
|
||||
if (columnNode.getAttribute("vt")==="string")
|
||||
{
|
||||
let input = document.createElement('input');
|
||||
input.classList.add('DBMS');
|
||||
input.style.cssText="width: 100%;";
|
||||
input.setAttribute("type","text");
|
||||
input.onkeydown=function(event){if(event.which==13) event.which=9;};
|
||||
@ -730,6 +741,7 @@ class SRec
|
||||
newCell3.style.cssText="padding:0px;width:25px;height:100%;";
|
||||
|
||||
let input = document.createElement('input');
|
||||
input.classList.add('DBMS');
|
||||
input.style.cssText="width: 100%;";
|
||||
input.setAttribute("type","text");
|
||||
input.onkeydown=function(){ if(event.keyCode==13) event.keyCode=9; };
|
||||
@ -741,7 +753,7 @@ class SRec
|
||||
newCell1.appendChild( input );
|
||||
|
||||
let button = document.createElement('input');
|
||||
button.className='button-secondary';
|
||||
button.classList.add('button-secondary');
|
||||
button.setAttribute("type","button");
|
||||
button.setAttribute("value","+");
|
||||
button.style.cssText="height:100%;width:22px;margin:0px;padding:0px;";
|
||||
@ -749,7 +761,7 @@ class SRec
|
||||
button.onclick=function(inp){return function(){ inp.value=getIntVal(inp.value)+1; }}(input);
|
||||
|
||||
button = document.createElement('input');
|
||||
button.className='button-secondary';
|
||||
button.classList.add('button-secondary');
|
||||
button.setAttribute("type","button");
|
||||
button.setAttribute("value","-");
|
||||
button.style.cssText="height:100%;width:22px;margin:0px;padding:0px;";
|
||||
@ -761,8 +773,9 @@ class SRec
|
||||
if (columnNode.getAttribute("vt")==="f8")
|
||||
{
|
||||
let input = document.createElement('input');
|
||||
input.style.cssText="width: 100%;";
|
||||
input.setAttribute("type","text");
|
||||
button.classList.add('DBMS');
|
||||
input.style.cssText="width: 100%;";
|
||||
input.onkeydown=function(){ if(event.keyCode==13) event.keyCode=9; };
|
||||
input.setAttribute("name",columnNode.getAttribute("n"));
|
||||
if(columnNode.getAttribute("size")!=null)
|
||||
@ -790,6 +803,7 @@ class SRec
|
||||
if(selector=="combo")
|
||||
{
|
||||
let select = document.createElement('select');
|
||||
select.classList.add('DBMS');
|
||||
select.style.cssText="width: 100%;";
|
||||
select.onkeydown=function(){ if(event.keyCode==13) event.keyCode=9; };
|
||||
//select.setAttribute("name",columnNode.getAttribute("n"))
|
||||
@ -800,7 +814,7 @@ class SRec
|
||||
newCell1.appendChild(select);
|
||||
|
||||
let button = document.createElement('input');
|
||||
button.className='button-secondary';
|
||||
button.classList.add('button-secondary');
|
||||
button.setAttribute("type","button");
|
||||
button.setAttribute("value","...");
|
||||
button.style.cssText="display:block; box-sizing: border-box; margin: 0px; padding: 0px;width:100%; height:100%; font-size: 9pt;";
|
||||
@ -844,6 +858,7 @@ class SRec
|
||||
{
|
||||
//Two elements are placed in the table
|
||||
let input = document.createElement('input');
|
||||
input.classList.add('DBMS');
|
||||
//After pressing Enter we pass the entered line to the server
|
||||
input.onkeydown=function(obj,val1,val2,val3,val4){
|
||||
return function(e){
|
||||
@ -869,7 +884,7 @@ class SRec
|
||||
newCell1.appendChild(hidden);
|
||||
|
||||
let button = document.createElement('input');
|
||||
button.className='button-secondary';
|
||||
button.classList.add('button-secondary');
|
||||
button.setAttribute("type","button");
|
||||
button.setAttribute("value","...");
|
||||
button.style.cssText="width:30px; height:100%;margin: 0px; padding: 0px;";
|
||||
@ -904,7 +919,7 @@ class SRec
|
||||
td.setAttribute("align","right");
|
||||
|
||||
let button = document.createElement('input');
|
||||
button.className='button-secondary';
|
||||
button.classList.add('button-secondary');
|
||||
button.setAttribute("type","button");
|
||||
button.setAttribute("value",trt("Filtering"));
|
||||
button.setAttribute("id","btnfilter_"+this.uid);
|
||||
@ -1187,6 +1202,7 @@ class SRec
|
||||
if(!(this.f_pD!="1" || nodeRecord.getAttribute("a").indexOf("d")==-1))
|
||||
{
|
||||
let checkbox = document.createElement('input');
|
||||
checkbox.classList.add('DBMS');
|
||||
this.masChBox.push(checkbox);
|
||||
//checkbox.disabled=true;
|
||||
checkbox.setAttribute("type","checkbox");
|
||||
|
||||
Reference in New Issue
Block a user