summaryrefslogtreecommitdiff
path: root/program/js/app.js
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2013-02-13 15:09:29 +0100
committerThomas Bruederli <thomas@roundcube.net>2013-02-13 15:09:29 +0100
commita0e86dcdeb201bb2422b3e4b8e249c2868f4c5ab (patch)
tree1a821087167c15555c13051999067e8377331f50 /program/js/app.js
parent004f866f203cbca3fd9ed5547dd849da2d0882ff (diff)
Fix updating contacts
Diffstat (limited to 'program/js/app.js')
-rw-r--r--program/js/app.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/program/js/app.js b/program/js/app.js
index f9b72cdc2..e95344641 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -4229,7 +4229,7 @@ function rcube_webmail()
this.load_contact = function(cid, action, framed)
{
var win, url = {}, target = window,
- rec = this.contact_list.data[cid];
+ rec = this.contact_list ? this.contact_list.data[cid] : null;
if (win = this.get_frame_window(this.env.contentframe)) {
url._framed = 1;
@@ -4240,8 +4240,8 @@ function rcube_webmail()
if (!cid)
this.contact_list.clear_selection();
- this.enable_command('compose', rec.email);
- this.enable_command('export-selected', rec._type != 'group');
+ this.enable_command('compose', rec && rec.email);
+ this.enable_command('export-selected', rec && rec._type != 'group');
}
else if (framed)
return false;
@@ -4351,7 +4351,7 @@ function rcube_webmail()
};
// update a contact record in the list
- this.update_contact_row = function(cid, cols_arr, newcid, source)
+ this.update_contact_row = function(cid, cols_arr, newcid, source, data)
{
var c, row, list = this.contact_list;
@@ -4378,6 +4378,8 @@ function rcube_webmail()
list.selection[0] = newcid;
row.style.display = '';
}
+
+ list.data[cid] = data;
}
};