Direct edit sends the description as what_happens

This commit is contained in:
gator 2026-09-23 12:30:22 +00:00
parent 6bccd09afd
commit 03cc1ec3c9

View file

@ -1721,8 +1721,8 @@
if ((el = hit("data-directedit"))) { e.preventDefault(); EDITING = "direct:" + el.getAttribute("data-directedit"); openTab(CUR); return; }
if ((el = hit("data-directsave"))) {
var dsid = el.getAttribute("data-directsave"), payload = { draft_id: CUR, shot_id: dsid };
["opening_image", "action", "closing_image", "camera"].forEach(function (k) { var t = document.querySelector('[data-direct="' + k + '"]'); if (t) payload[k] = t.value; });
if (String(payload.action || "").trim().length < 40) { showMsg("msg", "The description needs a few sentences."); return; }
["opening_image", "action", "closing_image", "camera"].forEach(function (k) { var t = document.querySelector('[data-direct="' + k + '"]'); if (t) payload[k === "action" ? "what_happens" : k] = t.value; });
if (String(payload.what_happens || "").trim().length < 40) { showMsg("msg", "The description needs a few sentences."); return; }
el.disabled = true;
r = await act("edit_shot", payload);
EDITING = null;