From f5e82d12e4e5cf2959a38b73271abc2eab434519 Mon Sep 17 00:00:00 2001 From: okalintu Date: Mon, 9 Mar 2015 16:12:45 +0200 Subject: sanitized log and added outdated property to admin --- f/scripts/client.js | 7 +++++++ f/styles/style.css | 7 ++++++- f/templates/adm.html | 2 +- f/templates/index.html | 12 ++++++++++++ index.js | 21 +++++++++++++++------ 5 files changed, 41 insertions(+), 8 deletions(-) diff --git a/f/scripts/client.js b/f/scripts/client.js index 546aa57..b02123f 100644 --- a/f/scripts/client.js +++ b/f/scripts/client.js @@ -9,6 +9,7 @@ ioc.controller('ioctrl',function($scope){ $scope.row=""; $scope.name=""; $scope.qsize=0; + $scope.outdated = true; $scope.submit = function(){ soc.emit("queadd",{"row":$scope.row,"name":$scope.name,"uid":$scope.uid}); @@ -19,6 +20,7 @@ ioc.controller('ioctrl',function($scope){ soc.on("quedata",function(data){ $scope.que=data; $scope.qsize=data.length; + $scope.outdated = false; $scope.$apply(); }); @@ -27,11 +29,16 @@ ioc.controller('ioctrl',function($scope){ pw= data.pw; }); + soc.on("disconnect",function(data){ + setTimeout(function(){console.log("blblbl");$scope.uid = data.uid;pw= data.pw;$scope.$apply();},1000) + }); + soc.on("err",function(err){ console.log("error! msg: "+err.msg); }); $scope.popfirst = function(){ + $scope.outdated = true; soc.emit("quepopfirst",""); }; $scope.querm = function(qid){ diff --git a/f/styles/style.css b/f/styles/style.css index ae909c8..d63e083 100644 --- a/f/styles/style.css +++ b/f/styles/style.css @@ -39,7 +39,6 @@ td:first-child{ } #adminscreen{ border:3px solid #202020; - background-color:darkgreen; font-size:72px; width:400px; margin-left:auto; @@ -51,3 +50,9 @@ td:first-child{ #adminscreen td { padding-left:10px; } +.outdated{ +background-color:darkred; +} +.updated{ +background-color:darkgreen; +} diff --git a/f/templates/adm.html b/f/templates/adm.html index bd78764..ae9de77 100644 --- a/f/templates/adm.html +++ b/f/templates/adm.html @@ -9,7 +9,7 @@
- +
diff --git a/f/templates/index.html b/f/templates/index.html index b02d4b8..f5da8a9 100644 --- a/f/templates/index.html +++ b/f/templates/index.html @@ -10,6 +10,18 @@
+

Jono @ jono.dy.fi

+
+

ohjeita

+SPSS löytyy seuraavasti: +
+käynnistävalikko (windowslogo!) -> all programs -> +IBM SPSS statistics -> IBM SPSS statistics 22 +
+ÄLKÄÄ SULKEKO OUTPUT IKKUNAA/IKKUNOITA!! +Niiden sisältöä käytetään tarkistuksessa. +
+
Jonoa: {{qsize}}
Nimi: {{que[0].name}}
Rivi: {{que[0].row}}
Rivi: