From 8bd01c044fa17cad5dca3605813cecc860672a3a Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Tue, 21 Aug 2012 06:02:20 +0200 Subject: [PATCH] Minor layout change. --- js/contacts.js | 19 ++++----- templates/part.contact.php | 84 +++++++++++++++++--------------------- 2 files changed, 46 insertions(+), 57 deletions(-) diff --git a/js/contacts.js b/js/contacts.js index 38f81213..f270cee4 100644 --- a/js/contacts.js +++ b/js/contacts.js @@ -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; }, diff --git a/templates/part.contact.php b/templates/part.contact.php index e74eef7d..491b4400 100644 --- a/templates/part.contact.php +++ b/templates/part.contact.php @@ -24,8 +24,9 @@ $id = isset($_['id']) ? $_['id'] : ''; -
+ +
@@ -49,61 +50,52 @@ $id = isset($_['id']) ? $_['id'] : '';
-
- -
-
- -
-
    - -
-
+ + - -
-
    - -
-
+ + - - -
-
- -
-
+
+ +