Show calendar/tasklist name in title attribute when potentially truncated in the list view

This commit is contained in:
Thomas Bruederli 2013-10-09 12:59:33 +02:00
parent d2abfe676a
commit 74ebf9f363
2 changed files with 6 additions and 2 deletions

View file

@ -198,6 +198,8 @@ class calendar_ui
$html_id = html_identifier($id);
$class = 'cal-' . asciiwords($id, true);
$listname = html_entity_decode($prop['name'], ENT_COMPAT, RCMAIL_CHARSET);
$title = strlen($listname) > 25 ? $listname : '';
if ($prop['readonly'])
$class .= ' readonly';
@ -207,7 +209,7 @@ class calendar_ui
$li .= html::tag('li', array('id' => 'rcmlical' . $html_id, 'class' => $class),
html::tag('input', array('type' => 'checkbox', 'name' => '_cal[]', 'value' => $id, 'checked' => $prop['active']), '') .
html::span('handle', ' ') .
html::span('calname', $prop['name']));
html::span(array('class' => 'calname', 'title' => $title), $prop['name']));
}
$this->rc->output->set_env('calendars', $jsenv);

View file

@ -104,6 +104,8 @@ class tasklist_ui
$html_id = html_identifier($id);
$class = 'tasks-' . asciiwords($id, true);
$listname = html_entity_decode($prop['name'], ENT_COMPAT, RCMAIL_CHARSET);
$title = strlen($listname) > 25 ? $listname : '';
if (!$prop['editable'])
$class .= ' readonly';
@ -113,7 +115,7 @@ class tasklist_ui
$li .= html::tag('li', array('id' => 'rcmlitasklist' . $html_id, 'class' => $class),
html::tag('input', array('type' => 'checkbox', 'name' => '_list[]', 'value' => $id, 'checked' => $prop['active'])) .
html::span('handle', ' ') .
html::span('listname', $prop['name']));
html::span(array('class' => 'listname', 'title' => $title), $prop['name']));
}
$this->rc->output->set_env('tasklists', $jsenv);