diff options
author | alecpl <alec@alec.pl> | 2010-10-17 17:43:05 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2010-10-17 17:43:05 +0000 |
commit | 4438d667609406abd969872f262d6a11b0e28b72 (patch) | |
tree | 24fe07387c591f7dea262751e8f070fd5a6a0f09 /program/js/app.js | |
parent | 4c6a61a68405efc148c5af75bbd8dbae1771b1eb (diff) |
- Add separate column for message status icon (#1486665)
Diffstat (limited to 'program/js/app.js')
-rw-r--r-- | program/js/app.js | 58 |
1 files changed, 34 insertions, 24 deletions
diff --git a/program/js/app.js b/program/js/app.js index cb94d9597..558a8b8a7 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -1550,8 +1550,10 @@ function rcube_webmail() if (uid && this.env.messages[uid]) $.extend(row, this.env.messages[uid]); - // set eventhandler to message icon - if (this.env.subject_col != null && (row.icon = document.getElementById('msgicn'+row.uid))) { + row.msgicon = document.getElementById('msgicn'+row.uid); + + // set eventhandler to message status icon + if (row.icon = document.getElementById('statusicn'+row.uid)) { row.icon._row = row.obj; row.icon.onmousedown = function(e) { self.command('toggle_status', this); rcube_event.cancel(e); }; } @@ -1618,20 +1620,14 @@ function rcube_webmail() row.id = 'rcmrow'+uid; row.className = css_class; - // message status icon + // message status icons css_class = 'msgicon'; if (!flags.unread && flags.unread_children > 0) css_class += ' unreadchildren'; - if (flags.deleted) - css_class += ' deleted'; - else if (flags.replied || flags.forwarded) { - if (flags.replied) - css_class += ' replied'; - if (flags.forwarded) - css_class += ' forwarded'; - } - else if (flags.unread) - css_class += ' unread'; + if (flags.replied) + css_class += ' replied'; + if (flags.forwarded) + css_class += ' forwarded'; // update selection if (message.selected && !list.in_selection(uid)) @@ -1693,6 +1689,15 @@ function rcube_webmail() else html = ' '; } + else if (c == 'status') { + if (flags.deleted) + css_class = 'deleted'; + else if (flags.unread) + css_class = 'unread'; + else + css_class = 'msgicon'; + html = '<span id="statusicn'+uid+'" class="'+css_class+'"> </span>'; + } else if (c == 'threads') html = expando; else if (c == 'subject') @@ -2221,23 +2226,28 @@ function rcube_webmail() return false; if (rows[uid].icon) { - css_class = 'msgicon'; - if (!rows[uid].unread && rows[uid].unread_children) - css_class += ' unreadchildren'; if (rows[uid].deleted) - css_class += ' deleted'; - else if (rows[uid].replied || rows[uid].forwarded) { - if (rows[uid].replied) - css_class += ' replied'; - if (rows[uid].forwarded) - css_class += ' forwarded'; - } + css_class = 'deleted'; else if (rows[uid].unread) - css_class += ' unread'; + css_class = 'unread'; + else + css_class = 'msgicon'; rows[uid].icon.className = css_class; } + if (rows[uid].msgicon) { + css_class = 'msgicon'; + if (!rows[uid].unread && rows[uid].unread_children) + css_class += ' unreadchildren'; + if (rows[uid].replied) + css_class += ' replied'; + if (rows[uid].forwarded) + css_class += ' forwarded'; + + rows[uid].msgicon.className = css_class; + } + if (rows[uid].flagged_icon) { css_class = (rows[uid].flagged ? 'flagged' : 'unflagged'); rows[uid].flagged_icon.className = css_class; |