diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2012-07-21 14:26:57 +0200 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2012-07-21 14:26:57 +0200 |
commit | 51bafd32d6182612af1b911d178bac5bd3c16909 (patch) | |
tree | 71db111f73a365971817284482d58ef78d851c9f /apps/contacts | |
parent | 00de757169f7ac6787d087de0fb47f5a948cded3 (diff) | |
download | nextcloud-server-51bafd32d6182612af1b911d178bac5bd3c16909.tar.gz nextcloud-server-51bafd32d6182612af1b911d178bac5bd3c16909.zip |
Made contactlist optional in insertContact().
Diffstat (limited to 'apps/contacts')
-rw-r--r-- | apps/contacts/js/contacts.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/contacts/js/contacts.js b/apps/contacts/js/contacts.js index 994e1f87fd5..c190b2d3ea2 100644 --- a/apps/contacts/js/contacts.js +++ b/apps/contacts/js/contacts.js @@ -1523,6 +1523,11 @@ Contacts={ * it will be appended. */ insertContact:function(params) { + if(!params.contactlist) { + params['contactlist'] = params.data + ? $('#contacts ul[data-id="'+params.data.addressbookid+'"]') + : contact.data('bookid'); + } var contact = params.data ? $('<li data-id="'+params.data.id+'" data-bookid="'+params.data.addressbookid+'" role="button"><a href="'+OC.linkTo('contacts', 'index.php')+'&id='+params.data.id+'" style="background: url('+OC.filePath('contacts', '', 'thumbnail.php')+'?id='+params.data.id+') no-repeat scroll 0% 0% transparent;">'+params.data.displayname+'</a></li>') : params.contact; |