diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2012-04-09 16:29:35 +0200 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2012-04-09 16:30:58 +0200 |
commit | 9c247ce874697ed6833c58d21ddecee418ddb525 (patch) | |
tree | b092d0d1b312d4e6611ee7aaa85b20e60f620395 /apps | |
parent | 53091551d8019fa64dbcf5197a380f60bb2e6827 (diff) | |
download | nextcloud-server-9c247ce874697ed6833c58d21ddecee418ddb525.tar.gz nextcloud-server-9c247ce874697ed6833c58d21ddecee418ddb525.zip |
Removed padding.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/contacts/js/contacts.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/contacts/js/contacts.js b/apps/contacts/js/contacts.js index 3b264c0197e..b2678e8c528 100644 --- a/apps/contacts/js/contacts.js +++ b/apps/contacts/js/contacts.js @@ -264,6 +264,18 @@ Contacts={ }, add:function(n, fn, aid, isnew){ // add a new contact console.log('Add contact: ' + n + ', ' + fn + ' ' + aid); + var card = $('#card')[0]; + if(!card) { + console.log('Loading proper card DOM'); + $.getJSON(OC.filePath('contacts', 'ajax', 'loadcard.php'),{},function(jsondata){ + if(jsondata.status == 'success'){ + $('#rightcontent').html(jsondata.data.page); + Contacts.UI.loadHandlers(); + } else{ + OC.dialogs.alert(jsondata.data.message, t('contacts', 'Error')); + } + }); + } $.post(OC.filePath('contacts', 'ajax', 'addcontact.php'), { n: n, fn: fn, aid: aid }, function(jsondata) { if (jsondata.status == 'success'){ |