aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--views/default/event_calendar/agenda_item_view.php2
-rw-r--r--views/default/event_calendar/agenda_view.php2
-rw-r--r--views/default/event_calendar/forms/manage_event_content.php4
-rw-r--r--views/default/event_calendar/full_calendar_view.php12
-rw-r--r--views/default/forms/event_calendar/edit.php8
-rw-r--r--views/default/plugins/event_calendar/settings.php2
6 files changed, 19 insertions, 11 deletions
diff --git a/views/default/event_calendar/agenda_item_view.php b/views/default/event_calendar/agenda_item_view.php
index 727b559ec..807982665 100644
--- a/views/default/event_calendar/agenda_item_view.php
+++ b/views/default/event_calendar/agenda_item_view.php
@@ -2,7 +2,7 @@
$event = $vars['event'];
$times = $vars['times'];
$time_bit = '';
-if ($times) {
+if ($times != 'no') {
if (is_numeric($event->start_time)) {
$time_bit = event_calendar_convert_time($event->start_time);
}
diff --git a/views/default/event_calendar/agenda_view.php b/views/default/event_calendar/agenda_view.php
index bb693def0..05cdb6461 100644
--- a/views/default/event_calendar/agenda_view.php
+++ b/views/default/event_calendar/agenda_view.php
@@ -8,7 +8,7 @@ $nav = elgg_view('navigation/pagination',array(
'limit' => $vars['limit'],
));
-$event_calendar_times = get_plugin_setting('times', 'event_calendar');
+$event_calendar_times = elgg_get_plugin_setting('times', 'event_calendar');
$events = $vars['events'];
$html = '';
$date_format = 'j M Y';
diff --git a/views/default/event_calendar/forms/manage_event_content.php b/views/default/event_calendar/forms/manage_event_content.php
index 6ae3f60ce..f28788132 100644
--- a/views/default/event_calendar/forms/manage_event_content.php
+++ b/views/default/event_calendar/forms/manage_event_content.php
@@ -119,7 +119,7 @@ $body .= elgg_view("input/text",array('internalname' => 'venue','value'=>$venue)
$body .= '</label></p>';
$body .= '<p class="description">'.$prefix['venue'].elgg_echo('event_calendar:venue_description').'</p>';
-if ($event_calendar_times == 'yes') {
+if ($event_calendar_times != 'no') {
$body .= '<p><label>'.elgg_echo("event_calendar:start_time_label").'</label><br />';
$body .= elgg_view("input/timepicker",array('internalname' => 'start_time','value'=>$start_time));
$body .= '</p>';
@@ -132,7 +132,7 @@ $body .= '</label></p>';
$body .= '<p class="description">'.$prefix['start_date'].elgg_echo('event_calendar:start_date_description').'</p>';
if ($event_calendar_hide_end != 'yes') {
- if ($event_calendar_times == 'yes') {
+ if ($event_calendar_times != 'no') {
$body .= '<p><label>'.elgg_echo("event_calendar:end_time_label").'</label><br />';
$body .= elgg_view("input/timepicker",array('internalname' => 'end_time','value'=>$end_time));
$body .= '</p>';
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
});
}
diff --git a/views/default/forms/event_calendar/edit.php b/views/default/forms/event_calendar/edit.php
index 1830ef168..7613a79f1 100644
--- a/views/default/forms/event_calendar/edit.php
+++ b/views/default/forms/event_calendar/edit.php
@@ -68,7 +68,7 @@ if ($event) {
$event_tags = $event->event_tags;
$long_description = $event->long_description;
$access = $event->access_id;
- if ($event_calendar_times == 'yes') {
+ if ($event_calendar_times != 'no') {
$start_time = $event->start_time;
$end_time = $event->end_time;
}
@@ -101,7 +101,7 @@ if ($event) {
$event_tags = $fd['event_tags'];
$long_description = $fd['long_description'];
$access = $fd['access_id'];
- if ($event_calendar_times == 'yes') {
+ if ($event_calendar_times != 'no') {
$start_time = $fd['start_time'];
$end_time = $fd['end_time'];
}
@@ -127,7 +127,7 @@ $body .= elgg_view("input/text",array('name' => 'venue','value'=>$venue));
$body .= '</label></p>';
$body .= '<p class="description">'.$prefix['venue'].elgg_echo('event_calendar:venue_description').'</p>';
-if ($event_calendar_times == 'yes') {
+if ($event_calendar_times != 'no') {
$body .= '<p><label>'.elgg_echo("event_calendar:start_time_label").'</label><br />';
$body .= elgg_view("input/timepicker",array('name' => 'start_time','value'=>$start_time));
$body .= '</p>';
@@ -140,7 +140,7 @@ $body .= '</label></p>';
$body .= '<p class="description">'.$prefix['start_date'].elgg_echo('event_calendar:start_date_description').'</p>';
if ($event_calendar_hide_end != 'yes') {
- if ($event_calendar_times == 'yes') {
+ if ($event_calendar_times != 'no') {
$body .= '<p><label>'.elgg_echo("event_calendar:end_time_label").'</label><br />';
$body .= elgg_view("input/timepicker",array('name' => 'end_time','value'=>$end_time));
$body .= '</p>';
diff --git a/views/default/plugins/event_calendar/settings.php b/views/default/plugins/event_calendar/settings.php
index a1c8e3d41..42ac601e5 100644
--- a/views/default/plugins/event_calendar/settings.php
+++ b/views/default/plugins/event_calendar/settings.php
@@ -79,7 +79,7 @@ $body .= '<br />';
$event_calendar_times = elgg_get_plugin_setting('times', 'event_calendar');
if (!$event_calendar_times) {
- $event_calendar_times = 'no';
+ $event_calendar_times = 'yes';
}
$body .= elgg_echo('event_calendar:settings:times:title');