aboutsummaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--assets/js/lustiges-script.js33
1 files changed, 17 insertions, 16 deletions
diff --git a/assets/js/lustiges-script.js b/assets/js/lustiges-script.js
index bdbecde..33b84a6 100644
--- a/assets/js/lustiges-script.js
+++ b/assets/js/lustiges-script.js
@@ -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);