$adr_types = OC_Contacts_VCard::getTypesOfProperty($l10n, 'ADR');
$phone_types = OC_Contacts_VCard::getTypesOfProperty($l10n, 'TEL');
-$tmpl = new OC_Template('contacts','part.property');
+if ($vcard->children[$line]->name == 'FN'){
+ $tmpl = new OC_Template('contacts','part.property.FN');
+}
+else{
+ $tmpl = new OC_Template('contacts','part.property');
+}
$tmpl->assign('adr_types',$adr_types);
$tmpl->assign('phone_types',$phone_types);
$tmpl->assign('property',OC_Contacts_VCard::structureProperty($vcard->children[$line],$line));
$('.contacts_property [data-use="edit"]').live('click',function(){
var id = $('#rightcontent').data('id');
- var checksum = $(this).parents('li').first().data('checksum');
+ var checksum = $(this).parents('.contacts_property').first().data('checksum');
$.getJSON('ajax/showsetproperty.php',{'id': id, 'checksum': checksum },function(jsondata){
if(jsondata.status == 'success'){
$('.contacts_property[data-checksum="'+checksum+'"]').html(jsondata.data.page)
<?php if(array_key_exists('FN',$_['details'])): ?>
- <p id="contacts_details_name"><?php echo $_['details']['FN'][0]['value']; ?></p>
+ <?php echo $this->inc('part.property.FN', array('property' => $_['details']['FN'][0])); ?>
<img class="svg action" id="contacts_deletecard" src="<?php echo image_path('', 'actions/delete.svg'); ?>" title="<?php echo $l->t('Delete contact');?>" />
<?php if(isset($_['details']['PHOTO'])): // Emails first ?>
--- /dev/null
+ <p id="contacts_details_name" class="contacts_property" data-checksum="<?php echo $_['property']['checksum']; ?>">
+ <?php echo $_['property']['value']; ?>
+ <span style="display:none;" data-use="edit"><img class="svg action" src="<?php echo image_path('', 'actions/rename.svg'); ?>" /></span>
+ </p>
+<?php if (!isset($_['details'])): ?>
+<script>
+$('#leftcontent li.active a').text('<?php echo $_['property']['value']; ?>');
+</script>
+<?php endif ?>
<form id="contacts_setpropertyform">
<input type="hidden" name="checksum" value="<?php echo $_['property']['checksum']; ?>">
<input type="hidden" name="id" value="<?php echo $_['id']; ?>">
- <?php if($_['property']['name']=='ADR'): ?>
+ <?php if($_['property']['name']=='FN'): ?>
+ <p class="contacts_property_data"><input id="fn" type="text" name="value" value="<?php echo $_['property']['value']; ?>"></p>
+ <?php elseif($_['property']['name']=='ADR'): ?>
<p class="contacts_property_name"><label for="adr_pobox"><?php echo $l->t('Address'); ?></label></p>
<ol class="contacts_property_data" id="contacts_addresspart">
<li class="input">