diff options
Diffstat (limited to 'views/default/event_calendar')
-rw-r--r-- | views/default/event_calendar/css.php | 11 | ||||
-rw-r--r-- | views/default/event_calendar/full_calendar_view.php | 22 |
2 files changed, 25 insertions, 8 deletions
diff --git a/views/default/event_calendar/css.php b/views/default/event_calendar/css.php index 469f72de8..a2437e065 100644 --- a/views/default/event_calendar/css.php +++ b/views/default/event_calendar/css.php @@ -164,4 +164,15 @@ li.event-calendar-filter-menu-show-only { padding-top:.4em; background:#fff; margin:0 -.3em 0 1.5em; +} + +.event-calendar-compressed-date { + width: 150px !important; + margin-right: 10px; +} + +.event-calendar-date-time-setter label { + float: left; + width: 50px; + margin-top: 5px; }
\ No newline at end of file diff --git a/views/default/event_calendar/full_calendar_view.php b/views/default/event_calendar/full_calendar_view.php index d4e85724e..58aefe741 100644 --- a/views/default/event_calendar/full_calendar_view.php +++ b/views/default/event_calendar/full_calendar_view.php @@ -9,7 +9,9 @@ $times_supported = elgg_get_plugin_setting('times','event_calendar') != 'no'; foreach($events as $e) { $event_item = array( 'guid' => $e->guid, + //'title' => '<a href="'.$e->url.'">'.$e->title.'</a>', 'title' => $e->title, + 'url' => $e->getURL(), 'start_date' => $e->start_date, 'end_date' => $e->real_end_time, ); @@ -28,13 +30,14 @@ $json_events_string = json_encode($event_array); ?> <script> -handleEventDrop = function(event,dayDelta,minuteDelta,allDay,revertFunc) { +handleEventClick = function(event) { + if (event.url) { + window.location.href = event.url; + return false; + } +}; - alert( - event.title + "(" + event.guid + ") was moved " + - dayDelta + " days and " + - minuteDelta + " minutes." - ); +handleEventDrop = function(event,dayDelta,minuteDelta,allDay,revertFunc) { if (!confirm("Are you sure about this change?")) { revertFunc(); @@ -53,7 +56,8 @@ handleEventDrop = function(event,dayDelta,minuteDelta,allDay,revertFunc) { } ); } -} +}; + $(document).ready(function() { var events = <?php echo $json_events_string; ?>; var cal_events = []; @@ -61,6 +65,7 @@ $(document).ready(function() { cal_events.push({ guid: events[i].guid, title : events[i].title, + url: events[i].url, start : new Date(1000*events[i].start_date), end : new Date(1000*events[i].end_date), allDay: events[i].allDay @@ -74,8 +79,9 @@ $(document).ready(function() { right: 'month,agendaWeek,agendaDay' }, editable: true, - slotMinutes: 5, + slotMinutes: 15, eventDrop: handleEventDrop, + eventClick: handleEventClick, events: cal_events }); }); |