| File was renamed from www/ui/js/app.js | 
 |  |  | 
 |  |  |   this.livestream_selection = function() { | 
 |  |  |     document.querySelector('.breadcrumb-behaelter').textContent = ''; | 
 |  |  |     document.querySelector('.bereich-name').textContent = 'Livestream-Auswahl';  | 
 |  |  |     self.http_get('../api/store/Livestream/liste/', function(responseText) { | 
 |  |  |     self.http_get('api/store/Livestream/liste/', function(responseText) { | 
 |  |  |       self.html_erzeugen("data/tpl/livestream_liste.txt", JSON.parse(responseText), function (html) { | 
 |  |  |         document.querySelector(".zentraler-inhalt").innerHTML = html; | 
 |  |  |         self.addEvtListener('.entity-eintrag', 'click', function (event) { | 
 |  |  | 
 |  |  |       var bb = document.querySelector('.breadcrumb-behaelter'); | 
 |  |  |       bb.textContent = "Kataloge"; | 
 |  |  |       // Kataloge listen | 
 |  |  |       self.http_get('../api/store/Ablageort/liste/', function (responseText) { | 
 |  |  |       self.http_get('api/store/Ablageort/liste/', function (responseText) { | 
 |  |  |         //document.querySelector('#top-up-btn').removeEventListener('click', self.media_liste_herauf); | 
 |  |  |         self.html_erzeugen("data/tpl/katalog_root_liste.txt", JSON.parse(responseText), function (html) { | 
 |  |  |           document.querySelector(".zentraler-inhalt").innerHTML = html; | 
 |  |  | 
 |  |  |             var t = event.target; | 
 |  |  |             self.katName = t.textContent; | 
 |  |  |             if(self.katName !== "Livestreams") { | 
 |  |  |               self.http_get('../api/store/Ablageort/' + t.textContent, function(responseText) { | 
 |  |  |               self.http_get('api/store/Ablageort/' + t.textContent, function(responseText) { | 
 |  |  |                 var ablageort = JSON.parse(responseText); | 
 |  |  |                 self.ortPfad = ablageort.url; | 
 |  |  |                 self.media_liste(); | 
 |  |  | 
 |  |  |         self.mediaPfad = neuerPfad; | 
 |  |  |         self.media_liste(); | 
 |  |  |       }); | 
 |  |  |       var url = '..' + self.ortPfad + self.mediaPfad; | 
 |  |  |       var url = self.ortPfad + self.mediaPfad; | 
 |  |  |       if(!url.endsWith('/')) { | 
 |  |  |         url = url + '/'; | 
 |  |  |       } | 
 |  |  | 
 |  |  |       var nameElem = event.target.parentNode.querySelector('.schalt-geraet-name'); | 
 |  |  |       if(nameElem.classList.contains('schalt-geraet-true')) { | 
 |  |  |         // ausschalten | 
 |  |  |         self.http_get('../api/gstrg/geraet/' + geraetName + "/aus", function(responseText) { | 
 |  |  |         self.http_get('api/gstrg/geraet/' + geraetName + "/aus", function(responseText) { | 
 |  |  |           // console.log(responseText); | 
 |  |  |           self.geraet_schalt_liste(); | 
 |  |  |         }); | 
 |  |  |       } else { | 
 |  |  |         // einschalten             | 
 |  |  |         self.http_get('../api/gstrg/geraet/' + geraetName + "/ein", function(responseText) { | 
 |  |  |         self.http_get('api/gstrg/geraet/' + geraetName + "/ein", function(responseText) { | 
 |  |  |           // console.log(responseText); | 
 |  |  |           self.geraet_schalt_liste(); | 
 |  |  |         }); | 
 |  |  | 
 |  |  |     /*self.entitaet_liste('Geräte schalten','../api/store/Geraet/listealles/',  | 
 |  |  |       "data/tpl/geraet_schalt_liste.txt", '../api/store/Geraet/',  | 
 |  |  |       "self.form_geraet_status", function(responseText) {*/ | 
 |  |  |     self.entitaet_liste('Geräte schalten','../api/store/Geraet/listealles/',  | 
 |  |  |       "data/tpl/geraet_schalt_liste.txt", '../api/store/Geraet/',  | 
 |  |  |     self.entitaet_liste('Geräte schalten','api/store/Geraet/listealles/',  | 
 |  |  |       "data/tpl/geraet_schalt_liste.txt", 'api/store/Geraet/',  | 
 |  |  |       "", 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.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/',  | 
 |  |  |     self.entitaet_liste('Kataloge','api/store/Ablageort/liste/',  | 
 |  |  |       "data/tpl/ablageort_liste.txt", 'api/store/Ablageort/',  | 
 |  |  |       "self.ablageort_form", function(responseText) { | 
 |  |  |         var ablageort = JSON.parse(responseText); | 
 |  |  |         self.ablageort_form(ablageort); | 
 |  |  | 
 |  |  |   }; | 
 |  |  |  | 
 |  |  |   this.prefs_liste = function() { | 
 |  |  |     self.entitaet_liste('Einstellungen','../api/store/Einstellung/liste/',  | 
 |  |  |       "data/tpl/einstellung_liste.txt", '../api/store/Einstellung/',  | 
 |  |  |     self.entitaet_liste('Einstellungen','api/store/Einstellung/liste/',  | 
 |  |  |       "data/tpl/einstellung_liste.txt", 'api/store/Einstellung/',  | 
 |  |  |       "self.prefs_form", function(responseText) { | 
 |  |  |         var einstellung = JSON.parse(responseText); | 
 |  |  |         self.prefs_form(einstellung); | 
 |  |  | 
 |  |  |   }; | 
 |  |  |  | 
 |  |  |   this.abspieler_liste = function() { | 
 |  |  |     self.entitaet_liste('Abspieler','../api/store/Abspieler/liste/',  | 
 |  |  |       "data/tpl/abspieler_liste.txt", '../api/store/Abspieler/',  | 
 |  |  |     self.entitaet_liste('Abspieler','api/store/Abspieler/liste/',  | 
 |  |  |       "data/tpl/abspieler_liste.txt", 'api/store/Abspieler/',  | 
 |  |  |       "self.abspieler_form", function(responseText) { | 
 |  |  |         var abspieler = JSON.parse(responseText); | 
 |  |  |         self.abspieler_form(abspieler); | 
 |  |  | 
 |  |  |   }; | 
 |  |  |    | 
 |  |  |   this.livestream_liste = function() { | 
 |  |  |     self.entitaet_liste('Livestreams','../api/store/Livestream/liste/',  | 
 |  |  |       "data/tpl/livestream_liste.txt", '../api/store/Livestream/',  | 
 |  |  |     self.entitaet_liste('Livestreams','api/store/Livestream/liste/',  | 
 |  |  |       "data/tpl/livestream_liste.txt", 'api/store/Livestream/',  | 
 |  |  |       "self.livestream_form", function(responseText) { | 
 |  |  |         var livestream = JSON.parse(responseText); | 
 |  |  |         self.livestream_form(livestream); | 
 |  |  | 
 |  |  |   }; | 
 |  |  |    | 
 |  |  |   this.abspielliste_liste = function() { | 
 |  |  |     self.entitaet_liste('Abspielliste','../api/store/Abspielliste/liste/',  | 
 |  |  |       "data/tpl/abspielliste_liste.txt", '../api/store/Abspielliste/',  | 
 |  |  |     self.entitaet_liste('Abspielliste','api/store/Abspielliste/liste/',  | 
 |  |  |       "data/tpl/abspielliste_liste.txt", 'api/store/Abspielliste/',  | 
 |  |  |       "self.abspielliste_form", function(responseText) { | 
 |  |  |         //console.log("responseTest: '" + responseText + "'"); | 
 |  |  |         var abspielliste = JSON.parse(responseText); | 
 |  |  | 
 |  |  |    | 
 |  |  |   this.abspielliste_form = function(al) { | 
 |  |  |     self.entitaet_form('Abspielliste', al, al.name, | 
 |  |  |       "data/tpl/form_abspielliste.txt", '../api/store/Abspielliste/', | 
 |  |  |       "data/tpl/form_abspielliste.txt", 'api/store/Abspielliste/', | 
 |  |  |       '#abspielliste-name', 'name', function(event) { | 
 |  |  |           if(event !== undefined) { | 
 |  |  |             event.preventDefault(); | 
 |  |  | 
 |  |  |    | 
 |  |  |   this.abspieler_form = function(pl) { | 
 |  |  |     self.entitaet_form('Abspieler', pl, pl.key, | 
 |  |  |       "data/tpl/form_abspieler.txt", '../api/store/Abspieler/', | 
 |  |  |       "data/tpl/form_abspieler.txt", 'api/store/Abspieler/', | 
 |  |  |       '#abspieler-name', 'name', function() {  | 
 |  |  |           self.abspieler_auswahl_fuellen(); | 
 |  |  |           self.abspieler_liste(); | 
 |  |  | 
 |  |  |  | 
 |  |  |   this.livestream_form = function(ls) { | 
 |  |  |     self.entitaet_form('Livestream', ls, ls.name, | 
 |  |  |       "data/tpl/form_livestream.txt", '../api/store/Livestream/', | 
 |  |  |       "data/tpl/form_livestream.txt", 'api/store/Livestream/', | 
 |  |  |       '#livestream-name', '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/', | 
 |  |  |       "data/tpl/form_geraet.txt", 'api/store/Geraet/', | 
 |  |  |       '#geraet-name', '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/', | 
 |  |  |       "data/tpl/form_geraet_status.txt", 'api/store/Geraet/', | 
 |  |  |       '#geraet-name', 'name', function() {  | 
 |  |  |           self.geraet_schalt_liste(); | 
 |  |  |     }); | 
 |  |  | 
 |  |  |  | 
 |  |  |   this.prefs_form = function(k) { | 
 |  |  |     self.entitaet_form('Einstellung', k, k.key, | 
 |  |  |       "data/tpl/form_einstellung.txt", '../api/store/Einstellung/', | 
 |  |  |       "data/tpl/form_einstellung.txt", 'api/store/Einstellung/', | 
 |  |  |       '#einstellung-key', 'key', function() {  | 
 |  |  |           self.prefs_liste(); | 
 |  |  |     }); | 
 |  |  | 
 |  |  |    */ | 
 |  |  |   this.ablageort_form = function(ort) { | 
 |  |  |     self.entitaet_form('Katalog', ort, ort.name, | 
 |  |  |       "data/tpl/form_ablageort.txt", '../api/store/Ablageort/', | 
 |  |  |       "data/tpl/form_ablageort.txt", 'api/store/Ablageort/', | 
 |  |  |       '#ablageort-name', 'name', function() {  | 
 |  |  |         self.ablageort_liste(); | 
 |  |  |     }); | 
 |  |  | 
 |  |  |   }; | 
 |  |  |    | 
 |  |  |   this.abspieler_auswahl_fuellen = function() { | 
 |  |  |     self.http_get('../api/store/Abspieler/liste/', function (responseText) { | 
 |  |  |     self.http_get('api/store/Abspieler/liste/', function (responseText) { | 
 |  |  |       self.html_erzeugen("data/tpl/abs_sel.txt", JSON.parse(responseText), function (html) { | 
 |  |  |         document.querySelector(".abs-sel").innerHTML = html; | 
 |  |  |       });     | 
 |  |  | 
 |  |  |   }; | 
 |  |  |  | 
 |  |  |   this.abspielliste_auswahl_fuellen = function() { | 
 |  |  |     self.http_get('../api/store/Abspielliste/', function (responseText) { | 
 |  |  |     self.http_get('api/store/Abspielliste/', function (responseText) { | 
 |  |  |       self.html_erzeugen("data/tpl/pl_sel.txt", JSON.parse(responseText), function (html) { | 
 |  |  |         document.querySelector(".pl-sel").innerHTML = html; | 
 |  |  |         self.addEvtListener('#playlist', 'change', function() { | 
 |  |  | 
 |  |  |     document.querySelector('.bereich-name').textContent = 'Abspielliste ' + plname; | 
 |  |  |     var bb = document.querySelector('.breadcrumb-behaelter'); | 
 |  |  |     bb.textContent = ""; | 
 |  |  |     self.http_get('../api/alist/' + plname, function (responseText) { | 
 |  |  |     self.http_get('api/alist/' + plname, function (responseText) { | 
 |  |  |       self.html_erzeugen("data/tpl/titel_liste.txt", JSON.parse(responseText), function (html) { | 
 |  |  |         document.querySelector(".zentraler-inhalt").innerHTML = html; | 
 |  |  |         self.addEvtListener('.entity-eintrag', 'click', function (event) { | 
 |  |  | 
 |  |  |       var titel = self.titelErmitteln(document.querySelector(".selected")); | 
 |  |  |       var playername = document.querySelector('#abspieler').value; | 
 |  |  |       console.log('plname: ' + playername + ' url: ' + titel.katalogUrl + titel.pfad + titel.name); | 
 |  |  |       self.http_post('../api/strg/' + playername + '/play/titel', JSON.stringify(titel), function(responseText) { | 
 |  |  |       self.http_post('api/strg/' + playername + '/play/titel', JSON.stringify(titel), function(responseText) { | 
 |  |  |         self.meldung_mit_timeout(responseText, 1500); | 
 |  |  |       });    | 
 |  |  |     } else if(bereichName === 'Livestream-Auswahl') { | 
 |  |  |       var streamName = document.querySelector(".selected").textContent; | 
 |  |  |       var playername = document.querySelector('#abspieler').value; | 
 |  |  |       var stream = new Livestream(streamName, '-'); | 
 |  |  |       self.http_post('../api/strg/' + playername + '/play/stream', JSON.stringify(stream), function(responseText) { | 
 |  |  |       self.http_post('api/strg/' + playername + '/play/stream', JSON.stringify(stream), function(responseText) { | 
 |  |  |         self.meldung_mit_timeout(responseText, 1500); | 
 |  |  |       });    | 
 |  |  |     } else { | 
 |  |  | 
 |  |  |       console.log( | 
 |  |  |         "play playlist.value: " + document.querySelector('#playlist').value +  | 
 |  |  |         ", abspieler.value: " + document.querySelector('#abspieler').value); | 
 |  |  |       self.http_get('../api/strg/' + abs + '/play/liste/' + lst, function(responseText) { | 
 |  |  |       self.http_get('api/strg/' + abs + '/play/liste/' + lst, function(responseText) { | 
 |  |  |         self.meldung_mit_timeout(responseText, 1500); | 
 |  |  |       }); | 
 |  |  |     } | 
 |  |  | 
 |  |  |       var titel = self.titelErmitteln(document.querySelector(".selected")); | 
 |  |  |       var playername = document.querySelector('#abspieler').value; | 
 |  |  |       console.log('plname: ' + playername + ' url: ' + titel.katalogUrl + titel.pfad + titel.name); | 
 |  |  |       self.http_post('../api/strg/' + playername + '/weiter/titel', JSON.stringify(titel), function(responseText) { | 
 |  |  |       self.http_post('api/strg/' + playername + '/weiter/titel', JSON.stringify(titel), function(responseText) { | 
 |  |  |         self.meldung_mit_timeout(responseText, 1500); | 
 |  |  |       });    | 
 |  |  |     } | 
 |  |  | 
 |  |  |    | 
 |  |  |   this.kommando = function(kommando) { | 
 |  |  |     var abs = document.querySelector('#abspieler').value; | 
 |  |  |     self.http_get('../api/strg/' + abs + '/' + kommando, function(responseText) { | 
 |  |  |     self.http_get('api/strg/' + abs + '/' + kommando, function(responseText) { | 
 |  |  |       self.meldung_mit_timeout(responseText, 1500); | 
 |  |  |     }); | 
 |  |  |   }; | 
 |  |  | 
 |  |  |       var streamName = document.querySelector(".selected").textContent; | 
 |  |  |       // hier den Stream-URL abrufen | 
 |  |  |       //GET /mz/api/store/[typname]/[name] | 
 |  |  |       self.http_get('../api/store/Livestream/' + streamName, function(responseText) { | 
 |  |  |       self.http_get('api/store/Livestream/' + streamName, function(responseText) { | 
 |  |  |         var stream = JSON.parse(responseText);         | 
 |  |  |         url = stream.url; | 
 |  |  |         window.open(url); | 
 |  |  | 
 |  |  |    | 
 |  |  |   self.alleTitelEntfernen = function() { | 
 |  |  |     var plname = document.querySelector('#playlist').value; | 
 |  |  |     self.http_delete('../api/alist/' + plname + '/alle', '', function(responseText) { | 
 |  |  |     self.http_delete('api/alist/' + plname + '/alle', '', function(responseText) { | 
 |  |  |       // DELETE    http://localhost:9090/mz/api/alist/liste1/0 | 
 |  |  |       //self.meldung_mit_timeout(responseText, 1500); | 
 |  |  |       self.titel_liste(); | 
 |  |  | 
 |  |  |     } | 
 |  |  |     */ | 
 |  |  |     var plname = document.querySelector('#playlist').value; | 
 |  |  |     self.http_put('../api/alist/' + plname, JSON.stringify(titel), function(responseText) { | 
 |  |  |     self.http_put('api/alist/' + plname, JSON.stringify(titel), function(responseText) { | 
 |  |  |       //self.meldung_mit_timeout(responseText, 1500); | 
 |  |  |     }); | 
 |  |  |   };   | 
 |  |  | 
 |  |  |     } | 
 |  |  |     // /mz/api/alist/[pl-name]/[nr]  | 
 |  |  |     var plname = document.querySelector('#playlist').value; | 
 |  |  |     self.http_delete('../api/alist/' + plname + '/' + index,'', function(responseText) { | 
 |  |  |     self.http_delete('api/alist/' + plname + '/' + index,'', function(responseText) { | 
 |  |  |       // DELETE    http://localhost:9090/mz/api/alist/liste1/0 | 
 |  |  |       //self.meldung_mit_timeout(responseText, 1500); | 
 |  |  |       self.titel_liste(); |