summaryrefslogtreecommitdiff
path: root/roundcubemail/program/js/app.js
diff options
context:
space:
mode:
authortill <till@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-03-25 00:48:16 +0000
committertill <till@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-03-25 00:48:16 +0000
commit9cee435d259ce4d15975b355f141016d9a7ffc02 (patch)
tree04aed5d12c0f5f3f772b8e0a0ff8c58520b63ba5 /roundcubemail/program/js/app.js
parent26f78224c51892da0ac28085a2147ed15f092351 (diff)
* committing patch from #1484906
git-svn-id: https://svn.roundcube.net/trunk@1213 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js/app.js')
-rw-r--r--roundcubemail/program/js/app.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js
index ec5fac3c2..fa78c24a8 100644
--- a/roundcubemail/program/js/app.js
+++ b/roundcubemail/program/js/app.js
@@ -1525,12 +1525,16 @@ function rcube_webmail()
{
// mark all message rows as read/unread
var icn_src;
+ var res_uids = new Array();
var rows = this.message_list.rows;
for (var i=0; i<a_uids.length; i++)
{
uid = a_uids[i];
- if (rows[uid])
+ // check if flag isn't set yet
+ if (rows[uid] && ((flag=='unread' && !rows[uid].unread) || (flag=='read' && rows[uid].unread)))
{
+ res_uids[res_uids.length] = uid;
+
rows[uid].unread = (flag=='unread' ? true : false);
if (rows[uid].classname.indexOf('unread')<0 && rows[uid].unread)
@@ -1556,8 +1560,9 @@ function rcube_webmail()
rows[uid].icon.src = icn_src;
}
}
-
- this.http_post('mark', '_uid='+a_uids.join(',')+'&_flag='+flag);
+
+ if (res_uids.length)
+ this.http_post('mark', '_uid='+res_uids.join(',')+'&_flag='+flag);
};
// mark all message rows as deleted/undeleted