aboutsummaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-08-11 20:05:40 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-08-11 20:05:40 +0200
commit7c914d16b60fb72aa25aa469b60b85f06fb3a518 (patch)
treef81d814bda1f7e3ca0c6659bfc7349de97ec7576 /static
parentAllow events to enter edit mode after creation. (diff)
downloadcalp-7c914d16b60fb72aa25aa469b60b85f06fb3a518.tar.gz
calp-7c914d16b60fb72aa25aa469b60b85f06fb3a518.tar.xz
Keep summary when editing existing elements.
Diffstat (limited to 'static')
-rw-r--r--static/script.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/static/script.js b/static/script.js
index 37f86549..7f9291d7 100644
--- a/static/script.js
+++ b/static/script.js
@@ -457,8 +457,9 @@ function place_in_edit_mode (event) {
let summary = popup.getElementsByClassName("summary")[0];
let input = makeElement('input', {
- name: "dtstart",
- placeholder: summary.innerText,
+ name: "summary",
+ value: summary.innerText,
+ placeholder: "Sammanfattning",
required: true,
});
@@ -539,7 +540,7 @@ window.onload = function () {
let popupElement = document.getElementById("popup" + event.id);
open_popup(popupElement);
- popupElement.querySelector("input[name='dtstart']").focus();
+ popupElement.querySelector("input[name='summary']").focus();
});
}
@@ -557,7 +558,7 @@ window.onload = function () {
let popupElement = document.getElementById("popup" + event.id);
open_popup(popupElement);
- popupElement.querySelector("input[name='dtstart']").focus();
+ popupElement.querySelector("input[name='summary']").focus();
});
}