Direct edit sends the description as what_happens
This commit is contained in:
parent
6bccd09afd
commit
03cc1ec3c9
1 changed files with 2 additions and 2 deletions
|
|
@ -1721,8 +1721,8 @@
|
||||||
if ((el = hit("data-directedit"))) { e.preventDefault(); EDITING = "direct:" + el.getAttribute("data-directedit"); openTab(CUR); return; }
|
if ((el = hit("data-directedit"))) { e.preventDefault(); EDITING = "direct:" + el.getAttribute("data-directedit"); openTab(CUR); return; }
|
||||||
if ((el = hit("data-directsave"))) {
|
if ((el = hit("data-directsave"))) {
|
||||||
var dsid = el.getAttribute("data-directsave"), payload = { draft_id: CUR, shot_id: dsid };
|
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; });
|
["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.action || "").trim().length < 40) { showMsg("msg", "The description needs a few sentences."); return; }
|
if (String(payload.what_happens || "").trim().length < 40) { showMsg("msg", "The description needs a few sentences."); return; }
|
||||||
el.disabled = true;
|
el.disabled = true;
|
||||||
r = await act("edit_shot", payload);
|
r = await act("edit_shot", payload);
|
||||||
EDITING = null;
|
EDITING = null;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue