From 289e6079f704d804a2cf8de74db554709ca4a974 Mon Sep 17 00:00:00 2001 From: nathangray Date: Fri, 12 Oct 2018 10:51:31 -0600 Subject: [PATCH] Last / Next date - Fix list title back to just date - Link leads to actual recurrence for recurring events --- api/js/etemplate/et2_widget_link.js | 2 +- api/src/Contacts.php | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/api/js/etemplate/et2_widget_link.js b/api/js/etemplate/et2_widget_link.js index cbe150478f..f63dac2572 100644 --- a/api/js/etemplate/et2_widget_link.js +++ b/api/js/etemplate/et2_widget_link.js @@ -1298,7 +1298,7 @@ var et2_link = (function(){ "use strict"; return et2_valueWidget.extend([et2_IDe { this.link.addClass("et2_link"); this.link.click( function(e){ - self.egw().open(_value, "", self.options.link_hook,null,_value.app,_value.app); + self.egw().open(_value, "", self.options.link_hook,_value.extra_args,_value.app,_value.app); e.stopImmediatePropagation(); }); } diff --git a/api/src/Contacts.php b/api/src/Contacts.php index cbac03a475..ad91a0cdf1 100755 --- a/api/src/Contacts.php +++ b/api/src/Contacts.php @@ -1730,16 +1730,17 @@ class Contacts extends Contacts\Storage if (!$contacts) return array(); // Extract the event info and generate what is needed for next/last event - $do_event = function($key, $contact) use (&$bocal, &$calendars, $type) + $do_event = function($key, $contact) use (&$bocal, &$calendars, $type, $extra_title) { list($start, $cal_id, $recur_date) = explode(':', $contact[$key.'_event']); $link = array( - 'id' => $cal_id, + 'id' => $cal_id,//.':'.$start, 'app' => 'calendar', - 'title' => $bocal->link_title($cal_id . ($recur_date ? '-'.$recur_date : '')), + 'title' => $bocal->link_title($cal_id . ($start ? '-'.$start : '')), 'extra_args' => array( - 'date' => date('Ymd',$start), + 'date' => \EGroupware\Api\DateTime::server2user($start,\EGroupware\Api\DateTime::ET2), + 'exception'=> 1 ), ); if ($extra_title)