view www/emma/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 d8f494bdbb18
children
line wrap: on
line source
/////////////////////////////////////////////////
// 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';
	}
    }}

/////////////////////////////////////////////////