comparison www/m/js/controlseq.js @ 10:0e5543ccb8fb

fixed transport control of metro and countdown visualisation on control page
author tzara <rc-web@kiben.net>
date Fri, 06 Jul 2012 10:48:15 +0100
parents 83dfd5f7186a
children 3ba24da53406
comparison
equal deleted inserted replaced
9:cd847f789b53 10:0e5543ccb8fb
44 }); 44 });
45 45
46 ////////////////////////////////////////////// 46 //////////////////////////////////////////////
47 // SEQUENCER MONITOR 47 // SEQUENCER MONITOR
48 48
49 socket.on("magicCtlfromserver", sequenceMonitor); 49 socket.on("pageFlipfromserver", sequenceMonitor);
50 function sequenceMonitor(group, unit,time,mm,seq){ 50 function sequenceMonitor(group, unit,time,mm,seq){
51 var n=6; var x=seq-1; var off=((x%n)+n)%n // thanks claudiusmaximus 51 var n=6; var x=seq-1; var off=((x%n)+n)%n // thanks claudiusmaximus
52 seqnow = "#"+group+"magicsquare"+seq 52 seqnow = "#"+group+"magicsquare"+seq
53 turnmeoff = "#"+group+"magicsquare"+off 53 turnmeoff = "#"+group+"magicsquare"+off
54 $(seqnow).css('background-color', 'white'); 54 $(seqnow).css('background-color', 'white');
55 $(turnmeoff).css('background-color', 'blue') 55 $(turnmeoff).css('background-color', 'blue')
56 console.log("#"+group+"magicsquare"+seq +" time: " +time + " %:" + off) 56 console.log("#"+group+"magicsquare"+seq +" time: " +time + " %:" + off)
57
57 } 58 }
59 socket.on("counterText", function(group,unit,counter){
60 $("#"+group+"magicsquare"+unit).text(counter);
61 console.log(group+"magicsqjare"+unit+"count:"+counter)
62 });
63
64
58 ////////////////////////////////////////////// 65 //////////////////////////////////////////////
59 // CLient Popup window code 66 // CLient Popup window code
60 67
61 function newPopup(url) { 68 function newPopup(url) {
62 popupWindow = window.open( 69 popupWindow = window.open(