From 5cbb53c00f4e323a11e59544d936815c884e0584 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 27 Apr 2010 18:37:16 +0000 Subject: [PATCH] Add support for adding calendar & other apps from URL in a popup --- timesheet/inc/class.timesheet_ui.inc.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/timesheet/inc/class.timesheet_ui.inc.php b/timesheet/inc/class.timesheet_ui.inc.php index 087415e992..a4842f06be 100644 --- a/timesheet/inc/class.timesheet_ui.inc.php +++ b/timesheet/inc/class.timesheet_ui.inc.php @@ -304,6 +304,20 @@ class timesheet_ui extends timesheet_bo // a preserved title blur is only set for other (non-project) links, it stays with Save&New! $preserv['ts_title_blur'] = egw_link::title('infolog',$link_id); break; + case 'calendar': + $calendar_bo = new calendar_bo(); + $event = $calendar_bo->read($link_id); + if(!$event['recur_type']) + { + $content['ts_start'] = $event['start']; + } + $content['ts_description'] = $event['description']; + $content['ts_duration'] = ($event['end'] - $event['start']) / 60; + $content['ts_quantity'] = ($event['end'] - $event['start']) / 3600; + unset($content['end_time']); + default: + $preserv['ts_title_blur'] = egw_link::title($link_app,$link_id); + break; } } }