Improve listing of linked tasks in mail view (#3439)

This commit is contained in:
Thomas Bruederli 2014-10-14 08:49:47 +02:00
parent adc41ebf61
commit 256ad459d3
5 changed files with 38 additions and 25 deletions

View file

@ -575,6 +575,6 @@ div.kolabmessagenotes a.kolabnotesref {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 12em;
max-width: 16em;
background: url(sprites.png) -6px -151px no-repeat;
}

View file

@ -37,7 +37,7 @@ $labels['start'] = 'Start';
$labels['starttime'] = 'Start time';
$labels['alarms'] = 'Reminder';
$labels['repeat'] = 'Repeat';
$labels['links'] = 'References';
$labels['links'] = 'Reference';
$labels['status'] = 'Status';
$labels['status-needs-action'] = 'Needs action';
$labels['status-in-process'] = 'In process';

View file

@ -1338,18 +1338,36 @@ div.tasklist-invitebox .rsvp-status.accepted,
}
div.messagetasklinks {
position: relative;
margin: 8px 8px;
padding: 4px 8px;
padding: 4px 8px 4px 30px;
border: 1px solid #dfdfdf;
background: #fafafa;
border-radius: 4px;
}
div.messagetasklinks span.messagetaskref {
position: relative;
display: inline-block;
margin-right: 1em;
padding-right: 24px;
div.messagetasklinks::before {
content: " ";
position: absolute;
top: 4px;
left: 8px;
width: 18px;
height: 18px;
background: url(buttons.png) -6px -115px no-repeat;
}
div.messagetasklinks ul.tasklist {
margin: 0;
padding: 0;
list-style: none;
}
div.messagetasklinks .messagetaskref {
display: block;
margin-bottom: 2px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
div.messagetasklinks a.messagetasklink {
@ -1357,24 +1375,21 @@ div.messagetasklinks a.messagetasklink {
display: inline-block;
color: #333;
font-weight: bold;
padding: 3px 0 2px 22px;
padding: 3px 0 2px 2px;
text-shadow: 0px 1px 1px #fff;
text-decoration: none;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 16em;
background: url(buttons.png) -6px -115px no-repeat;
vertical-align: middle;
}
div.messagetasklinks span.messagetaskref.complete a.messagetasklink {
div.messagetasklinks .messagetaskref.complete a.messagetasklink {
text-decoration: line-through;
text-shadow: none;
color: #666;
}
div.messagetasklinks span.messagetaskref input.complete {
position: absolute;
top: 1px;
right: 2px;
div.messagetasklinks .messagetaskref input.complete {
vertical-align: middle;
}

View file

@ -1470,23 +1470,22 @@ class tasklist extends rcube_plugin
'data-list' => $task['list'],
));
$complete = $this->driver->is_complete($task);
$links[] = html::span('messagetaskref' . ($complete ? ' complete' : ''),
$checkbox->show($complete ? $task['uid'] : null, array('value' => $task['uid'])) . ' ' .
$links[] = html::tag('li', 'messagetaskref' . ($complete ? ' complete' : ''),
$checkbox->show($complete ? $task['id'] : null, array('value' => $task['id'])) . ' ' .
html::a(array(
'href' => $this->rc->url(array(
'task' => 'tasks',
'list' => $task['list'],
'id' => $task['uid'],
'complete' => $complete?1:null,
'id' => $task['id'],
)),
'class' => 'messagetasklink',
'rel' => $task['uid'] . '@' . $task['list'],
'rel' => $task['id'] . '@' . $task['list'],
'target' => '_blank',
), Q($task['title']))
);
}
if (count($links)) {
$html .= html::div('messagetasklinks', join("\n", $links));
$html .= html::div('messagetasklinks', html::tag('ul', 'tasklist', join("\n", $links)));
}
// prepend iTip/relation boxes to message body

View file

@ -100,7 +100,6 @@ class tasklist_ui
// check if the referenced task is completed
$task = $this->plugin->driver->get_task(array('id' => $id, 'list' => $list));
console($id, $task);
if ($task && $this->plugin->driver->is_complete($task)) {
$settings['selected_filter'] = 'complete';
}