]> source.dussan.org Git - nextcloud-server.git/commitdiff
Removed padding.
authorThomas Tanghus <thomas@tanghus.net>
Mon, 9 Apr 2012 14:29:35 +0000 (16:29 +0200)
committerThomas Tanghus <thomas@tanghus.net>
Mon, 9 Apr 2012 14:30:58 +0000 (16:30 +0200)
apps/contacts/js/contacts.js

index 3b264c0197efdb1163b71d0bee30191a3c9de9e7..b2678e8c52843caccc60d16ae2dff76451c73c97 100644 (file)
@@ -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'){