Use full folder names by default and truncated ones for listings (#2370)
This commit is contained in:
parent
5fd5be6176
commit
2c337eb9d6
4 changed files with 14 additions and 12 deletions
|
@ -114,13 +114,14 @@ class kolab_driver extends calendar_driver
|
|||
|
||||
foreach ($folders as $id => $cal) {
|
||||
$fullname = $cal->get_name();
|
||||
$name = kolab_storage::folder_displayname($fullname, $names);
|
||||
$listname = kolab_storage::folder_displayname($fullname, $names);
|
||||
|
||||
// special handling for virtual folders
|
||||
if ($cal->virtual) {
|
||||
$calendars[$cal->id] = array(
|
||||
'id' => $cal->id,
|
||||
'name' => $name,
|
||||
'name' => $fullname,
|
||||
'listname' => $listname,
|
||||
'virtual' => true,
|
||||
'readonly' => true,
|
||||
);
|
||||
|
@ -128,8 +129,8 @@ class kolab_driver extends calendar_driver
|
|||
else {
|
||||
$calendars[$cal->id] = array(
|
||||
'id' => $cal->id,
|
||||
'name' => $name,
|
||||
'altname' => $fullname,
|
||||
'name' => $fullname,
|
||||
'listname' => $listname,
|
||||
'editname' => $cal->get_foldername(),
|
||||
'color' => $cal->get_color(),
|
||||
'readonly' => $cal->readonly,
|
||||
|
|
|
@ -200,7 +200,7 @@ class calendar_ui
|
|||
|
||||
$html_id = html_identifier($id);
|
||||
$class = 'cal-' . asciiwords($id, true);
|
||||
$title = !empty($prop['altname']) && $prop['altname'] != $prop['name'] ? html_entity_decode($prop['altname'], ENT_COMPAT, RCMAIL_CHARSET) : '';
|
||||
$title = $prop['name'] != $prop['listname'] ? html_entity_decode($prop['name'], ENT_COMPAT, RCMAIL_CHARSET) : '';
|
||||
|
||||
if ($prop['virtual'])
|
||||
$class .= ' virtual';
|
||||
|
@ -212,7 +212,7 @@ class calendar_ui
|
|||
$li .= html::tag('li', array('id' => 'rcmlical' . $html_id, 'class' => $class),
|
||||
($prop['virtual'] ? '' : html::tag('input', array('type' => 'checkbox', 'name' => '_cal[]', 'value' => $id, 'checked' => $prop['active']), '') .
|
||||
html::span('handle', ' ')) .
|
||||
html::span(array('class' => 'calname', 'title' => $title), $prop['name']));
|
||||
html::span(array('class' => 'calname', 'title' => $title), $prop['listname']));
|
||||
}
|
||||
|
||||
$this->rc->output->set_env('calendars', $jsenv);
|
||||
|
|
|
@ -95,14 +95,15 @@ class tasklist_kolab_driver extends tasklist_driver
|
|||
$path_imap = join($delim, $path_imap);
|
||||
|
||||
$fullname = kolab_storage::object_name($utf7name);
|
||||
$name = kolab_storage::folder_displayname($fullname, $listnames);
|
||||
$listname = kolab_storage::folder_displayname($fullname, $listnames);
|
||||
|
||||
// special handling for virtual folders
|
||||
if ($folder->virtual) {
|
||||
$list_id = kolab_storage::folder_id($utf7name);
|
||||
$this->lists[$list_id] = array(
|
||||
'id' => $list_id,
|
||||
'name' => $name,
|
||||
'name' => $fullname,
|
||||
'listname' => $listname,
|
||||
'virtual' => true,
|
||||
'editable' => false,
|
||||
);
|
||||
|
@ -128,8 +129,8 @@ class tasklist_kolab_driver extends tasklist_driver
|
|||
$list_id = kolab_storage::folder_id($utf7name);
|
||||
$tasklist = array(
|
||||
'id' => $list_id,
|
||||
'name' => $name,
|
||||
'altname' => $fullname,
|
||||
'name' => $fullname,
|
||||
'listname' => $listname,
|
||||
'editname' => $editname,
|
||||
'color' => $folder->get_color('0000CC'),
|
||||
'showalarms' => isset($prefs[$list_id]['showalarms']) ? $prefs[$list_id]['showalarms'] : $alarms,
|
||||
|
|
|
@ -106,7 +106,7 @@ class tasklist_ui
|
|||
|
||||
$html_id = html_identifier($id);
|
||||
$class = 'tasks-' . asciiwords($id, true);
|
||||
$title = !empty($prop['altname']) && $prop['altname'] != $prop['name'] ? html_entity_decode($prop['altname'], ENT_COMPAT, RCMAIL_CHARSET) : '';
|
||||
$title = $prop['name'] != $prop['listname'] ? html_entity_decode($prop['name'], ENT_COMPAT, RCMAIL_CHARSET) : '';
|
||||
|
||||
if ($prop['virtual'])
|
||||
$class .= ' virtual';
|
||||
|
@ -118,7 +118,7 @@ class tasklist_ui
|
|||
$li .= html::tag('li', array('id' => 'rcmlitasklist' . $html_id, 'class' => $class),
|
||||
($prop['virtual'] ? '' : html::tag('input', array('type' => 'checkbox', 'name' => '_list[]', 'value' => $id, 'checked' => $prop['active']))) .
|
||||
html::span('handle', ' ') .
|
||||
html::span(array('class' => 'listname', 'title' => $title), $prop['name']));
|
||||
html::span(array('class' => 'listname', 'title' => $title), $prop['listname']));
|
||||
}
|
||||
|
||||
$this->rc->output->set_env('tasklists', $jsenv);
|
||||
|
|
Loading…
Add table
Reference in a new issue