summaryrefslogtreecommitdiff
path: root/roundcubemail/program/js
diff options
context:
space:
mode:
authorNathan Kinkade <nkinkade@nkinka.de>2009-03-15 20:00:02 +0000
committerNathan Kinkade <nkinkade@nkinka.de>2009-03-15 20:00:02 +0000
commit8018757b75262d009bc6611be76bf4696d549caa (patch)
treea4d36e5c2f5de3137144362c8e27af2c8c2742e2 /roundcubemail/program/js
parent945604dcb6805965ed498e690b003770fa619210 (diff)
Change-set to let the IMAP server do the sensible sorting of threads i.e. sort threads by newest in-thread messages rather than simply by the root thread message.
Diffstat (limited to 'roundcubemail/program/js')
-rw-r--r--roundcubemail/program/js/app.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js
index 626756af6..9c0fafed9 100644
--- a/roundcubemail/program/js/app.js
+++ b/roundcubemail/program/js/app.js
@@ -3655,9 +3655,16 @@ function rcube_webmail()
{
for (var i=1;i<depth;i++)
tree += '<div class="branch">&nbsp</div>';
- tree += flags.has_children?'<div id="rcmexpando' + uid + '" class="' + (message.expanded?'expanded':'collapsed') + '">&nbsp;</div>':'<div class="leaf">&nbsp;</div>';
+ var toggle_exp = (message.unread_children > 0) ? 'expanded' : 'collapsed';
+ tree += flags.has_children?'<div id="rcmexpando' + uid + '" class="' + toggle_exp + '">&nbsp;</div>':'<div class="leaf">&nbsp;</div>';
+ //tree += flags.has_children?'<div id="rcmexpando' + uid + '" class="' + (message.expanded?'expanded':'collapsed') + '">&nbsp;</div>':'<div class="leaf">&nbsp;</div>';
if (depth > 1)
- row.style.display = 'none';
+ {
+ if (message.unread_children > 0 || message.unread)
+ row.style.display = '';
+ else
+ row.style.display = 'none';
+ }
}
tree += icon ? '<img src="'+icon+'" alt="" />' : '';