summaryrefslogtreecommitdiff
path: root/program/js
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-11-24 10:26:35 +0000
committeralecpl <alec@alec.pl>2011-11-24 10:26:35 +0000
commit636bd77074638a1132b8933c4fb114373aaec296 (patch)
treef482788161a1b290cffe6b1f381dcbfcc53e5b8c /program/js
parent80216d0b79fe4a3b4d637c94bda1616990291109 (diff)
- Mark (with different color) folders with recent messages (#1486234)
Diffstat (limited to 'program/js')
-rw-r--r--program/js/app.js18
1 files changed, 17 insertions, 1 deletions
diff --git a/program/js/app.js b/program/js/app.js
index cc1eeef15..d71415618 100644
--- a/program/js/app.js
+++ b/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