mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-12-01 13:24:10 +01:00
Add new contact name to end of cantact list
This commit is contained in:
parent
7cbfa71fcc
commit
53836fa857
@ -44,10 +44,9 @@ $vcard->add(new Sabre_VObject_Property('UID',OC_Contacts_VCard::createUID()));
|
||||
$id = OC_Contacts_VCard::add($aid,$vcard->serialize());
|
||||
|
||||
$details = OC_Contacts_VCard::structureContact($vcard);
|
||||
$name = $details['FN'][0]['value'];
|
||||
$tmpl = new OC_Template('contacts','part.details');
|
||||
$tmpl->assign('details',$details);
|
||||
$tmpl->assign('id',$id);
|
||||
$page = $tmpl->fetchPage();
|
||||
|
||||
OC_JSON::success(array('data' => array( 'id' => $id, 'name' => $name, 'page' => $page )));
|
||||
OC_JSON::success(array('data' => array( 'id' => $id, 'page' => $page )));
|
||||
|
@ -104,6 +104,8 @@ $(document).ready(function(){
|
||||
if(jsondata.status == 'success'){
|
||||
$('#rightcontent').data('id',jsondata.data.id);
|
||||
$('#rightcontent').html(jsondata.data.page);
|
||||
$('#leftcontent .active').removeClass('active');
|
||||
$('#leftcontent ul').append('<li data-id="'+jsondata.data.id+'" class="active"><a href="index.php?id='+jsondata.data.id+'">'+jsondata.data.name+'</a></li>');
|
||||
}
|
||||
else{
|
||||
alert(jsondata.data.message);
|
||||
|
@ -246,7 +246,7 @@ class OC_Contacts_VCard{
|
||||
public static function escapeSemicolons($value){
|
||||
foreach($value as &$i ){
|
||||
$i = implode("\\\\;", explode(';', $i));
|
||||
} unset($i);
|
||||
}
|
||||
return implode(';',$value);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user