annotate www/martin/js/countin.js @ 81:ac6c303fbddc
changes to UI for martin version
author |
Rob Canning <rob@foo.net> |
date |
Sun, 20 Jul 2014 14:26:06 +0100 |
parents |
b7f9ade92165 |
children |
|
rev |
line source |
rc@74
|
1 /////////////////////////////////////////////////
|
rc@74
|
2 // countdown to change
|
rc@74
|
3 var socket = io.connect();
|
rc@74
|
4
|
rc@74
|
5 socket.on("countinFromServer", countinClient);
|
rc@74
|
6 function countinClient(groupID, currentseconds,mm,text,colour,background){
|
rc@74
|
7 var groupPage=document.getElementById('group').value
|
rc@74
|
8 if (groupID == groupPage) {
|
rc@74
|
9 console.log(currentseconds);
|
rc@74
|
10 document.getElementById("countinnumber").style.visibility="visible";
|
rc@74
|
11 document.getElementById("countinnumber").style.visibility="visible";
|
rc@74
|
12 //$("#countin").text(text);
|
rc@74
|
13 $("#countinnumber").text(currentseconds);
|
rc@74
|
14 $("#countinnumber").css('background-color', background);
|
rc@74
|
15
|
rc@74
|
16 document.getElementById("countinnumber").style.color=colour;
|
rc@74
|
17
|
rc@74
|
18 if ( currentseconds == 0) {
|
rc@74
|
19 document.getElementById("countinnumber").style.visibility='hidden';
|
rc@74
|
20 // document.getElementById("countin").style.visibility='hidden';
|
rc@74
|
21 }
|
rc@74
|
22 }}
|
rc@74
|
23
|
rc@74
|
24 ///////////////////////////////////////////////// |