mirror of
https://github.com/owncloudarchive/contacts.git
synced 2025-01-18 07:52:21 +01:00
Minor layout change.
This commit is contained in:
parent
bfc7054718
commit
8bd01c044f
@ -803,7 +803,7 @@ OC.Contacts={
|
||||
OC.Contacts.Card.addPhone();
|
||||
break;
|
||||
case 'ADR':
|
||||
if($('#addressdisplay>dl').length == 1) {
|
||||
if($('addresses>dl').length == 1) {
|
||||
$('#addresses').show();
|
||||
}
|
||||
OC.Contacts.Card.editAddress('new', true);
|
||||
@ -949,10 +949,10 @@ OC.Contacts={
|
||||
},
|
||||
loadAddresses:function() {
|
||||
$('#addresses').hide();
|
||||
$('#addressdisplay dl.propertycontainer').remove();
|
||||
var addresscontainer = $('#addressdisplay');
|
||||
$('#addresses dl.propertycontainer').remove();
|
||||
var addresscontainer = $('#addresses');
|
||||
for(var adr in this.data.ADR) {
|
||||
addresscontainer.find('dl').first().clone().insertAfter($('#addressdisplay dl').last()).show();
|
||||
addresscontainer.find('dl').first().clone().insertAfter($('#addresses dl').last()).show();
|
||||
addresscontainer.find('dl').last().removeClass('template').addClass('propertycontainer');
|
||||
addresscontainer.find('dl').last().data('checksum', this.data.ADR[adr]['checksum']);
|
||||
var adrarray = this.data.ADR[adr]['value'];
|
||||
@ -991,7 +991,6 @@ OC.Contacts={
|
||||
}
|
||||
if(addresscontainer.find('dl').length > 1) {
|
||||
$('#addresses').show();
|
||||
$('#contact_communication').show();
|
||||
}
|
||||
return false;
|
||||
},
|
||||
@ -1000,8 +999,8 @@ OC.Contacts={
|
||||
var params = {id: this.id};
|
||||
if(obj === 'new') {
|
||||
isnew = true;
|
||||
$('#addressdisplay dl').first().clone(true).insertAfter($('#addressdisplay dl').last()).show();
|
||||
container = $('#addressdisplay dl').last();
|
||||
$('#addresses dl').first().clone(true).insertAfter($('#addresses dl').last()).show();
|
||||
container = $('#addresses dl').last();
|
||||
container.removeClass('template').addClass('propertycontainer');
|
||||
} else {
|
||||
params['checksum'] = OC.Contacts.checksumFor(obj);
|
||||
@ -1018,7 +1017,7 @@ OC.Contacts={
|
||||
buttons: {
|
||||
'Ok':function() {
|
||||
if(isnew) {
|
||||
OC.Contacts.Card.saveAddress(this, $('#addressdisplay dl:last-child').find('input').first(), isnew);
|
||||
OC.Contacts.Card.saveAddress(this, $('#addresses dl:last-child').find('input').first(), isnew);
|
||||
} else {
|
||||
OC.Contacts.Card.saveAddress(this, obj, isnew);
|
||||
}
|
||||
@ -1122,7 +1121,7 @@ OC.Contacts={
|
||||
},
|
||||
saveAddress:function(dlg, obj, isnew){
|
||||
if(isnew) {
|
||||
container = $('#addressdisplay dl').last();
|
||||
container = $('#addresses dl').last();
|
||||
obj = container.find('input').first();
|
||||
} else {
|
||||
checksum = OC.Contacts.checksumFor(obj);
|
||||
@ -1341,7 +1340,6 @@ OC.Contacts={
|
||||
}
|
||||
if($('#emaillist li').length > 1) {
|
||||
$('#emails').show();
|
||||
$('#contact_communication').show();
|
||||
}
|
||||
$('#emaillist li:last-child').find('input[type="text"]').focus();
|
||||
return false;
|
||||
@ -1404,7 +1402,6 @@ OC.Contacts={
|
||||
}
|
||||
if(phonelist.find('li').length > 1) {
|
||||
$('#phones').show();
|
||||
$('#contact_communication').show();
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
@ -24,8 +24,9 @@ $id = isset($_['id']) ? $_['id'] : '';
|
||||
</div>
|
||||
</div> <!-- contact_photo -->
|
||||
|
||||
<div id="contact_identity">
|
||||
<form method="post">
|
||||
|
||||
<div id="contact_identity">
|
||||
<input type="hidden" name="id" value="<?php echo $_['id'] ?>">
|
||||
<input type="hidden" name="requesttoken" value="<?php echo $_['requesttoken'] ?>">
|
||||
<fieldset id="ident" class="contactpart">
|
||||
@ -49,61 +50,52 @@ $id = isset($_['id']) ? $_['id'] : '';
|
||||
<a role="button" class="action delete" title="<?php echo $l->t('Delete'); ?>"></a><a role="button" class="action edit" title="<?php echo $l->t('Edit groups'); ?>"></a></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div> <!-- contact_identity -->
|
||||
|
||||
<!-- div class="delimiter"></div -->
|
||||
<div id="contact_communication" class="contactsection">
|
||||
<form method="post">
|
||||
<!-- email addresses -->
|
||||
<div id="emails">
|
||||
<ul id="emaillist" class="propertylist">
|
||||
<li class="template hidden" data-element="EMAIL">
|
||||
<input type="checkbox" class="contacts_property tip" name="parameters[TYPE][]" value="PREF" title="<?php echo $l->t('Preferred'); ?>" />
|
||||
<input type="email" required="required" class="nonempty contacts_property" name="value" value="" x-moz-errormessage="<?php echo $l->t('Please specify a valid email address.'); ?>" placeholder="<?php echo $l->t('Enter email address'); ?>" />
|
||||
<select multiple="multiple" name="parameters[TYPE][]">
|
||||
<?php echo OCP\html_select_options($_['email_types'], array()) ?>
|
||||
</select>
|
||||
<span class="listactions"><a class="action mail" title="<?php echo $l->t('Mail to address'); ?>"></a>
|
||||
<a role="button" class="action delete" title="<?php echo $l->t('Delete email address'); ?>"></a></span></li>
|
||||
</ul>
|
||||
</div> <!-- email addresses-->
|
||||
<!-- email addresses -->
|
||||
<div id="emails" class="hidden contactsection">
|
||||
<ul id="emaillist" class="propertylist">
|
||||
<li class="template hidden" data-element="EMAIL">
|
||||
<input type="checkbox" class="contacts_property tip" name="parameters[TYPE][]" value="PREF" title="<?php echo $l->t('Preferred'); ?>" />
|
||||
<input type="email" required="required" class="nonempty contacts_property" name="value" value="" x-moz-errormessage="<?php echo $l->t('Please specify a valid email address.'); ?>" placeholder="<?php echo $l->t('Enter email address'); ?>" />
|
||||
<select multiple="multiple" name="parameters[TYPE][]">
|
||||
<?php echo OCP\html_select_options($_['email_types'], array()) ?>
|
||||
</select>
|
||||
<span class="listactions"><a class="action mail" title="<?php echo $l->t('Mail to address'); ?>"></a>
|
||||
<a role="button" class="action delete" title="<?php echo $l->t('Delete email address'); ?>"></a></span></li>
|
||||
</ul>
|
||||
</div> <!-- email addresses-->
|
||||
|
||||
<!-- Phone numbers -->
|
||||
<div id="phones">
|
||||
<ul id="phonelist" class="propertylist">
|
||||
<li class="template hidden" data-element="TEL">
|
||||
<input type="checkbox" class="contacts_property tip" name="parameters[TYPE][]" value="PREF" title="<?php echo $l->t('Preferred'); ?>" />
|
||||
<input type="text" required="required" class="nonempty contacts_property" name="value" value="" placeholder="<?php echo $l->t('Enter phone number'); ?>" />
|
||||
<select multiple="multiple" name="parameters[TYPE][]">
|
||||
<?php echo OCP\html_select_options($_['phone_types'], array()) ?>
|
||||
</select>
|
||||
<a role="button" class="action delete" title="<?php echo $l->t('Delete phone number'); ?>"></a></li>
|
||||
</ul>
|
||||
</div> <!-- Phone numbers -->
|
||||
<!-- Phone numbers -->
|
||||
<div id="phones" class="hidden contactsection">
|
||||
<ul id="phonelist" class="propertylist">
|
||||
<li class="template hidden" data-element="TEL">
|
||||
<input type="checkbox" class="contacts_property tip" name="parameters[TYPE][]" value="PREF" title="<?php echo $l->t('Preferred'); ?>" />
|
||||
<input type="text" required="required" class="nonempty contacts_property" name="value" value="" placeholder="<?php echo $l->t('Enter phone number'); ?>" />
|
||||
<select multiple="multiple" name="parameters[TYPE][]">
|
||||
<?php echo OCP\html_select_options($_['phone_types'], array()) ?>
|
||||
</select>
|
||||
<a role="button" class="action delete" title="<?php echo $l->t('Delete phone number'); ?>"></a></li>
|
||||
</ul>
|
||||
</div> <!-- Phone numbers -->
|
||||
|
||||
<!-- Addresses -->
|
||||
<div id="addresses" class="hidden">
|
||||
<div id="addressdisplay">
|
||||
<dl class="addresscard template hidden" data-element="ADR"><dt>
|
||||
<input class="adr contacts_property" name="value" type="hidden" value="" />
|
||||
<input type="hidden" class="adr_type contacts_property" name="parameters[TYPE][]" value="" />
|
||||
<span class="adr_type_label"></span><a class="action globe" title="<?php echo $l->t('View on map'); ?>"></a><a class="action edit" title="<?php echo $l->t('Edit address details'); ?>"></a><a role="button" class="action delete" title="Delete address"></a>
|
||||
</dt><dd><ul class="addresslist"></ul></dd></dl>
|
||||
<!-- Addresses -->
|
||||
<div id="addresses" class="hidden contactsection">
|
||||
<dl class="addresscard template hidden" data-element="ADR"><dt>
|
||||
<input class="adr contacts_property" name="value" type="hidden" value="" />
|
||||
<input type="hidden" class="adr_type contacts_property" name="parameters[TYPE][]" value="" />
|
||||
<span class="adr_type_label"></span><a class="action globe" title="<?php echo $l->t('View on map'); ?>"></a><a class="action edit" title="<?php echo $l->t('Edit address details'); ?>"></a><a role="button" class="action delete" title="Delete address"></a>
|
||||
</dt><dd><ul class="addresslist"></ul></dd></dl>
|
||||
</div> <!-- Addresses -->
|
||||
|
||||
</div> <!-- addressdisplay -->
|
||||
</div> <!-- Addresses -->
|
||||
</form>
|
||||
</div> <!-- contact_communication -->
|
||||
|
||||
<div id="contact_note" class="contactsection">
|
||||
<form class="float" method="post">
|
||||
<div id="contact_note" class="hidden contactsection">
|
||||
<div id="note" class="propertycontainer" data-element="NOTE">
|
||||
<textarea class="contacts_property" name="value" required="required" placeholder="<?php echo $l->t('Add notes here.'); ?>" cols="60" wrap="hard"></textarea>
|
||||
</div>
|
||||
</form>
|
||||
</div> <!-- contact_note -->
|
||||
|
||||
</form>
|
||||
|
||||
<div id="actionbar">
|
||||
<div id="contacts_propertymenu">
|
||||
<button class="button" id="contacts_propertymenu_button"><?php echo $l->t('Add field'); ?></button>
|
||||
|
Loading…
x
Reference in New Issue
Block a user