Storyboard: Make this shot (picture then clip) with a stage line, elapsed time and self-refresh
This commit is contained in:
parent
d15f469d45
commit
3e107b190b
1 changed files with 18 additions and 2 deletions
20
trailer.html
20
trailer.html
|
|
@ -1485,7 +1485,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
var tools;
|
var tools;
|
||||||
if (s.drawing) tools = '<span class="busy">drawing…</span>';
|
if (s.making && (s.drawing || stillFilming(s))) {
|
||||||
|
var since = Date.parse(s.making_since || "") || Date.now(), mins = Math.floor((Date.now() - since) / 60000), secs = Math.floor(((Date.now() - since) % 60000) / 1000);
|
||||||
|
var expect = /drawing/.test(s.making) ? "the picture takes about a minute, then the clip 3 to 5 minutes" : "the clip takes 3 to 5 minutes";
|
||||||
|
tools = '<span class="busy">Making this shot: ' + esc(s.making) + ' · ' + mins + ':' + String(secs).padStart(2, "0") + ' elapsed · ' + expect + '. This page refreshes itself; the clip appears here when it is done.</span>';
|
||||||
|
}
|
||||||
|
else if (s.drawing) tools = '<span class="busy">drawing…</span>';
|
||||||
else if (stillFilming(s)) tools = '<span class="busy">filming…</span>';
|
else if (stillFilming(s)) tools = '<span class="busy">filming…</span>';
|
||||||
else if (EDITING === s.id) {
|
else if (EDITING === s.id) {
|
||||||
tools = '<div style="width:100%"><textarea class="rough" id="rough" rows="3" placeholder="'
|
tools = '<div style="width:100%"><textarea class="rough" id="rough" rows="3" placeholder="'
|
||||||
|
|
@ -1494,7 +1499,10 @@
|
||||||
+ '">Rewrite this shot</button>'
|
+ '">Rewrite this shot</button>'
|
||||||
+ '<button type="button" class="btn" data-cancel="1">Cancel</button></div></div>';
|
+ '<button type="button" class="btn" data-cancel="1">Cancel</button></div></div>';
|
||||||
} else {
|
} else {
|
||||||
tools = '<button type="button" class="btn" data-edit="' + esc(s.id) + '">Change this shot</button>'
|
tools = (s.make_error ? '<div class="warn" style="width:100%">' + esc(s.make_error) + '</div>' : '')
|
||||||
|
+ '<button type="button" class="btn primary" data-make="' + esc(s.id) + '" title="Draws the picture (the actors in the background) and then films the clip, in one go">'
|
||||||
|
+ (s.clip_url ? 'Make this shot again' : (s.opening_url && !s.picture_stale ? 'Make this shot (film the picture)' : 'Make this shot')) + ' · about $' + ((s.opening_url && !s.picture_stale ? 0 : 0.14) + filmCost(s)).toFixed(2) + '</button>'
|
||||||
|
+ '<button type="button" class="btn" data-edit="' + esc(s.id) + '">Change this shot</button>'
|
||||||
+ '<button type="button" class="btn" data-drawone="' + esc(s.id) + '">'
|
+ '<button type="button" class="btn" data-drawone="' + esc(s.id) + '">'
|
||||||
+ (s.opening_url ? 'Redraw the shot picture' : 'Draw the shot picture (actors in the background)') + ' · $0.14</button>'
|
+ (s.opening_url ? 'Redraw the shot picture' : 'Draw the shot picture (actors in the background)') + ' · $0.14</button>'
|
||||||
+ (s.opening_url ? '<button type="button" class="btn" data-filmone="' + esc(s.id) + '">'
|
+ (s.opening_url ? '<button type="button" class="btn" data-filmone="' + esc(s.id) + '">'
|
||||||
|
|
@ -1550,6 +1558,14 @@
|
||||||
var el, r;
|
var el, r;
|
||||||
|
|
||||||
if ((el = hit("data-cancel"))) { EDITING = null; openTab(CUR); return; }
|
if ((el = hit("data-cancel"))) { EDITING = null; openTab(CUR); return; }
|
||||||
|
if ((el = hit("data-make"))) {
|
||||||
|
el.disabled = true;
|
||||||
|
var msid = el.getAttribute("data-make");
|
||||||
|
r = await act("make_shot", { draft_id: CUR, shot_id: msid });
|
||||||
|
if (r) { showMsg("msg", "Making shot " + msid + (r.redraw ? ": picture first, then the clip" : ": filming the picture") + " - about $" + r.usd + ", roughly " + r.minutes + " minutes. The page refreshes itself.", "ok"); await refresh(); }
|
||||||
|
else el.disabled = false;
|
||||||
|
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