Storyboard: shot length is editable - Estimate from the lines or the action, Set length
This commit is contained in:
parent
8fc8179231
commit
a7f7d326f1
1 changed files with 20 additions and 1 deletions
21
trailer.html
21
trailer.html
|
|
@ -1516,7 +1516,10 @@
|
||||||
return '<div class="shot"><div class="num">' + esc(s.id) + '</div><div class="body">'
|
return '<div class="shot"><div class="num">' + esc(s.id) + '</div><div class="body">'
|
||||||
+ '<h3>' + esc(s.title || "") + '</h3>'
|
+ '<h3>' + esc(s.title || "") + '</h3>'
|
||||||
+ '<div class="where">' + esc(s.setting || "") + ' · '
|
+ '<div class="where">' + esc(s.setting || "") + ' · '
|
||||||
+ Number(s.edit_seconds || 0).toFixed(1) + 's'
|
+ '<span class="secs"><input type="number" step="0.5" min="3" max="15" value="' + Number(s.edit_seconds || 0).toFixed(1) + '" data-secs="' + esc(s.id) + '" style="width:58px;font:inherit;font-size:12px"> s '
|
||||||
|
+ '<button type="button" class="btn small ghost" data-estsecs="' + esc(s.id) + '" title="From the lines (speaking time plus a lead-in and a lead-out), or from the action for a silent shot">Estimate</button>'
|
||||||
|
+ '<button type="button" class="btn small ghost" data-setsecs="' + esc(s.id) + '">Set length</button>'
|
||||||
|
+ '<span class="tiny" data-secsnote="' + esc(s.id) + '"></span></span>'
|
||||||
+ (s.scene ? ' · <span class="scene">' + esc(s.scene) + '</span>' : '')
|
+ (s.scene ? ' · <span class="scene">' + esc(s.scene) + '</span>' : '')
|
||||||
+ (s.day ? ' · <span class="scene">' + esc(s.day) + '</span>' : '')
|
+ (s.day ? ' · <span class="scene">' + esc(s.day) + '</span>' : '')
|
||||||
+ '</div>'
|
+ '</div>'
|
||||||
|
|
@ -1570,6 +1573,22 @@
|
||||||
else el.disabled = false;
|
else el.disabled = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if ((el = hit("data-estsecs"))) {
|
||||||
|
var esid = el.getAttribute("data-estsecs");
|
||||||
|
r = await act("estimate_seconds", { draft_id: CUR, shot_id: esid });
|
||||||
|
if (r) {
|
||||||
|
var inp = document.querySelector('[data-secs="' + esid + '"]'), nt = document.querySelector('[data-secsnote="' + esid + '"]');
|
||||||
|
if (inp) inp.value = Number(r.suggested).toFixed(1);
|
||||||
|
if (nt) nt.textContent = " suggested " + Number(r.suggested).toFixed(1) + " s (" + r.why + "; now " + Number(r.current).toFixed(1) + " s) - press Set length to keep it";
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if ((el = hit("data-setsecs"))) {
|
||||||
|
var ssid = el.getAttribute("data-setsecs"), sinp = document.querySelector('[data-secs="' + ssid + '"]');
|
||||||
|
r = await act("set_seconds", { draft_id: CUR, shot_id: ssid, seconds: sinp ? sinp.value : "" });
|
||||||
|
if (r) { showMsg("msg", "Shot " + ssid + " is now " + Number(r.seconds).toFixed(1) + " s." + (PKG.shots.some(function (x) { return x.id === ssid && x.clip_url; }) ? " The clip was filmed at the old length; make the shot again to refilm." : ""), "ok"); await refresh(); }
|
||||||
|
return;
|
||||||
|
}
|
||||||
if ((el = hit("data-bgedit"))) { BGEDIT = el.getAttribute("data-bgedit"); openTab(CUR); return; }
|
if ((el = hit("data-bgedit"))) { BGEDIT = el.getAttribute("data-bgedit"); openTab(CUR); return; }
|
||||||
if ((el = hit("data-bgcancel"))) { BGEDIT = null; openTab(CUR); return; }
|
if ((el = hit("data-bgcancel"))) { BGEDIT = null; openTab(CUR); return; }
|
||||||
if ((el = hit("data-bggen"))) {
|
if ((el = hit("data-bggen"))) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue