| | |
| | | var cache; // mustache templates |
| | | var ortPfad; |
| | | var mediaPfad; |
| | | var katUrl; |
| | | var selTitel; |
| | | //var katUrl; |
| | | //var selTitel; |
| | | var katName; |
| | | |
| | | this.init = function () { |
| | |
| | | self.seitenleiste_umschalten(); |
| | | self.dialog_unten_zeigen(); |
| | | }; |
| | | |
| | | |
| | | /* ---------------- Entitaets-Listen ----------------- */ |
| | | |
| | | this.livestream_selection = function() { |
| | |
| | | self.mediaPfad = neuerPfad; |
| | | self.media_liste(); |
| | | }); |
| | | var url = '/tango' + self.ortPfad + self.mediaPfad; |
| | | //var url = '/tango' + self.ortPfad + self.mediaPfad; |
| | | var url = '.' + self.ortPfad + self.mediaPfad; |
| | | if(!url.endsWith('/')) { |
| | | url = url + '/'; |
| | | } |
| | |
| | | self.http_call('DELETE', u, data, cb); |
| | | }; |
| | | |
| | | this.http_call = function (method, u, data, scallback) { |
| | | this.http_call = function (method, callurl, data, scallback) { |
| | | var xhr = new XMLHttpRequest(); |
| | | var url = u; |
| | | xhr.onreadystatechange = function () { |
| | | if (this.readyState === 4 && this.status === 200) { |
| | | scallback(this.responseText); |
| | | } |
| | | }; |
| | | xhr.open(method, url); |
| | | xhr.open(method, callurl); |
| | | if (method === 'GET') { |
| | | xhr.send(); |
| | | } else if (method === 'POST' || method === 'PUT' || method === 'DELETE') { |