From ef9a3da0528c659cc0ea430ba2729044fdcc8747 Mon Sep 17 00:00:00 2001 From: TrueKuehli Date: Sun, 30 Sep 2018 20:27:17 +0200 Subject: Added basic layout for login modal Shows form for inputting password and name. --- WebInterface/NodeJSServer/src/modules/ui/modal.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'WebInterface/NodeJSServer/src/modules/ui/modal.js') diff --git a/WebInterface/NodeJSServer/src/modules/ui/modal.js b/WebInterface/NodeJSServer/src/modules/ui/modal.js index e1aa8a2..31e6397 100644 --- a/WebInterface/NodeJSServer/src/modules/ui/modal.js +++ b/WebInterface/NodeJSServer/src/modules/ui/modal.js @@ -13,6 +13,7 @@ export default class Modal { title.textContent = titleString; modal.appendChild(title); + modal.appendChild(body); modalBackground.appendChild(modal); document.body.appendChild(modalBackground); @@ -25,6 +26,10 @@ export default class Modal { } registerEvents() { + this.modal.addEventListener('click', (e) => { + e.stopPropagation(); + }); + this.bg.addEventListener('click', () => { this.bg.classList.add('hidden'); this.bg.addEventListener('transitionend', () => { -- cgit v1.2.3-54-g00ecf