summaryrefslogtreecommitdiff
path: root/model_fs.js
diff options
context:
space:
mode:
authorBenjamin Kiessling <mittagessen@l.unchti.me>2012-01-12 22:23:40 +0100
committerBenjamin Kiessling <mittagessen@l.unchti.me>2012-01-12 22:23:40 +0100
commit1a66193d28e9fb7af0145c3c9c58f39f55806c5b (patch)
tree7797ce111849cb7cc6ed6e3dc346304ac9284c67 /model_fs.js
parent5e7ab8036bc07c11080de84ce074ccea7ec97f53 (diff)
Add all elements of event file to event list
Diffstat (limited to 'model_fs.js')
-rw-r--r--model_fs.js13
1 files changed, 9 insertions, 4 deletions
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) {