| | |
| | | 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.addEvtListener('#mi-switch', 'click', self.geraet_schalt_liste); |
| | | |
| | | self.fusszeile_umschalten(); |
| | | self.seitenleiste_umschalten(); |
| | |
| | | }; |
| | | |
| | | this.geraet_schalt_liste = function() { |
| | | self.entitaet_liste('Geräte schalten','../api/store/Geraet/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) { |
| | | var geraet = JSON.parse(responseText); |
| | | self.geraet_status_form(geraet); |
| | | }, function() { |
| | | self.addEvtListener('#ein-btn', 'click', function (event) { |
| | | var geraetName = event.target.attributes.gname.nodeValue; |
| | | //var geraetName = document.querySelector('.schalt-geraet-name').textContent; |
| | | self.http_get('../api/gstrg/geraet/' + geraetName + "/ein", function(responseText) { |
| | | // console.log(responseText); |
| | | self.geraet_schalt_liste(); |
| | | }); |
| | | }); |
| | | self.addEvtListener('#aus-btn', 'click', function (event) { |
| | | var geraetName = event.target.attributes.gname.nodeValue; |
| | | //var geraetName = document.querySelector('.schalt-geraet-name').textContent; |
| | | self.http_get('../api/gstrg/geraet/' + geraetName + "/aus", function(responseText) { |
| | | // console.log(responseText); |
| | | self.geraet_schalt_liste(); |
| | | }); |
| | | }); |
| | | }); |
| | | }; |
| | | |
| | |
| | | this.dialog_unten_zeigen = function() { |
| | | self.vorlage_laden_und_fuellen("data/tpl/ctrl.txt", "", function (html) { |
| | | var dlg = document.querySelector(".dialog-unten"); |
| | | dlg.style.height = '4.5em'; |
| | | dlg.style.height = '10em'; |
| | | dlg.innerHTML = html; |
| | | self.abspieler_auswahl_fuellen(); |
| | | self.abspielliste_auswahl_fuellen(); |
| | |
| | | |
| | | self.addEvtListener('#weg-btn', 'click', self.titelWeg); |
| | | self.addEvtListener('#leeren-btn', 'click', self.alleTitelEntfernen); |
| | | |
| | | self.addEvtListener('#media-btn', 'click', self.media_liste); |
| | | self.addEvtListener('#plst-btn', 'click', self.titel_liste); |
| | | self.addEvtListener('#live-btn', 'click', self.livestream_liste); |
| | | self.addEvtListener('#switch-btn', 'click', self.geraet_schalt_liste); |
| | | |
| | | self.media_liste(); |
| | | }); |
| | | }; |
| | |
| | | * self.ablageort_form(ablageort); |
| | | * }); |
| | | */ |
| | | this.entitaet_liste = function(bname, listUrl, tpl, storeUrl, formFunc, cb) { |
| | | this.entitaet_liste = function(bname, listUrl, tpl, storeUrl, formFunc, cb, customListCode) { |
| | | self.reset_top_buttons(); |
| | | document.querySelector('.bereich-name').textContent = bname; |
| | | var bb = document.querySelector('.breadcrumb-behaelter'); |
| | |
| | | //self.addEvtListener('#neu-btn', 'click', function (event) { |
| | | self.addEvtListener('#top-neu-btn', 'click', function(event) { |
| | | eval(formFunc + "(this)"); |
| | | }); |
| | | }); |
| | | if(typeof(customListCode) !== 'function') { |
| | | // .. |
| | | } else { |
| | | customListCode(); |
| | | } |
| | | }); |
| | | }); |
| | | }; |
| | |
| | | this.album = a; |
| | | } |
| | | |
| | | function Geraet(n, e, a, s) { |
| | | function Geraet(n, e, a, s, st) { |
| | | this.name = n; |
| | | this.einUrl = e; |
| | | this.ausUrl = a; |
| | | this.statusUrl = s; |
| | | this.status = st; |
| | | } |