summaryrefslogtreecommitdiff
path: root/roundcubemail/program/js/app.js
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-04-22 08:18:10 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-04-22 08:18:10 +0000
commit0ef4707dd2ff95a0b3e809db7194e5b1b759f63e (patch)
treecc55de78bc8171d1372ecf9c614d38552ef4946e /roundcubemail/program/js/app.js
parent2781c6f678f44e14a64a240686933a0a429ef7e2 (diff)
- Fix update_contact_row() was setting wrong ID when newcid=null
git-svn-id: https://svn.roundcube.net/trunk@4684 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js/app.js')
-rw-r--r--roundcubemail/program/js/app.js19
1 files changed, 8 insertions, 11 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js
index e529fa671..d0e408da2 100644
--- a/roundcubemail/program/js/app.js
+++ b/roundcubemail/program/js/app.js
@@ -3789,28 +3789,25 @@ function rcube_webmail()
// update a contact record in the list
this.update_contact_row = function(cid, cols_arr, newcid)
{
+ var c, row, list = this.contact_list;
+
cid = String(cid).replace(this.identifier_expr, '_');
- newcid = String(newcid).replace(this.identifier_expr, '_');
- var row;
- if (this.contact_list.rows[cid] && (row = this.contact_list.rows[cid].obj)) {
- for (var c=0; c<cols_arr.length; c++)
+ if (list.rows[cid] && (row = list.rows[cid].obj)) {
+ for (c=0; c<cols_arr.length; c++)
if (row.cells[c])
$(row.cells[c]).html(cols_arr[c]);
// cid change
if (newcid) {
+ newcid = String(newcid).replace(this.identifier_expr, '_');
row.id = 'rcmrow' + newcid;
- this.contact_list.remove_row(cid);
- this.contact_list.init_row(row);
- this.contact_list.selection[0] = newcid;
+ list.remove_row(cid);
+ list.init_row(row);
+ list.selection[0] = newcid;
row.style.display = '';
}
-
- return true;
}
-
- return false;
};
// add row to contacts list