From f22f6fd7a985b773bce95accf5172cdc2524575c Mon Sep 17 00:00:00 2001 From: Kevin Jardine Date: Tue, 29 May 2012 12:35:20 +0200 Subject: added lightbox support for full calendar events --- models/model.php | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'models/model.php') diff --git a/models/model.php b/models/model.php index 7de514802..b53471a44 100644 --- a/models/model.php +++ b/models/model.php @@ -1855,7 +1855,7 @@ function event_calendar_generate_listing_params($page_type,$container_guid,$orig return $params; } -function event_calendar_get_page_content_view($event_guid) { +function event_calendar_get_page_content_view($event_guid,$light_box = FALSE) { // add personal calendar button and links elgg_push_context('event_calendar:view'); $event = get_entity($event_guid); @@ -1885,12 +1885,16 @@ function event_calendar_get_page_content_view($event_guid) { $content .= elgg_view_comments($event); } } - - $params = array('title' => $title, 'content' => $content,'filter' => ''); - - $body = elgg_view_layout("content", $params); - - return elgg_view_page($title,$body); + + if ($light_box) { + return '
'.elgg_view_title($title).$content.'
'; + } else { + $params = array('title' => $title, 'content' => $content,'filter' => ''); + + $body = elgg_view_layout("content", $params); + + return elgg_view_page($title,$body); + } } function event_calendar_get_page_content_display_users($event_guid) { @@ -2135,7 +2139,7 @@ function event_calendar_get_page_content_fullcalendar_events($start_date,$end_da 'id' => $event->guid, 'guid' => $event->guid, 'title' => $event->title, - 'url' => $event->getURL(), + 'url' => elgg_get_site_url().'event_calendar/view_light_box/'.$event->guid, 'start' => date('c',$ed['start_time']), 'end' => date('c',$ed['end_time']), ); -- cgit v1.2.3