Indicate iTip message in mail view list
This commit is contained in:
parent
82552f7988
commit
77bc8da53c
5 changed files with 49 additions and 0 deletions
|
@ -190,6 +190,8 @@ class calendar extends rcube_plugin
|
|||
|
||||
$this->api->output->add_label('calendar.createfrommail');
|
||||
}
|
||||
|
||||
$this->add_hook('messages_list', array($this, 'mail_messages_list'));
|
||||
}
|
||||
else if ($args['task'] == 'addressbook') {
|
||||
if ($this->rc->config->get('calendar_contact_birthdays')) {
|
||||
|
@ -2157,6 +2159,35 @@ class calendar extends rcube_plugin
|
|||
return html::tag('form', array('action' => $this->rc->url(array('task' => 'calendar', 'action' => 'attend')), 'method' => 'post', 'noclose' => true) + $attrib) . $hidden->show();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function mail_messages_list($p)
|
||||
{
|
||||
if (in_array('attachment', (array)$p['cols'])) {
|
||||
foreach ($p['messages'] as $i => $header) {
|
||||
$part = new StdClass;
|
||||
$part->mimetype = $header->ctype;
|
||||
$part->filename = '';
|
||||
if ($this->is_vcalendar($part)) {
|
||||
$header->list_flags['attachmentClass'] = 'ical';
|
||||
}
|
||||
else if (in_array($header->ctype, array('multipart/alternative', 'multipart/mixed'))) {
|
||||
// TODO: fetch bodystructure and search for ical parts. Maybe too expensive?
|
||||
|
||||
if (!empty($header->structure) && is_array($header->structure->parts)) {
|
||||
foreach ($header->structure->parts as $part) {
|
||||
if ($this->is_vcalendar($part) && !empty($part->ctype_parameters['method'])) {
|
||||
$header->list_flags['attachmentClass'] = 'ical';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check mail message structure of there are .ics files attached
|
||||
*/
|
||||
|
|
|
@ -1387,6 +1387,15 @@ fieldset #calendarcategories div {
|
|||
|
||||
/* Invitation UI in mail */
|
||||
|
||||
.messagelist tbody .attachment span.ical {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
height: 18px;
|
||||
width: 20px;
|
||||
padding: 0;
|
||||
background: url(images/calendar-small.png) 1px 1px no-repeat;
|
||||
}
|
||||
|
||||
#messagemenu li a.calendarlink,
|
||||
#attachmentmenu li a.calendarlink {
|
||||
background-image: url(images/calendars.png);
|
||||
|
|
BIN
plugins/calendar/skins/classic/images/ical-attachment.png
Executable file
BIN
plugins/calendar/skins/classic/images/ical-attachment.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 361 B |
|
@ -1559,6 +1559,15 @@ fieldset #calendarcategories div {
|
|||
|
||||
/* Invitation UI in mail */
|
||||
|
||||
.messagelist tbody .attachment span.ical {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
height: 18px;
|
||||
width: 20px;
|
||||
padding: 0;
|
||||
background: url(images/ical-attachment.png) 2px 1px no-repeat;
|
||||
}
|
||||
|
||||
#messagemenu li a.calendarlink span.calendar,
|
||||
#attachmentmenu li a.calendarlink span.calendar {
|
||||
background-position: 0px -2197px;
|
||||
|
|
BIN
plugins/calendar/skins/larry/images/ical-attachment.png
Executable file
BIN
plugins/calendar/skins/larry/images/ical-attachment.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 620 B |
Loading…
Add table
Reference in a new issue