mirror of
https://github.com/voc/streaming-website
synced 2024-11-10 14:44:21 +00:00
Immunize against missing current/upcoming talks
This commit is contained in:
parent
c769effbff
commit
0f4cbf90bb
1 changed files with 17 additions and 16 deletions
|
@ -353,22 +353,23 @@ $(function() {
|
|||
});
|
||||
|
||||
var s = nextTalk ? new Date(nextTalk.start*1000) : new Date();
|
||||
$lecture.filter('.room-'+room)
|
||||
.find('.current-talk')
|
||||
.removeClass('hidden')
|
||||
.find('.t')
|
||||
.text(currentTalk.special ? 'none' : currentTalk.title)
|
||||
.end()
|
||||
.end()
|
||||
.find('.next-talk')
|
||||
.toggleClass('hidden', !nextTalk || nextTalk.special || (nextTalk.start - now > 60*60))
|
||||
.find('strong')
|
||||
.text(s.getHours()+':'+(s.getMinutes() < 10 ? '0' : '')+s.getMinutes())
|
||||
.end()
|
||||
.find('.t')
|
||||
.text(nextTalk ? nextTalk.title : '')
|
||||
.end()
|
||||
.end();
|
||||
if(currentTalk)
|
||||
$lecture.filter('.room-'+room)
|
||||
.find('.current-talk')
|
||||
.removeClass('hidden')
|
||||
.find('.t')
|
||||
.text(currentTalk.special ? 'none' : currentTalk.title)
|
||||
|
||||
if(nextTalk)
|
||||
$lecture.filter('.room-'+room)
|
||||
.find('.next-talk')
|
||||
.toggleClass('hidden', !nextTalk || nextTalk.special || (nextTalk.start - now > 60*60))
|
||||
.find('strong')
|
||||
.text(s.getHours()+':'+(s.getMinutes() < 10 ? '0' : '')+s.getMinutes())
|
||||
.end()
|
||||
.find('.t')
|
||||
.text(nextTalk ? nextTalk.title : '')
|
||||
.end()
|
||||
});
|
||||
|
||||
setTimeout(updateProgtamTeaser, updateTimer);
|
||||
|
|
Loading…
Reference in a new issue