diff 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
line wrap: on
line diff
--- a/www/m/js/nodescore-client.js	Sun Jul 08 23:56:26 2012 +0100
+++ b/www/m/js/nodescore-client.js	Sun Jul 08 23:57:13 2012 +0100
@@ -26,32 +26,9 @@
 					 })  
 	}
 
-
-
 function metronomeTick(pulse, voice,metrobeat) {
-    console.log( voice+ "   metronome tick" + metrobeat)
     var color = "gray"
-
     metroCss(0, "red", "4")    
-
-//if (metrobeat == 0) {
-//	metroCss(0, "gray", "1")
-  //  }   
-    
-    //if (metrobeat == 3) {
-//	metroCss(0, "white", "4")
-  //  }   
-
-//    if (metrobeat == 1||metrobeat == 2){ 
-//	$("#metronome"+metrobeat).stop();
-//	$("#metronome"+metrobeat).css('background-color', color);
-//	$("#metronome"+metrobeat).text(" ");
-	//$("#metronome"+metrobeat).text(metrobeat+1);
-//	$("#metronome"+metrobeat).animate({opacity: 1},
-//				      50,
-  //                          function() { $(this).animate({opacity:0.0}); }
-//				     );
-  //  }
 };
 
 /////////////////////////////////////////////////
@@ -66,11 +43,15 @@
 function pageFlip(unit) {
     console.log("flipping page:"+ unit);
     $('#sections').trigger('goto', [parseFloat(unit)]); 
+//    $('#sections-preview').trigger('goto', [parseFloat(unit+1)]); 
     //metroStart(1000); 
     //document.getElementById("countdowncase").style.visibility="hidden";
 }
 
+
+
 /////////////////////////////////////////////////
+
 // call the fancy jquery functions
 
 function slideTo (target) { $('#sections').trigger('goto', [target]); }
@@ -81,15 +62,25 @@
 socket.on("pageFlipfromserver", pageTurn);
 function pageTurn (group,unit,time,mm) {
     var groupPage=document.getElementById('group').value;
-    console.log("fromservercommand has been executed on client");
+    //console.log("fromservercommand has been executed on client");
     if (group == groupPage) {
 	var g= pad2(group); 
 	var p= pad2(unit);
-	pageFlip(unit); 
-    }
+//	pageFlip(unit); 
+	pageTurnB(p)
+ 
+   }
     else { 
 	console.log("not for this group... ignoring... for group:" + group );
     }
 }
 
-/////////////////////////////////////////////////
\ No newline at end of file
+/////////////////////////////////////////////////
+
+function pageTurnB(unit) {
+    console.log("HOP TURN" + unit);
+    $("#live").html($("#unit"+unit).html());
+
+}
+
+////////////////////////////////////////////////
\ No newline at end of file