From 444d14401ccfbd20f08f98110222c4b026b4efb3 Mon Sep 17 00:00:00 2001 From: nathangray Date: Fri, 8 Jun 2018 11:32:38 -0600 Subject: [PATCH] * Calendar - Open timesheet from recurring event on selected occurence instead of first occurence --- calendar/inc/class.calendar_uiviews.inc.php | 2 +- timesheet/inc/class.timesheet_ui.inc.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/calendar/inc/class.calendar_uiviews.inc.php b/calendar/inc/class.calendar_uiviews.inc.php index 95ced6089f..fccbf5e3f2 100644 --- a/calendar/inc/class.calendar_uiviews.inc.php +++ b/calendar/inc/class.calendar_uiviews.inc.php @@ -933,7 +933,7 @@ class calendar_uiviews extends calendar_ui } if ($actions['timesheet']) { - $actions['timesheet']['open'] = '{"app": "timesheet", "type": "add", "extra": "link_app[]=$app&link_id[]=$id"}'; + $actions['timesheet']['open'] = '{"app": "timesheet", "type": "add", "extra": "link_app[]=$app&link_id[]=$app_id"}'; $actions['timesheet']['onExecute'] = 'javaScript:app.calendar.action_open'; } if ($actions['documents']) diff --git a/timesheet/inc/class.timesheet_ui.inc.php b/timesheet/inc/class.timesheet_ui.inc.php index 0b6fb93bd7..f112153c55 100644 --- a/timesheet/inc/class.timesheet_ui.inc.php +++ b/timesheet/inc/class.timesheet_ui.inc.php @@ -373,6 +373,10 @@ class timesheet_ui extends timesheet_bo } break; } + if($link_app == 'calendar') + { + list($link_id) = explode(':', $link_id); + } Link::link(TIMESHEET_APP,$content['link_to']['to_id'],$link_app,$link_id); } }