annotate www/m/js/countin.js @ 101:52e44ee1c791 tip master

enabled all scores in autostart script
author Rob Canning <rc@kiben.net>
date Tue, 21 Apr 2015 16:20:57 +0100
parents 40253bcfce03
children
rev   line source
rc-web@7 1 /////////////////////////////////////////////////
rc-web@7 2 // countdown to change
rc-web@7 3 var socket = io.connect();
rc-web@7 4
rc-web@7 5 socket.on("countinFromServer", countinClient);
rc-web@7 6 function countinClient(groupID, currentseconds,mm,text,colour,background){
rc-web@7 7 var groupPage=document.getElementById('group').value
rc-web@7 8 if (groupID == groupPage) {
rc-web@7 9 console.log(currentseconds);
rc-web@7 10 document.getElementById("countinnumber").style.visibility="visible";
rc-web@7 11 document.getElementById("countinnumber").style.visibility="visible";
rc-web@7 12 //$("#countin").text(text);
rc-web@7 13 $("#countinnumber").text(currentseconds);
rc-web@7 14 $("#countinnumber").css('background-color', background);
rc-web@7 15
rc-web@7 16 document.getElementById("countinnumber").style.color=colour;
rc-web@7 17
rc-web@7 18 if ( currentseconds == 0) {
rc-web@7 19 document.getElementById("countinnumber").style.visibility='hidden';
rc-web@7 20 // document.getElementById("countin").style.visibility='hidden';
rc-web@7 21 }
rc-web@7 22 }}
rc-web@7 23
rc-web@7 24 /////////////////////////////////////////////////