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 /roundcubemail/program/js | |
| 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
Diffstat (limited to 'roundcubemail/program/js')
| -rw-r--r-- | roundcubemail/program/js/app.js | 18 |
1 files changed, 17 insertions, 1 deletions
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 |
