summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--frontend.js7
-rw-r--r--model_fs.js13
2 files changed, 15 insertions, 5 deletions
diff --git a/frontend.js b/frontend.js
index c99a361..c300c1c 100644
--- a/frontend.js
+++ b/frontend.js
@@ -32,7 +32,12 @@ exports.start = function(config) {
eventStr = eventStr + '<div class="event"><div class="eventDate">'+date+'</div><ul class="eventList">';
for(var ev in slides['events'][date]) {
if(!slides['events'][date].hasOwnProperty(ev)) { continue; }
- eventStr = eventStr + '<li class="eventEl">'+slides['events'][date][ev]['time']+' - '+slides['events'][date][ev]['summary']+'</li>';
+ eventStr = eventStr + '<li class="eventEl">';
+ for(var evF in slides['events'][date][ev]) {
+ if(!slides['events'][date][ev].hasOwnProperty(evF)) { continue; }
+ eventStr = eventStr + '<div class="eventField ' + evF + '">' + slides['events'][date][ev][evF] + '</div>';
+ }
+ eventStr = eventStr + '</li>';
}
eventStr = eventStr + '</ul></div>';
}
diff --git a/model_fs.js b/model_fs.js
index 036689c..e90b1a0 100644
--- a/model_fs.js
+++ b/model_fs.js
@@ -108,12 +108,17 @@ exports.rebuildFiles = function() {
for (var k in data) {
if (!data.hasOwnProperty(k)) { continue; }
var ev = data[k];
- ev.time = ev.start.toLocaleTimeString();
if(ev.start && ev.summary) {
- if(typeof compEv[ev.start.toLocaleDateString()] == "undefined") {
- compEv[ev.start.toLocaleDateString()] = [];
+ var dateStr = ev.start.toLocaleDateString();
+ ev.start = ev.start.toLocaleTimeString();
+ ev.end = ev.end.toLocaleTimeString();
+ delete ev.rrule;
+ delete ev.uid;
+ delete ev.type;
+ if(typeof compEv[dateStr] == "undefined") {
+ compEv[dateStr] = [];
}
- compEv[ev.start.toLocaleDateString()].push(ev);
+ compEv[dateStr].push(ev);
}
}
setEvents(slideset, compEv, function(err) {