summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-09-23 18:01:09 +0000
committeralecpl <alec@alec.pl>2008-09-23 18:01:09 +0000
commit07d36706e557471ed5b34093916e70693150bbfe (patch)
tree4e356ae075c7bb0a6c998ac72028fa22e9620486 /program
parent94a99c11f440dc4cef2db9b087586f3fb0f6c9b1 (diff)
#1485403: fix "bolding" of folder with subfolders with more than two levels
Diffstat (limited to 'program')
-rw-r--r--program/js/app.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/program/js/app.js b/program/js/app.js
index d1341c7c6..baa66efde 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -3555,7 +3555,7 @@ function rcube_webmail()
var reg, text_obj, item, mycount, childcount, div;
if (item = this.get_folder_li(mbox))
{
- mycount = this.env.unread_counts[mbox];
+ mycount = this.env.unread_counts[mbox] ? this.env.unread_counts[mbox] : 0;
text_obj = item.getElementsByTagName('a')[0];
reg = /\s+\([0-9]+\)$/i;
@@ -3564,10 +3564,10 @@ function rcube_webmail()
div.className.match(/collapsed/))
{
// add children's counters
- for (var k in this.env.unread_counts)
+ for (var k in this.env.unread_counts)
if (k.indexOf(mbox + this.env.delimiter) == 0) {
childcount += this.env.unread_counts[k];
- }
+ }
}
if (mycount && text_obj.innerHTML.match(reg))
@@ -3578,7 +3578,7 @@ function rcube_webmail()
text_obj.innerHTML = text_obj.innerHTML.replace(reg, '');
// set parent's display
- reg = new RegExp(RegExp.escape(this.env.delimiter) + '[^' + RegExp.escape(this.env.delimiter) + ']+');
+ reg = new RegExp(RegExp.escape(this.env.delimiter) + '[^' + RegExp.escape(this.env.delimiter) + ']+$');
if (mbox.match(reg))
this.set_unread_count_display(mbox.replace(reg, ''), false);