' : '')
+ + ''
+ + '';
+ }).join("")
+ + '';
+ [].forEach.call(el.querySelectorAll("[data-restore]"), function (b) {
+ b.onclick = async function () {
+ if (!confirm("Bring that take back as the current video? The one you are leaving is kept.")) return;
+ b.disabled = true; b.textContent = "Restoring…";
+ var s = await api("restore_version", { email: email, project_id: pid,
+ index: parseInt(b.getAttribute("data-restore"), 10) });
+ if (!s.ok) { b.disabled = false; b.textContent = "Use this one"; showMsg("msg", s.error || "Could not restore that."); return; }
+ showMsg("msg", s.status_text || "Restored.", "ok");
+ load();
+ };
+ });
+}
+
+function bindPost() {
+ loadTakes();
+ // The editing bay is opt-in. Most people want to watch the thing and leave.
var eo = document.getElementById("edlopen");
if (eo) eo.onclick = function () {
var w = document.getElementById("edlwrap");