diff options
author | thomascube <thomas@roundcube.net> | 2012-01-10 17:37:31 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2012-01-10 17:37:31 +0000 |
commit | 03fe1c2ad312eb55799ac4498826829df4bf70d4 (patch) | |
tree | 933d1ae25fe35ac3919899422922992d0ebc5bfd | |
parent | d741a96ecdde5a2b1a454e6b9a324350e7316525 (diff) |
Reflect threads expand status in css classes
-rw-r--r-- | program/js/app.js | 11 | ||||
-rw-r--r-- | skins/larry/mail.css | 4 |
2 files changed, 12 insertions, 3 deletions
diff --git a/program/js/app.js b/program/js/app.js index 57f54d033..ab226e74c 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -1738,11 +1738,12 @@ function rcube_webmail() flags: flags.extra_flags }); - var c, n, col, html, tree = '', expando = '', + var c, n, col, html, css_class, + tree = '', expando = '', list = this.message_list, rows = list.rows, message = this.env.messages[uid], - css_class = 'message' + row_class = 'message' + (!flags.seen ? ' unread' : '') + (flags.deleted ? ' deleted' : '') + (flags.flagged ? ' flagged' : '') @@ -1752,7 +1753,6 @@ function rcube_webmail() row = document.createElement('tr'); row.id = 'rcmrow'+uid; - row.className = css_class; // message status icons css_class = 'msgicon'; @@ -1789,6 +1789,8 @@ function rcube_webmail() } else message.expanded = true; + + row_class += ' thread expanded'; } else if (message.has_children) { if (message.expanded === undefined && (this.env.autoexpand_threads == 1 || (this.env.autoexpand_threads == 2 && message.unread_children))) { @@ -1796,10 +1798,12 @@ function rcube_webmail() } expando = '<div id="rcmexpando' + uid + '" class="' + (message.expanded ? 'expanded' : 'collapsed') + '"> </div>'; + row_class += ' thread' + (message.expanded? ' expanded' : ''); } } tree += '<span id="msgicn'+uid+'" class="'+css_class+'"> </span>'; + row.className = row_class; // build subject link if (!bw.ie && cols.subject) { @@ -2139,6 +2143,7 @@ function rcube_webmail() this.set_unread_children(uid); row.expanded = !row.expanded; + $(row.obj)[row.expanded?'removeClass':'addClass']('expanded'); this.message_list.expand_row(e, uid); }; diff --git a/skins/larry/mail.css b/skins/larry/mail.css index 3f2d8fe4a..c07d5e76e 100644 --- a/skins/larry/mail.css +++ b/skins/larry/mail.css @@ -354,6 +354,10 @@ a.iconbutton.threadmode.selected { /* background-color: #fff; */ } +#messagelist tr.thread.expanded td { + background-color: #ededed; +} + #messagelist tr.unread { font-weight: bold; /* background-color: #fff; */ |