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 = "
ID | Stunde | Minute | Sekunde | Frame | ArtNet-Kanal | Art-Net Value | Edit | Del |
";
+ var t = "ID | Stunde | Minute | Sekunde | Frame | ArtNet-Kanal | Art-Net Value | Copy | Edit | Del |
";
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
+ });