Hide container for emails/phones/adresses if there are none.

This commit is contained in:
Thomas Tanghus 2012-02-06 08:15:23 +01:00
parent 1e4444f25b
commit 23396721e4
2 changed files with 5 additions and 1 deletions

View File

@ -253,6 +253,7 @@ Contacts={
return false;
},
loadContact:function(jsondata){
$('#contact_communication').hide();
this.data = jsondata;
this.id = this.data.id;
console.log('loaded: ' + this.data.FN[0]['value']);
@ -660,6 +661,7 @@ Contacts={
}
if($('#addressdisplay dl').length > 1) {
$('#addresses').show();
$('#contact_communication').show();
}
Contacts.UI.loadListHandlers();
return false;
@ -858,6 +860,7 @@ Contacts={
}
if($('#emaillist li').length > 1) {
$('#emails').show();
$('#contact_communication').show();
}
$('#emaillist li:last-child').find('input[type="text"]').focus();
@ -919,6 +922,7 @@ Contacts={
}
if($('#phonelist li').length > 1) {
$('#phones').show();
$('#contact_communication').show();
}
return false;
},

View File

@ -77,7 +77,7 @@ $card['ADR'] = (array_key_exists('ADR',$_['details'])) ? $_['details']['ADR'] :
</div>
<!-- div class="delimiter"></div -->
<form id="contact_communication" method="post">
<form id="contact_communication" method="post" style="display: none;">
<div class="contactsection">
<!-- email addresses -->
<div id="emails" <?php echo (count($card['EMAIL'])>0?'':'style="display:none;"'); ?>>