diff --git a/public/name_form.html b/public/name_form.html deleted file mode 100644 index d3e44290..00000000 --- a/public/name_form.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - Framadate - - - - - - - - - - -
- - -

Par exemple : Stéphane ou Caroline

-
- - - diff --git a/public/parametres.html b/public/parametres.html index 9a3996dc..266eee0f 100644 --- a/public/parametres.html +++ b/public/parametres.html @@ -19,7 +19,7 @@

- Je m'appelle henri + Je m'appelle et le titre de ce sondage `); }); const removeOverlay = () => { $('body').removeChild($('.overlay')) + $('body').removeChild($('.modal')) } const createModal = (text) => { @@ -27,11 +29,17 @@ const createModal = (text) => { popin.innerHTML = text popin.className = 'modal' overlay.className = 'overlay' - overlay.appendChild(popin) + $('body').appendChild(overlay) + $('body').appendChild(popin) + overlay.addEventListener('click', removeOverlay) $('body').insertBefore(overlay, $('main')) -} + $("#submitTextField").addEventListener("click", () => { + $("#name").innerHTML = $("#nameUpdateField").value + removeOverlay() + }); +} $$('input').forEach((inputElement) => { inputElement.addEventListener("change", () => { diff --git a/public/style.css b/public/style.css index ae14a052..726e7998 100644 --- a/public/style.css +++ b/public/style.css @@ -58,10 +58,12 @@ input[type="text"], input[type="email"] { width: 100%; z-index: 5; } + .modal { background: #fff; top: 10%; left: 40%; padding: 10px; position: absolute; + z-index: 10; }