comparison www/m/js/nodescore-client.js @ 16:e05eede75e0d

some cleaning up of html css js
author tzara <rc-web@kiben.net>
date Sun, 08 Jul 2012 23:57:13 +0100
parents d2eda8be1fca
children 6ad0cde69558
comparison
equal deleted inserted replaced
15:6e6dd1ed032b 16:e05eede75e0d
24 function() { $(this).animate({opacity:0.0}); } 24 function() { $(this).animate({opacity:0.0}); }
25 ); 25 );
26 }) 26 })
27 } 27 }
28 28
29
30
31 function metronomeTick(pulse, voice,metrobeat) { 29 function metronomeTick(pulse, voice,metrobeat) {
32 console.log( voice+ " metronome tick" + metrobeat)
33 var color = "gray" 30 var color = "gray"
34
35 metroCss(0, "red", "4") 31 metroCss(0, "red", "4")
36
37 //if (metrobeat == 0) {
38 // metroCss(0, "gray", "1")
39 // }
40
41 //if (metrobeat == 3) {
42 // metroCss(0, "white", "4")
43 // }
44
45 // if (metrobeat == 1||metrobeat == 2){
46 // $("#metronome"+metrobeat).stop();
47 // $("#metronome"+metrobeat).css('background-color', color);
48 // $("#metronome"+metrobeat).text(" ");
49 //$("#metronome"+metrobeat).text(metrobeat+1);
50 // $("#metronome"+metrobeat).animate({opacity: 1},
51 // 50,
52 // function() { $(this).animate({opacity:0.0}); }
53 // );
54 // }
55 }; 32 };
56 33
57 ///////////////////////////////////////////////// 34 /////////////////////////////////////////////////
58 35
59 // update the stopwatch value on the client page in line with server 36 // update the stopwatch value on the client page in line with server
64 ///////////////////////////////////////////////// 41 /////////////////////////////////////////////////
65 42
66 function pageFlip(unit) { 43 function pageFlip(unit) {
67 console.log("flipping page:"+ unit); 44 console.log("flipping page:"+ unit);
68 $('#sections').trigger('goto', [parseFloat(unit)]); 45 $('#sections').trigger('goto', [parseFloat(unit)]);
46 // $('#sections-preview').trigger('goto', [parseFloat(unit+1)]);
69 //metroStart(1000); 47 //metroStart(1000);
70 //document.getElementById("countdowncase").style.visibility="hidden"; 48 //document.getElementById("countdowncase").style.visibility="hidden";
71 } 49 }
72 50
51
52
73 ///////////////////////////////////////////////// 53 /////////////////////////////////////////////////
54
74 // call the fancy jquery functions 55 // call the fancy jquery functions
75 56
76 function slideTo (target) { $('#sections').trigger('goto', [target]); } 57 function slideTo (target) { $('#sections').trigger('goto', [target]); }
77 function pad2(number) { return (number < 10 ? '0' : '') + number } 58 function pad2(number) { return (number < 10 ? '0' : '') + number }
78 59
79 ///////////////////////////////////////////////// 60 /////////////////////////////////////////////////
80 61
81 socket.on("pageFlipfromserver", pageTurn); 62 socket.on("pageFlipfromserver", pageTurn);
82 function pageTurn (group,unit,time,mm) { 63 function pageTurn (group,unit,time,mm) {
83 var groupPage=document.getElementById('group').value; 64 var groupPage=document.getElementById('group').value;
84 console.log("fromservercommand has been executed on client"); 65 //console.log("fromservercommand has been executed on client");
85 if (group == groupPage) { 66 if (group == groupPage) {
86 var g= pad2(group); 67 var g= pad2(group);
87 var p= pad2(unit); 68 var p= pad2(unit);
88 pageFlip(unit); 69 // pageFlip(unit);
89 } 70 pageTurnB(p)
71
72 }
90 else { 73 else {
91 console.log("not for this group... ignoring... for group:" + group ); 74 console.log("not for this group... ignoring... for group:" + group );
92 } 75 }
93 } 76 }
94 77
95 ///////////////////////////////////////////////// 78 /////////////////////////////////////////////////
79
80 function pageTurnB(unit) {
81 console.log("HOP TURN" + unit);
82 $("#live").html($("#unit"+unit).html());
83
84 }
85
86 ////////////////////////////////////////////////