From 03fe1c2ad312eb55799ac4498826829df4bf70d4 Mon Sep 17 00:00:00 2001 From: thomascube Date: Tue, 10 Jan 2012 17:37:31 +0000 Subject: Reflect threads expand status in css classes --- program/js/app.js | 11 ++++++++--- 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 = '
  
'; + row_class += ' thread' + (message.expanded? ' expanded' : ''); } } tree += ' '; + 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; */ -- cgit v1.2.3