diff --git a/public/js/app.js b/public/js/app.js index 775a50e..ca8d419 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -21,7 +21,6 @@ angular.module('roomstateapp.controllers', []). Socket.on('sdata', function(message) { console.log("received data from server: " + message.data.names); - stateNotification(message.data.state); $scope.simple = message.data; gpower.refresh(message.data.power); }); @@ -84,26 +83,3 @@ gpower = new JustGage({ }); }); - -function stateNotification(state) { - if (state == true && laststate != true && laststate != null) { - laststate = true; - showNotification("CTDO - Status", "Der Chaostreff ist nun offen.", "/img/green.png", 4); - } else if (state == false && laststate != false && laststate != null) { - laststate = false; - showNotification("CTDO - Staus", "Der Chaostreff ist nun geschlossen", "/img/red.png", 4); - } else { - laststate = state; - } -} - -function toggle() { - toggleNotifications(); - if (enabledNotifications === true) { - document.getElementById("notificationButton").innerHTML = "Statusbenachrichtigungen an"; - document.getElementById("notificationButton").className = "btn btn-block btn-success"; - } else { - document.getElementById("notificationButton").innerHTML = "Statusbenachrichtigungen aus"; - document.getElementById("notificationButton").className = "btn btn-block btn-danger"; - } -} \ No newline at end of file