]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fixes for adding contact property
authorBart Visscher <bartv@thisnet.nl>
Fri, 7 Oct 2011 21:01:44 +0000 (23:01 +0200)
committerBart Visscher <bartv@thisnet.nl>
Fri, 7 Oct 2011 21:01:49 +0000 (23:01 +0200)
apps/contacts/ajax/addproperty.php
apps/contacts/js/interface.js
apps/contacts/lib/vcard.php
apps/contacts/templates/part.details.php

index 68c4f65fa5c74e5f5b434912e45f77539a036c84..101cfabbe84c8ef7e50da66d92ef0a77c9ed20fd 100644 (file)
@@ -53,7 +53,7 @@ $name = $_POST['name'];
 $value = $_POST['value'];
 $parameters = isset($_POST['parameteres'])?$_POST['parameters']:array();
 
-OC_Contacts_VCard::addVCardProperty($vcard, $name, $value, $parameters);
+$property = OC_Contacts_VCard::addVCardProperty($vcard, $name, $value, $parameters);
 
 $line = count($vcard->children) - 1;
 $checksum = md5($property->serialize());
index 215c4001d9ef446267700ac96c5379791c62e3ee..0fcfdeaab5df00dc7dbc375a7133de3d1869313e 100644 (file)
@@ -75,7 +75,7 @@ $(document).ready(function(){
        $('#contacts_addpropertyform input[type="submit"]').live('click',function(){
                $.post('ajax/addproperty.php',$('#contacts_addpropertyform').serialize(),function(jsondata){
                        if(jsondata.status == 'success'){
-                               $('#contacts_cardoptions').before(jsondata.data.page);
+                               $('#contacts_details').append(jsondata.data.page);
                                $('#contacts_addpropertyform').remove();
                                $('#contacts_addcontactsparts').remove();
                        }
index bff2897384fd14ce6ca002877560666e4212b743..9f15cf4bc379615826855508b0b40122d9062c9f 100644 (file)
@@ -290,6 +290,7 @@ class OC_Contacts_VCard{
                }
 
                $vcard->add($property);
+               return $property;
        }
 
        /**
index 254d54a4e8edc1b539769f087624d3b83ed4fa6b..26a33739acb071167d34e67322593d6c633f9a72 100644 (file)
@@ -1,5 +1,5 @@
 <?php if(array_key_exists('FN',$_['details'])): ?>
-       <table>
+       <table id="contacts_details">
                <?php if(isset($_['details']['PHOTO'])): // Emails first ?>
                        <tr class="contacts_details_property">
                                <td class="contacts_details_left">&nbsp;</td>