aboutsummaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
Diffstat (limited to 'assets')
-rw-r--r--assets/js/lustiges-script.js78
1 files changed, 0 insertions, 78 deletions
diff --git a/assets/js/lustiges-script.js b/assets/js/lustiges-script.js
index d6b1f7e..65fc6ef 100644
--- a/assets/js/lustiges-script.js
+++ b/assets/js/lustiges-script.js
@@ -176,84 +176,6 @@ $(function() {
});
});
-// startpage schedule teaser
-$(function() {
- var
- updateTimer = 5*1000, /* update display every 5 seconds */
- refetchTimer = 10*60*1000, /* re-request current / upcoming schedule every 10 minutes */
- scheduleData = {},
- $lecture = $('.room.has-schedule'),
-
- /* offset to the browsers realtime (for simulation) */
- offset = $('.js-settings').data('scheduleoffset');;
-
-
- if($lecture.length == 0)
- return;
-
- function fetchProgram() {
- $.ajax({
- url: 'schedule.json',
- dataType: 'json',
- success: function(data) {
- scheduleData = data;
- updateProgtamTeaser();
- },
-
- // success & error
- complete: function() {
- setTimeout(fetchProgram, refetchTimer);
- }
- });
- }
-
- function updateProgtamTeaser() {
- var
- // corrected "now" timestamp in unix-counting (seconds, not microseconds)
- now = (Date.now() / 1000) + offset;
-
- $.each(scheduleData, function(room, talks) {
- var currentTalk, nextTalk;
-
- $.each(talks, function(room, talk) {
-
- if(!talk.room_known)
- return;
-
- if(talk.start < now && talk.end > now)
- currentTalk = talk;
-
- if(!nextTalk && !talk.special && talk.start > now)
- nextTalk = talk;
-
- });
-
- var s = nextTalk ? new Date(nextTalk.start*1000) : new Date();
- 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);
- }
-
- fetchProgram();
-});
-
// feedback form
$(function() {
$('.feedback-form').on('submit', function(e) {