diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-11-24 10:26:35 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-11-24 10:26:35 +0000 |
| commit | c7de0310a4d92eaf512fdac73472b8b584734e2c (patch) | |
| tree | d4767ab2b55869517fb4ad1655e5ed9924f5fe0f | |
| parent | 3db1079f66d13bdd0f1e9a3e561d3548d8ed1689 (diff) | |
- Mark (with different color) folders with recent messages (#1486234)
git-svn-id: https://svn.roundcube.net/trunk@5483 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/CHANGELOG | 1 | ||||
| -rw-r--r-- | roundcubemail/program/js/app.js | 18 | ||||
| -rw-r--r-- | roundcubemail/program/steps/mail/check_recent.inc | 3 | ||||
| -rw-r--r-- | roundcubemail/program/steps/mail/func.inc | 4 | ||||
| -rw-r--r-- | roundcubemail/skins/default/mail.css | 5 |
5 files changed, 27 insertions, 4 deletions
diff --git a/roundcubemail/CHANGELOG b/roundcubemail/CHANGELOG index 8691b57ef..bc7f092b5 100644 --- a/roundcubemail/CHANGELOG +++ b/roundcubemail/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Mark (with different color) folders with recent messages (#1486234) - Fix possible infinite redirect on attachment preview (#1488199) - Improved clickjacking protection for browsers which don't support X-Frame-Options headers - Fixed bug where similiar folder names were highlighted wrong (#1487860) diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js index cc1eeef15..d71415618 100644 --- a/roundcubemail/program/js/app.js +++ b/roundcubemail/program/js/app.js @@ -2021,6 +2021,7 @@ function rcube_webmail() url += '&_refresh=1'; this.select_folder(mbox, '', true); + this.unmark_folder(mbox, 'recent', '', true); this.env.mailbox = mbox; // load message list remotely @@ -5448,6 +5449,18 @@ function rcube_webmail() } }; + // adds a class to selected folder + this.mark_folder = function(name, class_name, prefix, encode) + { + $(this.get_folder_li(name, prefix, encode)).addClass(class_name); + }; + + // adds a class to selected folder + this.unmark_folder = function(name, class_name, prefix, encode) + { + $(this.get_folder_li(name, prefix, encode)).removeClass(class_name); + }; + // helper method to find a folder list item this.get_folder_li = function(name, prefix, encode) { @@ -5555,13 +5568,16 @@ function rcube_webmail() }; // update the mailboxlist - this.set_unread_count = function(mbox, count, set_title) + this.set_unread_count = function(mbox, count, set_title, mark) { if (!this.gui_objects.mailboxlist) return false; this.env.unread_counts[mbox] = count; this.set_unread_count_display(mbox, set_title); + + if (mark) + this.mark_folder(mbox, mark, '', true); }; // update the mailbox count display diff --git a/roundcubemail/program/steps/mail/check_recent.inc b/roundcubemail/program/steps/mail/check_recent.inc index e22cccca5..ab0d3c818 100644 --- a/roundcubemail/program/steps/mail/check_recent.inc +++ b/roundcubemail/program/steps/mail/check_recent.inc @@ -49,7 +49,8 @@ foreach ($a_mailboxes as $mbox_name) { array('mailbox' => $mbox_name, 'is_current' => $is_current)); } - rcmail_send_unread_count($mbox_name, true); + rcmail_send_unread_count($mbox_name, true, null, + (!$is_current && ($status & 1)) ? 'recent' : ''); if ($status && $is_current) { // refresh saved search set diff --git a/roundcubemail/program/steps/mail/func.inc b/roundcubemail/program/steps/mail/func.inc index 8407b06cd..2d25fe31b 100644 --- a/roundcubemail/program/steps/mail/func.inc +++ b/roundcubemail/program/steps/mail/func.inc @@ -472,7 +472,7 @@ function rcmail_get_mailbox_name_text() } -function rcmail_send_unread_count($mbox_name, $force=false, $count=null) +function rcmail_send_unread_count($mbox_name, $force=false, $count=null, $mark='') { global $RCMAIL; @@ -484,7 +484,7 @@ function rcmail_send_unread_count($mbox_name, $force=false, $count=null) $unseen = $count; if ($unseen != $old_unseen || ($mbox_name == 'INBOX')) - $RCMAIL->output->command('set_unread_count', $mbox_name, $unseen, ($mbox_name == 'INBOX')); + $RCMAIL->output->command('set_unread_count', $mbox_name, $unseen, ($mbox_name == 'INBOX'), $mark); rcmail_set_unseen_count($mbox_name, $unseen); diff --git a/roundcubemail/skins/default/mail.css b/roundcubemail/skins/default/mail.css index 4dfc20674..42a62de3f 100644 --- a/roundcubemail/skins/default/mail.css +++ b/roundcubemail/skins/default/mail.css @@ -448,6 +448,11 @@ color: #666; } +#mailboxlist li.recent > a +{ + color: #0066FF; +} + #mailboxlist li.selected, #mailboxlist li.droptarget li.selected { |
