diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-09-23 18:01:09 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-09-23 18:01:09 +0000 |
| commit | 4944f3bd8c940ff4d90a8ee5561582b258ac2554 (patch) | |
| tree | d43979b0bb7cc3b99edebaef65631a0d47ae1c0c | |
| parent | 872ea482f966e001ce21b5274b020cf279ac86b1 (diff) | |
#1485403: fix "bolding" of folder with subfolders with more than two levels
git-svn-id: https://svn.roundcube.net/trunk@1885 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/program/js/app.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js index d1341c7c6..baa66efde 100644 --- a/roundcubemail/program/js/app.js +++ b/roundcubemail/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); |
