2 commits - plugins/calendar plugins/libkolab plugins/tasklist
Aleksander Machniak
machniak at kolabsys.com
Thu Nov 21 15:13:04 CET 2013
plugins/calendar/skins/larry/calendar.css | 3 ++-
plugins/libkolab/lib/kolab_storage.php | 29 +++++++++++++++++++++++++----
plugins/tasklist/skins/larry/tasklist.css | 4 ++--
3 files changed, 29 insertions(+), 7 deletions(-)
New commits:
commit a525da41b4b643e7abeafcd0820c2552047c411d
Merge: b1917d6 5df1346
Author: Aleksander Machniak <machniak at kolabsys.com>
Date: Thu Nov 21 15:12:51 2013 +0100
Merge branch 'master' of ssh://git.kolab.org/git/roundcube
commit b1917d67149191972cc90195e9d6e234f35549eb
Author: Aleksander Machniak <machniak at kolabsys.com>
Date: Thu Nov 21 15:12:15 2013 +0100
Improve other users folders display on the hierarchized folders list (Bug #2377)
diff --git a/plugins/calendar/skins/larry/calendar.css b/plugins/calendar/skins/larry/calendar.css
index 69ebd78..ef63d47 100644
--- a/plugins/calendar/skins/larry/calendar.css
+++ b/plugins/calendar/skins/larry/calendar.css
@@ -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,
diff --git a/plugins/libkolab/lib/kolab_storage.php b/plugins/libkolab/lib/kolab_storage.php
index a95a59e..d6e7043 100644
--- a/plugins/libkolab/lib/kolab_storage.php
+++ b/plugins/libkolab/lib/kolab_storage.php
@@ -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;
diff --git a/plugins/tasklist/skins/larry/tasklist.css b/plugins/tasklist/skins/larry/tasklist.css
index 7a1df99..b9d10c6 100644
--- a/plugins/tasklist/skins/larry/tasklist.css
+++ b/plugins/tasklist/skins/larry/tasklist.css
@@ -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 {
More information about the commits
mailing list