comparison www/m/js/nodescore-slides.js @ 59:5ba250832739

css visibility and counter fixes
author tzara <rc-web@kiben.net>
date Tue, 02 Apr 2013 15:14:25 +0000
parents 474c1ad1e811
children e868cdd4b3e9
comparison
equal deleted inserted replaced
58:474c1ad1e811 59:5ba250832739
43 // server time 43 // server time
44 44
45 //var groupPage=document.getElementById('group').value 45 //var groupPage=document.getElementById('group').value
46 //if (groupID == groupPage) { 46 //if (groupID == groupPage) {
47 socket.on("dateTime", function(datetime) { 47 socket.on("dateTime", function(datetime) {
48 // console.log(datetime)
49 $("div#datetime").text("" +datetime); 48 $("div#datetime").text("" +datetime);
50 49
51 }); 50 });
52
53 51
54 ///////////////////////////////////////////////// 52 /////////////////////////////////////////////////
55 // countdown to change 53 // countdown to change
56 54
57 socket.on("countinFromServer", countinClient); 55 socket.on("countinFromServer", countinClient);
58 function countinClient(groupID, currentseconds,mm,text,colour,background,unit){ 56 function countinClient(groupID, currentseconds,mm,text,colour,background,unit){
59 var groupPage=document.getElementById('group').value 57 var groupPage=document.getElementById('group').value
60 // if (groupID == groupPage) { 58 if (groupID == groupPage) {
61 //document.getElementById("count"+groupID).style.visibility="visible"; 59 //document.getElementById("count").style.visibility="visible";
62 //document.getElementById("count"+groupID).style.visibility="visible"; 60 //document.getElementById("midcomms").style.visibility="visible";
63 $("#counttitle").text(text); 61 $("#counttitle").css('color','white');
62 $("#counttitle").text(text);
64 // in box 63 // in box
65 //$('#sqr'+unit).text(currentseconds); 64 //$('#sqr'+unit).text(currentseconds);
66 //console.log('#sqr'+unit) 65 $("#count").text(currentseconds);
67 $("#count"+groupID).text(currentseconds);
68 //$("#cnt").text(currentseconds); 66 //$("#cnt").text(currentseconds);
69 67
70 $("#count"+groupID).css('background-color', background); 68 $("#count").css('background-color', background);
71 // document.getElementById("count"+groupID).style.color=colour; 69 document.getElementById("count").style.color=colour;
72 // if ( currentseconds == 0) { 70 if ( currentseconds == 0) {
73 //document.getElementById("midcomms").style.visibility='hidden'; 71 //document.getElementById("midcomms").style.visibility='hidden';
74 // } 72 }
75 }//} 73 }}
76 ///////////////////////////////////////////////// 74 /////////////////////////////////////////////////
77 75
78 ///////////////////////////////////////////////// 76 /////////////////////////////////////////////////
79 // countdown to change 77 // countdown to change
80 78
87 $("#totalcountdown").text(text); 85 $("#totalcountdown").text(text);
88 }} 86 }}
89 87
90 /////////////////////////////////////// 88 ///////////////////////////////////////
91 function pageFlip(unit) { 89 function pageFlip(unit) {
92 console.log("flipping page:"+ unit); 90
93 $('#sections').trigger('goto', [parseFloat(unit)]); 91 $('#sections').trigger('goto', [parseFloat(unit)]);
94 } 92 }
95 93
96 ///////////////////////////////////////////////// 94 /////////////////////////////////////////////////
97 // call the fancy jquery functions 95 // call the fancy jquery functions
116 } 114 }
117 115
118 function pageTurnB(unit) { 116 function pageTurnB(unit) {
119 var units=6; 117 var units=6;
120 var next=(((unit+1)%units)+units)%units 118 var next=(((unit+1)%units)+units)%units
121 console.log("HOP TURN" + unit+ "next:" + next); 119 $("#live").load("music.html #"+unit +" *");
122 $("#live").load("music.html #"+unit +" *");
123 $("#preview").html("<h3 style='background:transparent; position: relative; font-size:1.5em;top:14px; left:10px;';> n e x t : </h3><img src='thumbs/"+next + ".png" + "' width='315'>") 120 $("#preview").html("<h3 style='background:transparent; position: relative; font-size:1.5em;top:14px; left:10px;';> n e x t : </h3><img src='thumbs/"+next + ".png" + "' width='315'>")
124 } 121 }
125 122
126 //////////////////////////////////////////////// 123 ////////////////////////////////////////////////
127 124
185 socket.on("timeFromServer", function(n) { 182 socket.on("timeFromServer", function(n) {
186 socket.emit("clientTimeResponse",n); }); 183 socket.emit("clientTimeResponse",n); });
187 184
188 socket.on("latencyFromServer", function(latency) { 185 socket.on("latencyFromServer", function(latency) {
189 $("#client_latency").text("Latency: "+latency+"ms.") 186 $("#client_latency").text("Latency: "+latency+"ms.")
190 //console.log(latency) 187
191 }); 188 });
192 189
193 function getLatencies(x) { socket.emit("getLatencies", x); } 190 function getLatencies(x) { socket.emit("getLatencies", x); }
194 191
195 ////////////////////////////////////////////// 192 //////////////////////////////////////////////