From 218834c175f9c7f2f7e4b03a6073bdd96d0964f8 Mon Sep 17 00:00:00 2001 From: Fabian Stamm Date: Tue, 20 Jun 2017 17:50:09 +0200 Subject: [PATCH] Adding Clone button and ESC key event --- web/index.html | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/web/index.html b/web/index.html index 749e5a6..b69c781 100644 --- a/web/index.html +++ b/web/index.html @@ -140,7 +140,7 @@ } $("#trackname").html(selected.displayName); $("#trackfile").html(selected.file !==undefined ? selected.file : ""); - var t = "IDStundeMinuteSekundeFrameArtNet-KanalArt-Net ValueEditDel"; + var t = "IDStundeMinuteSekundeFrameArtNet-KanalArt-Net ValueCopyEditDel"; var sorted = selected.triggers.sort((a, b)=>{ if(a.time.lmilliseconds < b.time.lmilliseconds) return -1; if(a.time.lmilliseconds > b.time.lmilliseconds) return 1; @@ -155,6 +155,7 @@ t += "" + e.time.lframe + "" t += "" + e.art.subnet + "" t += "" + e.art.value + "" + t += "" t += "" t += "" t += ""; @@ -180,6 +181,23 @@ $("#eval").val(el.art.value); } + function copy(id) { + console.log("edit with id", id) + var el = undefined; + selected.triggers.forEach(e=>{ + if(e.id === id){ + el = e; + } + }) + $("#eh").val(el.time.lhours); + $("#eh").focus(); + $("#em").val(el.time.lminutes); + $("#es").val(el.time.lseconds); + $("#ef").val(el.time.lframe); + $("#esu").val(el.art.subnet); + $("#eval").val(el.art.value); + } + function remove(id) { socket.emit("delete", {track:selected.id, id:id}) console.log("remove with id", id) @@ -219,6 +237,18 @@ function stopSequence(){ socket.emit("stop"); } + + $(document).keyup(function(e) { + if (e.keyCode === 27) { + $("#eid").val(""); + $("#eh").val(""); + $("#em").val(""); + $("#es").val(""); + $("#ef").val(""); + $("#esu").val(""); + $("#eval").val(""); + } // esc + });