aboutsummaryrefslogtreecommitdiff
path: root/views/default/event_calendar/full_calendar_view.php
diff options
context:
space:
mode:
authorKevin Jardine <kevinjardine@yahoo.com>2012-03-13 17:34:40 +0100
committerKevin Jardine <kevinjardine@yahoo.com>2012-03-13 17:34:40 +0100
commit5e5777559cd36d2ef32a786b93d047a1a7a3037e (patch)
treef1e682bc105353ef96589db12133f0775357fa3e /views/default/event_calendar/full_calendar_view.php
parent2eaf95a47bccd543951e41d608cdcb44acf9a0ff (diff)
downloadelgg-5e5777559cd36d2ef32a786b93d047a1a7a3037e.tar.gz
elgg-5e5777559cd36d2ef32a786b93d047a1a7a3037e.tar.bz2
event times are now supported by default
Diffstat (limited to 'views/default/event_calendar/full_calendar_view.php')
-rw-r--r--views/default/event_calendar/full_calendar_view.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/views/default/event_calendar/full_calendar_view.php b/views/default/event_calendar/full_calendar_view.php
index b6c725908..80406ac13 100644
--- a/views/default/event_calendar/full_calendar_view.php
+++ b/views/default/event_calendar/full_calendar_view.php
@@ -4,14 +4,22 @@ elgg_load_js('elgg.full_calendar');
$events = $vars['events'];
$event_array = array();
+$times_supported = elgg_get_plugin_setting('times','event_calendar') != 'no';
foreach($events as $e) {
- $event_array[] = array(
+ $event_item = array(
'id' => $e->guid,
'title' => $e->title,
'start_date' => $e->start_date,
'end_date' => $e->real_end_time,
);
+ if ($times_supported) {
+ $event_item['allDay'] = FALSE;
+ } else {
+ $event_item['allDay'] = TRUE;
+ }
+
+ $event_array[] = $event_item;
}
$json_events_string = json_encode($event_array);
@@ -28,7 +36,7 @@ $(document).ready(function() {
title : events[i].title,
start : new Date(1000*events[i].start_date),
end : new Date(1000*events[i].end_date),
- allDay: false
+ allDay: events[i].allDay
});
}