bugfix: time now
This commit is contained in:
parent
3616a18872
commit
45f6a926bc
|
@ -128,6 +128,7 @@
|
||||||
if (faketime != null) {
|
if (faketime != null) {
|
||||||
s.setTimeTo(new Date(faketime));
|
s.setTimeTo(new Date(faketime));
|
||||||
}
|
}
|
||||||
|
s.getEvents();
|
||||||
|
|
||||||
// output part of the schedule
|
// output part of the schedule
|
||||||
$('.conf_version').html(s.getScheduleVersion());
|
$('.conf_version').html(s.getScheduleVersion());
|
||||||
|
@ -141,7 +142,6 @@
|
||||||
$('.talks_plan').append(event_view(event));
|
$('.talks_plan').append(event_view(event));
|
||||||
});
|
});
|
||||||
var eventObj = s.getEventsAllTracks(10);
|
var eventObj = s.getEventsAllTracks(10);
|
||||||
console.log(eventObj);
|
|
||||||
eventObj.events.forEach(event => {
|
eventObj.events.forEach(event => {
|
||||||
$('.talks_overview').append(event_view(event, true));
|
$('.talks_overview').append(event_view(event, true));
|
||||||
});
|
});
|
||||||
|
|
|
@ -44,7 +44,6 @@ class Schedule {
|
||||||
this.conf.title = this.schedule.children("conference").children("title").text();
|
this.conf.title = this.schedule.children("conference").children("title").text();
|
||||||
this.conf.start = this.schedule.children("conference").children("start").text();
|
this.conf.start = this.schedule.children("conference").children("start").text();
|
||||||
this.conf.end = this.schedule.children("conference").children("end").text();
|
this.conf.end = this.schedule.children("conference").children("end").text();
|
||||||
this.events = this.getEvents();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -87,7 +86,11 @@ class Schedule {
|
||||||
let allEvents = [];
|
let allEvents = [];
|
||||||
if (this.events.length == 0 ){
|
if (this.events.length == 0 ){
|
||||||
//this.schedule.find('event').toArray();
|
//this.schedule.find('event').toArray();
|
||||||
|
var now = this.now
|
||||||
this.schedule.find('event').each( function(){
|
this.schedule.find('event').each( function(){
|
||||||
|
|
||||||
|
var eventStart = new Date($(this).children('date').text());
|
||||||
|
if ((eventStart - now) >= 0){
|
||||||
allEvents.push({
|
allEvents.push({
|
||||||
title: $(this).children('title').text(),
|
title: $(this).children('title').text(),
|
||||||
room: $(this).children('room').text(),
|
room: $(this).children('room').text(),
|
||||||
|
@ -97,9 +100,11 @@ class Schedule {
|
||||||
abstract: $(this).children('abstract').text().slice(0, 256),
|
abstract: $(this).children('abstract').text().slice(0, 256),
|
||||||
persons: $(this).children('persons').text(),
|
persons: $(this).children('persons').text(),
|
||||||
});
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return allEvents;
|
this.events = allEvents;
|
||||||
|
console.log('DDDD', allEvents.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
getEventsAllTracks(count)
|
getEventsAllTracks(count)
|
||||||
|
|
Loading…
Reference in New Issue