Mercurial > hg > nodescore
comparison www/m/js/nodescore-slides.js @ 54:66bf613fb818
pre clean up push - moved vars into scoreB.js - called up with requirejs
added requirejs dep
author | tzara <rc-web@kiben.net> |
---|---|
date | Wed, 19 Dec 2012 13:36:19 +0000 |
parents | ddb09f0a67fd |
children | 474c1ad1e811 |
comparison
equal
deleted
inserted
replaced
53:a0ae699ac444 | 54:66bf613fb818 |
---|---|
81 //console.log(text) | 81 //console.log(text) |
82 $("#totalcountdown").text(text); | 82 $("#totalcountdown").text(text); |
83 }} | 83 }} |
84 | 84 |
85 /////////////////////////////////////// | 85 /////////////////////////////////////// |
86 | |
87 function pageFlip(unit) { | 86 function pageFlip(unit) { |
88 console.log("flipping page:"+ unit); | 87 console.log("flipping page:"+ unit); |
89 $('#sections').trigger('goto', [parseFloat(unit)]); | 88 $('#sections').trigger('goto', [parseFloat(unit)]); |
90 } | 89 } |
91 | 90 |
92 | 91 ///////////////////////////////////////////////// |
93 ///////////////////////////////////////////////// | |
94 | |
95 // call the fancy jquery functions | 92 // call the fancy jquery functions |
96 | 93 //function slideTo (target) { $('#sections').trigger('goto', [target]); } |
97 function slideTo (target) { $('#sections').trigger('goto', [target]); } | |
98 function pad2(number) { return (number < 10 ? '0' : '') + number } | 94 function pad2(number) { return (number < 10 ? '0' : '') + number } |
99 | 95 |
100 ///////////////////////////////////////////////// | 96 ///////////////////////////////////////////////// |
101 | 97 //var testSound = new buzz.sound( 'audio/testfile', { formats: [ 'ogg', 'mp3' ] } ); |
102 socket.on("pageFlipfromserver", pageTurn); | 98 socket.on("pageFlipfromserver", pageTurn); |
103 function pageTurn (group,unit,time,mm) { | 99 function pageTurn (group,unit,time,mm) { |
104 var groupPage=document.getElementById('group').value; | 100 var groupPage=document.getElementById('group').value; |
105 if (group == groupPage) { | 101 if (group == groupPage) { |
106 var g= pad2(group); | 102 var g= pad2(group); |
107 var p= pad2(unit); | 103 var p= pad2(unit); |
108 // pageFlip(unit); | 104 // pageFlip(unit); |
109 pageTurnB(unit) | 105 pageTurnB(unit) |
110 | 106 |
111 } | 107 } |
112 else { | 108 else { |
113 console.log("not for this group... ignoring... for group:" + group ); | 109 console.log("not for this group... ignoring... for group:" + group ); |
114 } | 110 } |
115 } | 111 } |
116 | 112 |
117 function pageTurnB(unit) { | 113 function pageTurnB(unit) { |
118 var units=6; | 114 var units=6; |
119 var next=(((unit+1)%units)+units)%units | 115 var next=(((unit+1)%units)+units)%units |
120 //console.log("HOP TURN" + unit+ "next:" + next); | 116 console.log("HOP TURN" + unit+ "next:" + next); |
121 $("#live").load("music.html #"+unit +" *"); | 117 $("#live").load("music.html #"+unit +" *"); |
122 $("#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'>") | 118 $("#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'>") |
123 } | 119 } |
124 | 120 |
125 //////////////////////////////////////////////// | 121 //////////////////////////////////////////////// |