aboutsummaryrefslogtreecommitdiff
path: root/assets/js
diff options
context:
space:
mode:
authorMaZderMind2016-12-18 13:34:57 +0100
committerMaZderMind2016-12-18 13:34:57 +0100
commita12d86ec058bc89e6feeda6ec8cfce691269b0a9 (patch)
tree6be1f764a8addd025eb774bcd2039788a4b1873f /assets/js
parent521f0e2e1c94538fdce65a021144180f368364d9 (diff)
parentefd0b59f8ed363e12211894d8892e4d18b198c04 (diff)
Merge branch 'master' into events/33c3
Diffstat (limited to '')
-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) {