From 3866a756db6c85e36d1896af8461682c8c19a2ec Mon Sep 17 00:00:00 2001 From: ulrich Date: Wed, 11 May 2022 08:40:14 +0000 Subject: [PATCH] Rueckmeldung fuer Lautstaerkeregelung unterbunden --- www/js/app.js | 24 ++++++++++++++++-------- 1 files changed, 16 insertions(+), 8 deletions(-) diff --git a/www/js/app.js b/www/js/app.js index 752e918..c664eba 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -4,8 +4,8 @@ var cache; // mustache templates var ortPfad; var mediaPfad; - var katUrl; - var selTitel; + //var katUrl; + //var selTitel; var katName; this.init = function () { @@ -38,7 +38,7 @@ self.seitenleiste_umschalten(); self.dialog_unten_zeigen(); }; - + /* ---------------- Entitaets-Listen ----------------- */ this.livestream_selection = function() { @@ -374,7 +374,14 @@ self.addEvtListener('#plst-btn', 'click', self.titel_liste); self.addEvtListener('#live-btn', 'click', self.livestream_selection); self.addEvtListener('#switch-btn', 'click', self.geraet_schalt_liste); - + + self.addEvtListener('#voldn-btn', 'click', function() { + self.kommando('voldn'); + }); + self.addEvtListener('#volup-btn', 'click', function() { + self.kommando('volup'); + }); + self.media_liste(); }); }; @@ -444,7 +451,9 @@ this.kommando = function(kommando) { var abs = document.querySelector('#abspieler').value; self.http_get('api/strg/' + abs + '/' + kommando, function(responseText) { - self.meldung_mit_timeout(responseText, 1500); + if(kommando !== 'volup' && kommando !== 'voldn') { + self.meldung_mit_timeout(responseText, 1500); + } }); }; @@ -712,15 +721,14 @@ 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') { -- Gitblit v1.9.3