aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-10-05 01:44:42 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-10-05 01:44:42 +0200
commitc8a09ca13b97eddc5034f3e0454207d700f0105b (patch)
treea19739700b89264e147e35306245c3bc48e0d33b
parent$ needed for backtick strings. (diff)
downloadcalp-c8a09ca13b97eddc5034f3e0454207d700f0105b.tar.gz
calp-c8a09ca13b97eddc5034f3e0454207d700f0105b.tar.xz
Edit tab submit now bound.
-rw-r--r--static/script.js8
1 files changed, 8 insertions, 0 deletions
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);