From 1ff360777df36ba9980000823e1131d3e05fdeb7 Mon Sep 17 00:00:00 2001 From: undisclosed Date: Thu, 05 Jan 2023 17:47:11 +0000 Subject: [PATCH] Baustelle begonnen: StreamHandler --- www/js/app.js | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+), 0 deletions(-) diff --git a/www/js/app.js b/www/js/app.js index c664eba..c7f341e 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -494,6 +494,32 @@ console.log('url: ' + url); //window.open(url); }; + + this.gehe_zu_dialog_zeigen = function () { + self.dialog_laden_und_zeigen('data/tpl/gehe-zu.txt', '', function(){ + const form = document.querySelector('form'); + form.addEventListener('submit', function(event) { + // hier gehe zu realisieren + event.preventDefault(); + const data = new FormData(event.target); + const value = Object.fromEntries(data.entries()); + var daten = JSON.stringify(value); + console.log('gehe zu mit ' + daten); + var sekunden = (value['std'] * 3600) + (value['min'] * 60) + (value['sek'] * 1); + if(value['richtung'] === 'zurueck') { + sekunden *= -1; + } + console.log('sekunden: ' + sekunden); + self.dialog_schliessen(); + // HTTP GET /mz/api/strg/abspieler/seek/[sekunden] + self.kommando('seek/' + sekunden); + }); + self.addEvtListener('#cancel-btn', 'click', function(event) { + self.dialog_schliessen(); + }); + self.menue_umschalten(); + }); + }; /* ------------- Verwaltungsfunktionen Abspielliste -------------------- */ -- Gitblit v1.9.3