Commit a522d9d7 by Luciano Barletta

removes

1 parent c28f683f
......@@ -2,22 +2,26 @@
* Armado de formulario
*/
function removeField(b){
let div = b.parentElement;
let tab = div.parentElement;
tab.removeChild(div);
while(b.getAttribute("name") == "Field") b = b.parentElement;
if(b.nodeElement == "body") return;
b.parentElement.removeChild(b);
}
function addField(b){
let newfield = document.createElement("div");
newfield.setAttribute("name","Field");
newfield.innerHTML = document.getElementById("fieldTemplate").innerHTML;
b.parentElement.appendChild(newfield);
let tab = b.parentElement;
// swap
tab.removeChild(b);
tab.appendChild(newfield);
tab.appendChild(b);
}
function removeTab(b){
let div = b.parentElement;
let tab = div.parentElement;
tab.removeChild(div);
while(b.getAttribute("name") == "Tab") b = b.parentElement;
if(b.nodeElement == "body") return;
b.parentElement.removeChild(b);
}
function addTab(t){
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!