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 +++++++ 1 file changed, 7 insertions(+) (limited to 'f/scripts') 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){ -- cgit v1.3