Merge branch 'master' of ssh://git.kolab.org/git/roundcubemail-plugins-kolab
This commit is contained in:
commit
084be44d9c
3 changed files with 29 additions and 7 deletions
|
@ -158,7 +158,7 @@ pre {
|
|||
}
|
||||
|
||||
#calendarslist li.virtual {
|
||||
padding-top: 2px;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
#calendarslist li label {
|
||||
|
@ -231,6 +231,7 @@ pre {
|
|||
|
||||
#calendarslist li.virtual span.calname {
|
||||
color: #aaa;
|
||||
top: 2px;
|
||||
}
|
||||
|
||||
#calfeedurl,
|
||||
|
|
|
@ -437,9 +437,10 @@ class kolab_storage
|
|||
$folder = substr($folder, $pos+1);
|
||||
}
|
||||
else {
|
||||
$prefix = '('.$folder.')';
|
||||
$prefix = $folder;
|
||||
$folder = '';
|
||||
}
|
||||
|
||||
$found = true;
|
||||
$folder_ns = 'other';
|
||||
break;
|
||||
|
@ -467,7 +468,7 @@ class kolab_storage
|
|||
$folder = str_replace(html::quote($delim), ' » ', $folder);
|
||||
|
||||
if ($prefix)
|
||||
$folder = html::quote($prefix) . ' ' . $folder;
|
||||
$folder = html::quote($prefix) . ($folder !== '' ? ' ' . $folder : '');
|
||||
|
||||
if (!$folder_ns)
|
||||
$folder_ns = 'personal';
|
||||
|
@ -492,7 +493,8 @@ class kolab_storage
|
|||
}
|
||||
|
||||
/**
|
||||
* Helper method to generate a truncated folder name to display
|
||||
* Helper method to generate a truncated folder name to display.
|
||||
* Note: $origname is a string returned by self::object_name()
|
||||
*/
|
||||
public static function folder_displayname($origname, &$names)
|
||||
{
|
||||
|
@ -504,10 +506,29 @@ class kolab_storage
|
|||
$length = strlen($names[$i] . ' » ');
|
||||
$prefix = substr($name, 0, $length);
|
||||
$count = count(explode(' » ', $prefix));
|
||||
$name = str_repeat(' ', $count-1) . '» ' . substr($name, $length);
|
||||
$diff = 1;
|
||||
|
||||
// check if prefix folder is in other users namespace
|
||||
for ($n = count($names)-1; $n >= 0; $n--) {
|
||||
if (strpos($prefix, '(' . $names[$n] . ') ') === 0) {
|
||||
$diff = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$name = str_repeat(' ', $count - $diff) . '» ' . substr($name, $length);
|
||||
break;
|
||||
}
|
||||
// other users namespace and parent folder exists
|
||||
else if (strpos($name, '(' . $names[$i] . ') ') === 0) {
|
||||
$length = strlen('(' . $names[$i] . ') ');
|
||||
$prefix = substr($name, 0, $length);
|
||||
$count = count(explode(' » ', $prefix));
|
||||
$name = str_repeat(' ', $count) . '» ' . substr($name, $length);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$names[] = $origname;
|
||||
|
||||
return $name;
|
||||
|
|
|
@ -226,8 +226,7 @@ body.attachmentwin #topnav .topright {
|
|||
}
|
||||
|
||||
#tasklists li.virtual {
|
||||
padding-top: 4px;
|
||||
height: 16px;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
#tasklists li label {
|
||||
|
@ -293,6 +292,7 @@ body.attachmentwin #topnav .topright {
|
|||
|
||||
#tasklists li.virtual span.listname {
|
||||
color: #aaa;
|
||||
top: 2px;
|
||||
}
|
||||
|
||||
#tasklists li.virtual span.handle {
|
||||
|
|
Loading…
Add table
Reference in a new issue