displaying sessions
This commit is contained in:
parent
aef9535d13
commit
493adb893b
|
@ -32,18 +32,22 @@
|
||||||
.label {
|
.label {
|
||||||
color: #00a0cc;
|
color: #00a0cc;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
max-width: 140px;
|
width: 140px;
|
||||||
max-height: 38px;
|
height: 38px;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
.label.grey {
|
||||||
|
color: #888;
|
||||||
|
}
|
||||||
#timer {
|
#timer {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 40px;
|
top: 40px;
|
||||||
right: 20px;
|
right: 20px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: #888; }
|
color: #888;
|
||||||
|
}
|
||||||
#menu {
|
#menu {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 550px;
|
top: 550px;
|
||||||
|
@ -119,18 +123,18 @@
|
||||||
<div id="container">
|
<div id="container">
|
||||||
<img id="map" src="map.png" width="980" height="490">
|
<img id="map" src="map.png" width="980" height="490">
|
||||||
<canvas id="canvas" width="980" height="490"></canvas>
|
<canvas id="canvas" width="980" height="490"></canvas>
|
||||||
<div class="label" style="left: 33px;top:210px" id="stage1"></div>
|
<div class="label" style="left: 33px;top:215px" id="stage1"></div>
|
||||||
<div class="label" style="left:470px;top: 30px" id="stage2"></div>
|
<div class="label" style="left:490px;top: 30px" id="stage2"></div>
|
||||||
<div class="label" style="left:150px;top:330px" id="stage3"></div>
|
<div class="label" style="left:150px;top:330px" id="stage3"></div>
|
||||||
<div class="label" style="left:340px;top:342px" id="stage4"></div>
|
<div class="label" style="left:340px;top:342px" id="stage4"></div>
|
||||||
<div class="label" style="left:550px;top:342px" id="stage5"></div>
|
<div class="label" style="left:550px;top:342px" id="stage5"></div>
|
||||||
<div class="label" style="left:740px;top:342px" id="stage6"></div>
|
<div class="label" style="left:740px;top:342px" id="stage6"></div>
|
||||||
<div class="label" style="left:780px;top:440px" id="stage7"></div>
|
<div class="label" style="left:780px;top:440px" id="stage7"></div>
|
||||||
<div class="label" style="left:320px;top:140px">Cafeteria</div>
|
<div class="label grey" style="left:320px;top:140px">Cafeteria</div>
|
||||||
<div class="label" style="left:850px;top:220px">Hof</div>
|
<div class="label grey" style="left:850px;top:220px">Hof</div>
|
||||||
<div class="label" style="left:920px;top:320px">VIP</div>
|
<div class="label grey" style="left:920px;top:320px">VIP</div>
|
||||||
<div class="label" style="left:480px;top:410px">Workshops</div>
|
<div class="label grey" style="left:480px;top:410px">Workshops</div>
|
||||||
<div class="label" style="left:570px;top:170px">Foyer</div>
|
<div class="label grey" style="left:570px;top:170px">Foyer</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="timer"></div>
|
<div id="timer"></div>
|
||||||
<div id="slider">
|
<div id="slider">
|
||||||
|
|
|
@ -64,6 +64,12 @@ function init() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
nearFieldGrid = nearFieldGrid.sort( function (a,b) { return (a.r == b.r) ? (a.a - b.a) : (a.r - b.r);} );
|
nearFieldGrid = nearFieldGrid.sort( function (a,b) { return (a.r == b.r) ? (a.a - b.a) : (a.r - b.r);} );
|
||||||
|
|
||||||
|
sessions.forEach(function (session) {
|
||||||
|
session.startTime = session.startInt + (parseInt(session.date.substr(8,2),10)-5)*(24*60);
|
||||||
|
session.endTime = session.startTime + session.duration;
|
||||||
|
session.stage = (session.room.substr(0,5) == 'stage') ? parseInt(session.room.substr(6,1), 10) : undefined;
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function start() {
|
function start() {
|
||||||
|
@ -102,6 +108,17 @@ function renderTime() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateData() {
|
function updateData() {
|
||||||
|
var stages = ['', '', '', '', '', '', '', ''];
|
||||||
|
sessions.forEach(function (session) {
|
||||||
|
if ((session.startTime <= currentTime) && (currentTime < session.endTime)) {
|
||||||
|
if (session.stage !== undefined) {
|
||||||
|
stages[session.stage] = 'Stage '+session.stage+': '+session.title;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
for (var i = 1; i <= 7; i++) $('#stage'+i).html(stages[i]);
|
||||||
|
|
||||||
|
|
||||||
data.matrix.forEach(function (times, index) {
|
data.matrix.forEach(function (times, index) {
|
||||||
var timeId = time2index[Math.floor(currentTime)];
|
var timeId = time2index[Math.floor(currentTime)];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue