This commit is contained in:
2021-09-13 20:59:44 +06:00
parent ec4ff79a5e
commit 5ebcf5041d

View File

@ -751,23 +751,46 @@ class SRec
td2.appendChild(select);
}else {
let table=document.createElement('table');
table.border=0;
table.style.cssText="width:100%;/*table-layout:fixed;*/border-spacing:0;border-collapse:collapse;";
let newRow=table.insertRow(0); //We add a row in the created table.
let newCell1 = newRow.insertCell(0);
newCell1.style.cssText="padding:0px;padding-right:1px;width:100%;";
let newCell2 = newRow.insertCell(1);
newCell2.style.cssText="padding:0px;padding-right:1px;height:100%;";
let newCell3 = newRow.insertCell(2);
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; };
input.setAttribute("name",columnNode.getAttribute("n"));
if(columnNode.getAttribute("size")!=null)
input.setAttribute("maxlength",columnNode.getAttribute("size"),0);
input.setAttribute("value",value);
input.setAttribute("id",'filter_'+this.uid+'_'+columnNode.getAttribute("n"));
newCell1.appendChild( input );
let button = document.createElement('input');
button.classList.add('button-secondary');
button.setAttribute("type","button");
button.setAttribute("value","+");
button.style.cssText="height:100%;width:22px;margin:0px;padding:0px;";
newCell2.appendChild( button );
button.onclick=function(inp){return function(){ inp.value=getIntVal(inp.value)+1; }}(input);
button = document.createElement('input');
button.className = 'button-secondary';
button.setAttribute("type", "button");
button.setAttribute("value", "-");
button.style.cssText = "height:100%;width:22px;margin:0px;padding:0px;";
button.onclick = function (inp) {
return function () {
inp.value = getIntVal(inp.value) - 1;
}
}(input);
newCell3.appendChild(button);
button.classList.add('button-secondary');
button.setAttribute("type","button");
button.setAttribute("value","-");
button.style.cssText="height:100%;width:22px;margin:0px;padding:0px;";
button.onclick=function(inp){return function(){ inp.value=getIntVal(inp.value)-1; }}(input);
newCell3.appendChild( button );
td2.appendChild(table);
td2.appendChild( table );
}
}else
if (columnNode.getAttribute("vt")==="f8")