diff options
| author | Nathan Kinkade <nkinkade@nkinka.de> | 2009-03-15 20:00:02 +0000 |
|---|---|---|
| committer | Nathan Kinkade <nkinkade@nkinka.de> | 2009-03-15 20:00:02 +0000 |
| commit | 8018757b75262d009bc6611be76bf4696d549caa (patch) | |
| tree | a4d36e5c2f5de3137144362c8e27af2c8c2742e2 /roundcubemail/program/js | |
| parent | 945604dcb6805965ed498e690b003770fa619210 (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.js | 11 |
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"> </div>'; - tree += flags.has_children?'<div id="rcmexpando' + uid + '" class="' + (message.expanded?'expanded':'collapsed') + '"> </div>':'<div class="leaf"> </div>'; + var toggle_exp = (message.unread_children > 0) ? 'expanded' : 'collapsed'; + tree += flags.has_children?'<div id="rcmexpando' + uid + '" class="' + toggle_exp + '"> </div>':'<div class="leaf"> </div>'; + //tree += flags.has_children?'<div id="rcmexpando' + uid + '" class="' + (message.expanded?'expanded':'collapsed') + '"> </div>':'<div class="leaf"> </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="" />' : ''; |
