Commit 2d8aa368 by Georgina Mondino

Boton de Borrar Tab

1 parent 2f588b4f
......@@ -2,7 +2,7 @@
* Armado de formulario
*/
function removeField(b){
while(b.getAttribute("name") == "Field") b = b.parentElement;
while(b.getAttribute("name") != "Field") b = b.parentElement;
if(b.nodeElement == "body") return;
b.parentElement.removeChild(b);
}
......@@ -19,7 +19,7 @@ function addField(b){
}
function removeTab(b){
while(b.getAttribute("name") == "Tab") b = b.parentElement;
while(b.getAttribute("name") != "Tab") b = b.parentElement;
if(b.nodeElement == "body") return;
b.parentElement.removeChild(b);
}
......
......@@ -20,8 +20,8 @@ body{
}
.TabTitle{
font-size: 30px;
width: 100%;
text-align: center;
width: 94%;
text-align: left;
border:none;
border-bottom: 1px solid grey;
}
......
......@@ -28,6 +28,9 @@
<template id="tabTemplate">
<div class="TabCards">
<input class="TabTitle" placeholder="Titulo del Tab" type="text">
<button class="RemoveInputButton" onclick="removeTab(this)">
X
</button>
<br>
<div style="text-align: center;">
<button class="NewInputButton" onclick="addField(this)">
......@@ -40,6 +43,7 @@
<template id="fieldTemplate">
<div class="InputContainer">
<input type="text" id="Titulo" class="Input" placeholder="Título">
<select name="input" class="Input">
<option disabled selected value="">Input</option>
<option id="text" value="text">Texto</option>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!