From c8a09ca13b97eddc5034f3e0454207d700f0105b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Mon, 5 Oct 2020 01:44:42 +0200 Subject: Edit tab submit now bound. --- static/script.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'static/script.js') diff --git a/static/script.js b/static/script.js index 1a893e56..32e19cc4 100644 --- a/static/script.js +++ b/static/script.js @@ -575,6 +575,14 @@ window.onload = function () { */ el.parentElement.removeAttribute("href"); + /* TODO this doesn't yet apply to newly created events */ + let popup = document.getElementById("popup" + el.id); + let form = popup.getElementsByClassName("edit-form")[0]; + form.onsubmit = function () { + create_event(el); + return false; /* stop default */ + } + /* Bind all vcomponent properties into javascript. */ if (el.closest(".longevents")) { bind_properties(el, true); -- cgit v1.2.3