diff --git a/script.html b/script.html index c2d7c4f..1c5ff74 100644 --- a/script.html +++ b/script.html @@ -720,6 +720,26 @@ function wire(locked) { }); }); + // Throwing a cutaway away. The picture is drawn from the writer's guess at + // what the line is about, so a wrong one is common and there was no way to + // get rid of it - only to redraw and hope. + [].forEach.call(document.querySelectorAll("[data-brollrm]"), function (b) { + b.addEventListener("click", async function () { + hideMsg("msg"); + var idx = parseInt(b.getAttribute("data-brollrm"), 10); + b.disabled = true; b.textContent = "Removing…"; + var r = await api("update_shot", { email: email, project_id: pid, + index: idx, broll_clear: true }); + if (!r.ok) { + b.disabled = false; b.textContent = "Remove cutaway"; + showMsg("msg", r.error || "Could not remove that."); + return; + } + showMsg("msg", "Cutaway removed from shot " + idx + ".", "ok"); + load(); + }); + }); + [].forEach.call(document.querySelectorAll("[data-broll]"), function (b) { b.addEventListener("click", async function () { hideMsg("msg");