# HG changeset patch # User tzara # Date 1341439715 0 # Node ID 40253bcfce032f10443c81dae1142edfbcc1c3f0 # Parent 33e6dc370ef750cc1911c273fc6330219be0ba97 push countin.js diff -r 33e6dc370ef7 -r 40253bcfce03 www/m/js/countin.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/m/js/countin.js Wed Jul 04 22:08:35 2012 +0000 @@ -0,0 +1,24 @@ +///////////////////////////////////////////////// +// countdown to change +var socket = io.connect(); + +socket.on("countinFromServer", countinClient); +function countinClient(groupID, currentseconds,mm,text,colour,background){ + var groupPage=document.getElementById('group').value + if (groupID == groupPage) { + console.log(currentseconds); + document.getElementById("countinnumber").style.visibility="visible"; + document.getElementById("countinnumber").style.visibility="visible"; + //$("#countin").text(text); + $("#countinnumber").text(currentseconds); + $("#countinnumber").css('background-color', background); + + document.getElementById("countinnumber").style.color=colour; + + if ( currentseconds == 0) { + document.getElementById("countinnumber").style.visibility='hidden'; +// document.getElementById("countin").style.visibility='hidden'; + } + }} + +///////////////////////////////////////////////// \ No newline at end of file