diff --git a/calendar/inc/class.calendar_ui.inc.php b/calendar/inc/class.calendar_ui.inc.php index 9614dffca4..9c6843a669 100644 --- a/calendar/inc/class.calendar_ui.inc.php +++ b/calendar/inc/class.calendar_ui.inc.php @@ -753,7 +753,17 @@ class calendar_ui // set id for grid $event['row_id'] = $event['id'].($event['recur_type'] ? ':'.Api\DateTime::to($event['recur_date'] ? $event['recur_date'] : $event['start'],'ts') : ''); - $event['parts'] = implode(",\n",$this->bo->participants($event,false)); + // Set up participant section of tooltip + $participants = $this->bo->participants($event,false); + $event['parts'] = implode("\n",$participants); + $event['participant_types'] = array(); + foreach($participants as $uid => $text) + { + $user_type = $user_id = null; + calendar_so::split_user($uid, $user_type, $user_id); + $type_name = lang($this->bo->resources[$user_type]['app']); + $event['participant_types'][$type_name ? $type_name : ''][] = $text; + } $event['date'] = $this->bo->date2string($event['start']); // Change dates diff --git a/calendar/js/et2_widget_event.js b/calendar/js/et2_widget_event.js index 5ab70902a4..e34072da89 100644 --- a/calendar/js/et2_widget_event.js +++ b/calendar/js/et2_widget_event.js @@ -493,6 +493,15 @@ var et2_calendar_event = (function(){ "use strict"; return et2_valueWidget.exten } cat.destroy(); } + var participants = ''; + for(var type_name in this.options.value.participant_types) + { + if(type_name) + { + participants += '

'+type_name+':
'; + } + participants += this.options.value.participant_types[type_name].join("
"); + } return '

'+ @@ -508,7 +517,7 @@ var et2_calendar_event = (function(){ "use strict"; return et2_valueWidget.exten (this.options.value.location ? '

'+this.egw().lang('Location') + ':' + this.options.value.location+'

' : '')+ (cat_label ? '

'+this.egw().lang('Category') + ':' + cat_label +'

' : '')+ '

'+this.egw().lang('Participants')+':
'+ - (this.options.value.parts ? this.options.value.parts.replace("\n","
"):'')+'

'+ + participants + '

'+ '
'+ ''; },