From 52e8071bf7dcc5fb2c157222ef22929d05b9da61 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Thu, 11 Aug 2011 18:59:01 +0200 Subject: [PATCH 1/5] lots of image changes, use svg EVERYWHERE POSSIBLE --- appinfo/app.php | 2 +- img/icon.png | Bin 741 -> 0 bytes templates/part.details.php | 4 ++-- templates/part.property.php | 20 ++++++++++---------- 4 files changed, 13 insertions(+), 13 deletions(-) delete mode 100644 img/icon.png diff --git a/appinfo/app.php b/appinfo/app.php index 30aa0e1a..4fbbd9c6 100644 --- a/appinfo/app.php +++ b/appinfo/app.php @@ -14,5 +14,5 @@ OC_App::addNavigationEntry( array( 'id' => 'contacts_index', 'order' => 10, 'href' => OC_Helper::linkTo( 'contacts', 'index.php' ), - 'icon' => OC_Helper::imagePath( 'contacts', 'icon.png' ), + 'icon' => OC_Helper::imagePath( 'admin', 'users.svg' ), 'name' => 'Contacts' )); diff --git a/img/icon.png b/img/icon.png deleted file mode 100644 index ea2ed9e3335ea5be11896d705b6afaf92a691695..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 741 zcmV0xSW>Y?K}?-*lmo6Y7T0C=7^?|GhUn&yCMnrwJ@*cC!N z_kCaM1B{K0y{uNNGbsUkmq@VF@{t`gkrH+NRkA7fKsXC5D|1;M?Rmo zR#sL>2=QCjb)+I92q8|Tlt~|;R;wKn5r_!oa{1Tl>guWQ`}=7wRjpRLH1!L>#>U16 z*L6c8!otGBrj$~xt*w2k*XtMHiHV7$_4W15EPw&P?Ck7aB6?gZl{jMz%gf7+D2je; zZ*PCKZCeu2JpgcB_fSgtJqysr$H(VQ(|qALj%^r*rRzGn-EKDw!zhm9BiD6r4Gs<# z0U!*+vmgk*5Yf)o*491%Xw7ExJrUi(HF17^{+Eat0Hl*wN~t)G<956Kjfmbb&iP2z zlwDD3zVv3sxNX~9DRn=Jq8u$PEmhj>cCOd!F-_BS0F+(b|CGz+m=J<#Ns?3mQ~(qJ z@VU9U*Kr)XS1V^b%XAnpDdjPM<4pb)5nVTuzTli|+ST7!tyZ7y?(R+=930#Zf?!A~ zWh$l2BuQWxMu&6WDHIApynVC8412h^924Dn08Gs9b126z+02F{f0L}pX1aR^X X4}!;3{&)-G00000NkvXXu0mjfU`t8+ diff --git a/templates/part.details.php b/templates/part.details.php index e463459e..4277357b 100644 --- a/templates/part.details.php +++ b/templates/part.details.php @@ -24,6 +24,6 @@
- - + +
diff --git a/templates/part.property.php b/templates/part.property.php index 1611e54b..06587269 100644 --- a/templates/part.property.php +++ b/templates/part.property.php @@ -3,27 +3,27 @@
t('Name'); ?>
- +
t('Birthday'); ?>
l('date',new DateTime($_['property']['value'])); ?> - +
t('Organisation'); ?>
- - + +
t('Email'); ?>
- - + +
t('Telephone'); ?>
@@ -32,8 +32,8 @@ (t('tel_'.strtolower($_['property']['parameters']['TYPE'])); ?>) - - + +
@@ -51,8 +51,8 @@ t('Region'); ?>
t('Postal Code'); ?>
t('Country'); ?> - - + +
From e0c28865cb7b1fdec6ee6af16e9d4e244759558b Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Sat, 13 Aug 2011 04:04:48 +0200 Subject: [PATCH 2/5] merged admin, help and settings to settings --- appinfo/app.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appinfo/app.php b/appinfo/app.php index 4fbbd9c6..7ae6be5d 100644 --- a/appinfo/app.php +++ b/appinfo/app.php @@ -14,5 +14,5 @@ OC_App::addNavigationEntry( array( 'id' => 'contacts_index', 'order' => 10, 'href' => OC_Helper::linkTo( 'contacts', 'index.php' ), - 'icon' => OC_Helper::imagePath( 'admin', 'users.svg' ), + 'icon' => OC_Helper::imagePath( 'settings', 'users.svg' ), 'name' => 'Contacts' )); From 985799b577a51a106add30b9748c65107b5f33ba Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Sat, 13 Aug 2011 05:27:50 +0200 Subject: [PATCH 3/5] added global action class for icons --- templates/part.details.php | 4 ++-- templates/part.property.php | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/templates/part.details.php b/templates/part.details.php index 4277357b..119c8848 100644 --- a/templates/part.details.php +++ b/templates/part.details.php @@ -24,6 +24,6 @@
- - + +
diff --git a/templates/part.property.php b/templates/part.property.php index 06587269..cdb03068 100644 --- a/templates/part.property.php +++ b/templates/part.property.php @@ -3,27 +3,27 @@
t('Name'); ?>
- +
t('Birthday'); ?>
l('date',new DateTime($_['property']['value'])); ?> - +
t('Organisation'); ?>
- - + +
t('Email'); ?>
- - + +
t('Telephone'); ?>
@@ -32,8 +32,8 @@ (t('tel_'.strtolower($_['property']['parameters']['TYPE'])); ?>) - - + +
@@ -51,8 +51,8 @@ t('Region'); ?>
t('Postal Code'); ?>
t('Country'); ?> - - + +
From 82e08d58d1764575d923ab2021effce2333c993a Mon Sep 17 00:00:00 2001 From: Jakob Sack Date: Thu, 11 Aug 2011 11:20:12 +0200 Subject: [PATCH 4/5] Fix creation of UID in contacts --- lib/addressbook.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/addressbook.php b/lib/addressbook.php index bab26084..9a5dea6f 100644 --- a/lib/addressbook.php +++ b/lib/addressbook.php @@ -167,7 +167,12 @@ class OC_Contacts_Addressbook{ $uri = $property->value.'.vcf'; } } - if(is_null($uri)) $uri = self::createUID().'.vcf'; + if(is_null($uri)){ + $uid = self::createUID(); + $uri = $uid.'.vcf'; + $card->add(new Sabre_VObject_Property('UID',$uid)); + $data = $card->serialize(); + }; $stmt = OC_DB::prepare( 'INSERT INTO *PREFIX*contacts_cards (addressbookid,fullname,carddata,uri,lastmodified) VALUES(?,?,?,?,?)' ); $result = $stmt->execute(array($id,$fn,$data,$uri,time())); From 01e3aa5471ab53efb22df49f6a92971b5088cd25 Mon Sep 17 00:00:00 2001 From: Jakob Sack Date: Sun, 14 Aug 2011 23:48:43 +0200 Subject: [PATCH 5/5] Small design changes in Contacts --- css/styles.css | 3 ++- js/interface.js | 14 +++++------ templates/part.details.php | 46 +++++++++++++++++++++---------------- templates/part.property.php | 42 ++++++++++++++++----------------- 4 files changed, 56 insertions(+), 49 deletions(-) diff --git a/css/styles.css b/css/styles.css index c7680f4a..1f95fdb2 100644 --- a/css/styles.css +++ b/css/styles.css @@ -1 +1,2 @@ -.contacts_propertyname {float:left;} +.contacts_details_left {text-align:right;vertical-align:top;padding:2px;} +.contacts_details_right {text-align:left;vertical-align:top;padding:2px;} diff --git a/js/interface.js b/js/interface.js index ef2179b3..b8a66d51 100644 --- a/js/interface.js +++ b/js/interface.js @@ -102,12 +102,12 @@ $(document).ready(function(){ return false; }); - $('.contacts_property [data-use="edit"]').live('click',function(){ + $('.contacts_details_property [data-use="edit"]').live('click',function(){ var id = $('#rightcontent').data('id'); var checksum = $(this).parent().parent().data('checksum'); $.getJSON('ajax/showsetproperty.php',{'id': id, 'checksum': checksum },function(jsondata){ if(jsondata.status == 'success'){ - $('.contacts_property[data-checksum="'+checksum+'"] .contacts_propertyvalue').html(jsondata.data.page); + $('.contacts_details_property[data-checksum="'+checksum+'"] .contacts_details_right').html(jsondata.data.page); } else{ alert(jsondata.data.message); @@ -119,7 +119,7 @@ $(document).ready(function(){ $('#contacts_setpropertyform input[type="submit"]').live('click',function(){ $.post('ajax/setproperty.php',$('#contacts_setpropertyform').serialize(),function(jsondata){ if(jsondata.status == 'success'){ - $('.contacts_property[data-checksum="'+jsondata.data.oldchecksum+'"]').replaceWith(jsondata.data.page); + $('.contacts_details_property[data-checksum="'+jsondata.data.oldchecksum+'"]').replaceWith(jsondata.data.page); } else{ alert(jsondata.data.message); @@ -128,12 +128,12 @@ $(document).ready(function(){ return false; }); - $('.contacts_property [data-use="delete"]').live('click',function(){ + $('.contacts_details_property [data-use="delete"]').live('click',function(){ var id = $('#rightcontent').data('id'); var checksum = $(this).parent().parent().data('checksum'); $.getJSON('ajax/deleteproperty.php',{'id': id, 'checksum': checksum },function(jsondata){ if(jsondata.status == 'success'){ - $('.contacts_property[data-checksum="'+checksum+'"]').remove(); + $('.contacts_details_property[data-checksum="'+checksum+'"]').remove(); } else{ alert(jsondata.data.message); @@ -143,11 +143,11 @@ $(document).ready(function(){ }); - $('.contacts_property').live('mouseenter',function(){ + $('.contacts_details_property').live('mouseenter',function(){ $(this).find('span').show(); }); - $('.contacts_property').live('mouseleave',function(){ + $('.contacts_details_property').live('mouseleave',function(){ $(this).find('span').hide(); }); }); diff --git a/templates/part.details.php b/templates/part.details.php index 119c8848..5048349a 100644 --- a/templates/part.details.php +++ b/templates/part.details.php @@ -1,27 +1,33 @@ - - - - - inc('part.property', array('property' => $_['details']['FN'][0])); ?> - + + + + + + + + + inc('part.property', array('property' => $_['details']['FN'][0])); ?> + + + inc('part.property', array('property' => $_['details']['BDAY'][0])); ?> + - - inc('part.property', array('property' => $_['details']['BDAY'][0])); ?> - + + inc('part.property', array('property' => $_['details']['ORG'][0])); ?> + - - inc('part.property', array('property' => $_['details']['ORG'][0])); ?> - - - - -
- - inc('part.property',array('property' => $property )); ?> + + + + inc('part.property',array('property' => $property )); ?> + + - - +
  + +
+
diff --git a/templates/part.property.php b/templates/part.property.php index cdb03068..9e2a5cab 100644 --- a/templates/part.property.php +++ b/templates/part.property.php @@ -1,49 +1,49 @@ -
+ -
t('Name'); ?>
-
+ t('Name'); ?> + -
+ -
t('Birthday'); ?>
-
+ t('Birthday'); ?> + l('date',new DateTime($_['property']['value'])); ?> -
+ -
t('Organisation'); ?>
-
+ t('Organisation'); ?> + -
+ -
t('Email'); ?>
-
+ t('Email'); ?> + -
+ -
t('Telephone'); ?>
-
+ t('Telephone'); ?> + (t('tel_'.strtolower($_['property']['parameters']['TYPE'])); ?>) -
+ -
+ t('Address'); ?>
(t('adr_'.strtolower($_['property']['parameters']['TYPE'])); ?>) -
-
+ + t('PO Box'); ?>
t('Extended Address'); ?>
t('Street Name'); ?>
@@ -53,6 +53,6 @@ t('Country'); ?> -
+ -
+