diff --git a/index.html b/index.html index 8b55289..4843abe 100644 --- a/index.html +++ b/index.html @@ -1,6 +1,6 @@ - The IT Tour + OpenFest @@ -97,7 +97,7 @@ diff --git a/logo.png b/logo.png index c7b6764..549f3c4 100644 Binary files a/logo.png and b/logo.png differ diff --git a/schedule.js b/schedule.js index 7be0cba..00a3946 100644 --- a/schedule.js +++ b/schedule.js @@ -1,22 +1,19 @@ -function Schedule(hallId) { +function Schedule(hallId, date) { var events = []; this.update = function() { - $.getJSON("http://varnaconf.com/schedules/2015.json", function(data) { + $.getJSON('http://www.openfest.org/2016/wp-content/themes/initfest/schedule/interlude.php', function(data) { var scheduleEvents = $.map(data[hallId], function(event) { - event['startTime'] = moment(event['startTime']); + event['startTime'] = moment(event['starts_at'] * 1000); + event['endTime'] = moment(event['ends_at'] * 1000); + console.log(event['startTime'].date()); + if (event['startTime'].date() !== date) { + return null; + } + return event; }); - $.each(scheduleEvents, function(index, event) { - var nextEvent = scheduleEvents[index + 1]; - if (typeof(nextEvent) != 'undefined') { - event['endTime'] = moment(nextEvent['startTime']).subtract(10, 'minutes'); - } else { - event['endTime'] = moment(event['startTime']).add(40, 'minutes'); - } - }); - events = scheduleEvents; }); } @@ -65,4 +62,4 @@ $.urlParam = function(name){ } } -var schedule = new Schedule(parseInt($.urlParam('roomId'))); +var schedule = new Schedule(parseInt($.urlParam('roomId')), parseInt($.urlParam('date')));