From 1a66193d28e9fb7af0145c3c9c58f39f55806c5b Mon Sep 17 00:00:00 2001 From: Benjamin Kiessling Date: Thu, 12 Jan 2012 22:23:40 +0100 Subject: Add all elements of event file to event list --- frontend.js | 7 ++++++- model_fs.js | 13 +++++++++---- 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 + '
'+date+'
'; } 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) { -- cgit v1.2.1