| | |
| | | }; |
| | | |
| | | 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); |
| | |
| | | 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); |
| | | // 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); |
| | | // console.log(responseText); |
| | | self.geraet_schalt_liste(); |
| | | }); |
| | | }); |
| | | }); |
| | |
| | | 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; |
| | | } |