| | |
| | | } |
| | | }; |
| | | |
| | | this.geraet_schalt_liste = function() { |
| | | 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() { |
| | | this.ein_aus_btn = function() { |
| | | self.addEvtListener('#ein-aus-btn', 'click', function (event) { |
| | | var geraetName = event.target.attributes.gname.nodeValue; |
| | | var nameElem = event.target.parentNode.querySelector('.schalt-geraet-name'); |
| | |
| | | self.geraet_schalt_liste(); |
| | | }); |
| | | } |
| | | /* |
| | | 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.geraet_schalt_liste = function() { |
| | | /*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/', |
| | | "", function(responseText) { |
| | | //var geraet = JSON.parse(responseText); |
| | | //self.geraet_status_form(geraet); |
| | | }, self.ein_aus_btn); |
| | | }; |
| | | |
| | | this.geraet_liste = function() { |