| | |
| | | self.addEvtListener('#mi-listen', 'click', self.abspielliste_liste); |
| | | self.addEvtListener('#mi-list', 'click', self.titel_liste); |
| | | self.addEvtListener('#mi-live', 'click', self.livestream_liste); |
| | | self.addEvtListener('#mi-devices', 'click', self.geraet_liste); |
| | | |
| | | self.fusszeile_umschalten(); |
| | | self.seitenleiste_umschalten(); |
| | |
| | | } |
| | | }; |
| | | |
| | | this.geraet_schalt_liste = function() { |
| | | self.entitaet_liste('Geräte schalten','../api/store/Geraet/liste/', |
| | | "data/tpl/geraet_schalt_liste.txt", '../api/store/Geraet/', |
| | | "self.form_geraet_status", function(responseText) { |
| | | var geraet = JSON.parse(responseText); |
| | | self.geraet_status_form(geraet); |
| | | }); |
| | | }; |
| | | |
| | | this.geraet_liste = function() { |
| | | self.entitaet_liste('Geräte','../api/store/Geraet/liste/', |
| | | "data/tpl/geraet_liste.txt", '../api/store/Geraet/', |
| | | "self.geraet_form", function(responseText) { |
| | | var geraet = JSON.parse(responseText); |
| | | self.geraet_form(geraet); |
| | | }); |
| | | }; |
| | | |
| | | this.ablageort_liste = function() { |
| | | self.entitaet_liste('Kataloge','../api/store/Ablageort/liste/', |
| | | "data/tpl/ablageort_liste.txt", '../api/store/Ablageort/', |
| | |
| | | "data/tpl/form_livestream.txt", '../api/store/Livestream/', |
| | | '#livestream-name', function() { |
| | | self.livestream_liste(); |
| | | }); |
| | | }; |
| | | |
| | | this.geraet_form = function(ge) { |
| | | self.entitaet_form('Gerät', ge, ge.name, |
| | | "data/tpl/form_geraet.txt", '../api/store/Geraet/', |
| | | '#geraet-name', function() { |
| | | self.geraet_liste(); |
| | | }); |
| | | }; |
| | | |
| | | this.geraet_status_form = function(ge) { |
| | | self.entitaet_form('Gerät', ge, ge.name, |
| | | "data/tpl/form_geraet_status.txt", '../api/store/Geraet/', |
| | | '#geraet-name', function() { |
| | | self.geraet_schalt_liste(); |
| | | }); |
| | | }; |
| | | |
| | |
| | | event.preventDefault(); |
| | | const data = new FormData(event.target); |
| | | const value = Object.fromEntries(data.entries()); |
| | | //console.log({ value }); |
| | | //console.log(JSON.stringify(value)); |
| | | var daten = JSON.stringify(value); |
| | | var formkey = document.querySelector(keySelector).value; |
| | | formkey = formkey.replace(' ', '').replace(/[\W]+/g, ''); |
| | |
| | | this.interpret = i; |
| | | this.titelAnzName = t; |
| | | this.album = a; |
| | | } |
| | | |
| | | function Geraet(n, e, a, s) { |
| | | this.name = n; |
| | | this.einUrl = e; |
| | | this.ausUrl = a; |
| | | this.statusUrl = s; |
| | | } |