summaryrefslogtreecommitdiffstats
path: root/f
diff options
context:
space:
mode:
Diffstat (limited to 'f')
-rw-r--r--f/scripts/client.js7
-rw-r--r--f/styles/style.css7
-rw-r--r--f/templates/adm.html2
-rw-r--r--f/templates/index.html12
4 files changed, 26 insertions, 2 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 @@
</head>
<body ng-app="ioc" >
<div ng-controller="ioctrl">
- <table ng-click="popfirst()" id="adminscreen">
+ <table ng-click="popfirst()" ng-class="{outdated:outdated,updated:!outdated}" id="adminscreen">
<tr><td> Jonoa:</td><td> {{qsize}}</td></tr>
<tr><td>Nimi: </td><td> {{que[0].name}}</td></tr>
<tr><td>Rivi: </td><td> {{que[0].row}}</td></tr>
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 @@
</head>
<body ng-app="ioc" >
<div ng-controller="ioctrl" id="container_main">
+<H1>Jono @ jono.dy.fi </h1>
+<div>
+<H2>ohjeita</h2>
+SPSS löytyy seuraavasti:
+<br>
+käynnistävalikko (windowslogo!) -> all programs ->
+IBM SPSS statistics -> IBM SPSS statistics 22
+<br>
+ÄLKÄÄ SULKEKO OUTPUT IKKUNAA/IKKUNOITA!!
+Niiden sisältöä käytetään tarkistuksessa.
+<br>
+</div>
<table id="addform">
<tr><td>Rivi: </td><td> <select ng-model="row">
<option value="1" selected="selected">1</option>