summaryrefslogtreecommitdiffstats
path: root/f/scripts
diff options
context:
space:
mode:
authorokalintu <ilkka.oksanen@aalto.fi>2015-03-09 16:12:45 +0200
committerokalintu <ilkka.oksanen@aalto.fi>2015-03-09 16:12:45 +0200
commitf5e82d12e4e5cf2959a38b73271abc2eab434519 (patch)
tree8ab28dc2d797b6ab4b231a61cb322800f595be27 /f/scripts
parentf607dac15deb8b9faeb060661ccf8edd2b9564fc (diff)
sanitized log and added outdated property to admin
Diffstat (limited to 'f/scripts')
-rw-r--r--f/scripts/client.js7
1 files changed, 7 insertions, 0 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){