From e855b4bc99546e097000cf29d48031988e9739f8 Mon Sep 17 00:00:00 2001 From: wolfgang Date: Fri, 2 Feb 2007 20:56:03 +0000 Subject: [PATCH] git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1015 d1b88da0-ebda-0310-925b-ed51d893ca5b --- ChangeLog | 13 +++++++++++++ SOPE/NGCards/ChangeLog | 5 +++++ SOPE/NGCards/NGVCard.m | 1 + SoObjects/Contacts/SOGoContactLDAPEntry.m | 5 +++++ SoObjects/Contacts/SOGoContactLDAPFolder.m | 1 + UI/Contacts/English.lproj/Localizable.strings | 1 + UI/Contacts/French.lproj/Localizable.strings | 1 + UI/Contacts/UIxContactEditor.m | 16 +++++++++++----- UI/Templates/ContactsUI/UIxContactEditor.wox | 8 ++++++++ 9 files changed, 46 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4c84b8a9..516357d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2007-02-02 Wolfgang Sourdeau + + * UI/Contacts/UIxContactEditor.m: display and handle the new + Freebusy URL entry. + + * SoObjects/Contacts/SOGoContactLDAPFolder.m + ([SOGoContactLDAPFolder -_searchAttributes]): retrieve "calFBURL" + from the server. + + * SoObjects/Contacts/SOGoContactLDAPEntry.m ([SOGoContactLDAPEntry + -vCard]): put the LDAP "calFBURL" field in the vCard's "FBURL" + entry. + 2007-01-31 Wolfgang Sourdeau * SoObjects/Appointments/SOGoCalendarComponent.m diff --git a/SOPE/NGCards/ChangeLog b/SOPE/NGCards/ChangeLog index 9a889262..2d156fe2 100644 --- a/SOPE/NGCards/ChangeLog +++ b/SOPE/NGCards/ChangeLog @@ -1,3 +1,8 @@ +2007-02-02 Wolfgang Sourdeau + + * NGVCard.m ([NGVCard -classForTag:classTag]): declare an entry + for "FBURL". + 2006-08-03 Helge Hess * NGVCardSaxHandler.m: fixed a bug with returning parsing results. diff --git a/SOPE/NGCards/NGVCard.m b/SOPE/NGCards/NGVCard.m index 21add8fb..6e9ec01c 100644 --- a/SOPE/NGCards/NGVCard.m +++ b/SOPE/NGCards/NGVCard.m @@ -79,6 +79,7 @@ || [classTag isEqualToString: @"TEL"] || [classTag isEqualToString: @"TZ"] || [classTag isEqualToString: @"URL"] + || [classTag isEqualToString: @"FBURL"] || [classTag isEqualToString: @"LABEL"] || [classTag isEqualToString: @"EMAIL"] || [classTag isEqualToString: @"NICKNAME"] diff --git a/SoObjects/Contacts/SOGoContactLDAPEntry.m b/SoObjects/Contacts/SOGoContactLDAPEntry.m index 92f38c43..7e047e4c 100644 --- a/SoObjects/Contacts/SOGoContactLDAPEntry.m +++ b/SoObjects/Contacts/SOGoContactLDAPEntry.m @@ -182,6 +182,11 @@ [element setValue: 3 to: location]; if (streetAddress || location) [vcard addChild: element]; + info = [ldapEntry singleAttributeWithName: @"calFBURL"]; + if (info) + [vcard addChildWithTag: @"FBURL" + types: nil + singleValue: info]; } return vcard; diff --git a/SoObjects/Contacts/SOGoContactLDAPFolder.m b/SoObjects/Contacts/SOGoContactLDAPFolder.m index bc4ae3a0..07305567 100644 --- a/SoObjects/Contacts/SOGoContactLDAPFolder.m +++ b/SoObjects/Contacts/SOGoContactLDAPFolder.m @@ -233,6 +233,7 @@ @"locality", @"birthyear", @"serialNumber", + @"calFBURL", nil]; } diff --git a/UI/Contacts/English.lproj/Localizable.strings b/UI/Contacts/English.lproj/Localizable.strings index ec1cc675..739f2a1d 100644 --- a/UI/Contacts/English.lproj/Localizable.strings +++ b/UI/Contacts/English.lproj/Localizable.strings @@ -76,6 +76,7 @@ "Note: " = "Note: "; "Timezone: " = "Timezone: "; "Birthday: " = "Birthday: "; +"Freebusy URL: " = "Freebusy URL: "; "Add as..." = "Add as..."; "Recipient" = "Recipient"; diff --git a/UI/Contacts/French.lproj/Localizable.strings b/UI/Contacts/French.lproj/Localizable.strings index ae004fa6..4892982f 100644 --- a/UI/Contacts/French.lproj/Localizable.strings +++ b/UI/Contacts/French.lproj/Localizable.strings @@ -76,6 +76,7 @@ "Note: " = "Commentaires : "; "Timezone: " = "Fuseau horaire : "; "Birthday: " = "D. de naissance : "; +"Freebusy URL: " = "Adresse du FreeBusy : "; "Add as..." = "Ajouter..."; "Recipient" = "Destinataire"; diff --git a/UI/Contacts/UIxContactEditor.m b/UI/Contacts/UIxContactEditor.m index 275e68a2..ead9c8f3 100644 --- a/UI/Contacts/UIxContactEditor.m +++ b/UI/Contacts/UIxContactEditor.m @@ -36,7 +36,7 @@ { if ((self = [super init])) { - snapshot = [[NSMutableDictionary alloc] initWithCapacity:16]; + snapshot = [[NSMutableDictionary alloc] initWithCapacity: 16]; preferredEmail = nil; } @@ -330,6 +330,8 @@ to: [self _simpleValueForType: @"work" inArray: elements]]; [self _setSnapshotValue: @"homeURL" to: [self _simpleValueForType: @"home" inArray: elements]]; + [self _setSnapshotValue: @"calFBURL" + to: [[card uniqueChildWithTag: @"FBURL"] value: 0]]; [self _setSnapshotValue: @"title" to: [card title]]; [self _setupOrgFields]; @@ -338,10 +340,10 @@ [self _setSnapshotValue: @"tz" to: [card tz]]; [self _setSnapshotValue: @"note" to: [card note]]; - [self _retrieveQueryParameter: @"contactEmail" - intoSnapshotValue: @"workMail"]; - [self _retrieveQueryParameter: @"contactFN" - intoSnapshotValue: @"fn"]; + [self _retrieveQueryParameter: @"contactEmail" + intoSnapshotValue: @"workMail"]; + [self _retrieveQueryParameter: @"contactFN" + intoSnapshotValue: @"fn"]; } - (id ) defaultAction @@ -455,6 +457,10 @@ [element setValue: 5 to: [snapshot objectForKey: @"workPostalCode"]]; [element setValue: 6 to: [snapshot objectForKey: @"workCountry"]]; + element = [CardElement simpleElementWithTag: @"fburl" + value: [snapshot objectForKey: @"calFBURL"]]; + [card setUniqueChild: element]; + [self _savePhoneValues]; [self _saveEmails]; } diff --git a/UI/Templates/ContactsUI/UIxContactEditor.wox b/UI/Templates/ContactsUI/UIxContactEditor.wox index 9309fa4a..6e3f0f94 100644 --- a/UI/Templates/ContactsUI/UIxContactEditor.wox +++ b/UI/Templates/ContactsUI/UIxContactEditor.wox @@ -329,6 +329,14 @@ + + + + +