* UI/Contacts/UIxContactView.m (secondaryEmail):
function renamed to secondaryEmails. It now returns all addresses instead of the first one found in the vcard. * UI/Templates/ContactsUI/UIxContactView.wox: Show all addresses returned from secondaryEmails. This still need some css tweaks. Monotone-Parent: 4c9ff5822433c2ff8fcad8c7432a9575f9890b24 Monotone-Revision: f3654e9c29406b43890181ca1e890b64daca6321 Monotone-Author: jraby@inverse.ca Monotone-Date: 2012-07-05T17:17:50
This commit is contained in:
parent
96f1a8b247
commit
993c0ee52e
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
||||||
|
2012-07-05 Jean Raby <jraby@inverse.ca>
|
||||||
|
|
||||||
|
* UI/Contacts/UIxContactView.m (secondaryEmail):
|
||||||
|
function renamed to secondaryEmails. It now returns all addresses
|
||||||
|
instead of the first one found in the vcard.
|
||||||
|
|
||||||
|
* UI/Templates/ContactsUI/UIxContactView.wox:
|
||||||
|
Show all addresses returned from secondaryEmails.
|
||||||
|
This still need some css tweaks.
|
||||||
|
|
||||||
|
|
||||||
2012-06-29 Jean Raby <jraby@inverse.ca>
|
2012-06-29 Jean Raby <jraby@inverse.ca>
|
||||||
|
|
||||||
* SoObjects/SOGo/WORequest+SOGo.[mh]
|
* SoObjects/SOGo/WORequest+SOGo.[mh]
|
||||||
|
|
|
@ -154,12 +154,14 @@
|
||||||
value: mailTo];
|
value: mailTo];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *) secondaryEmail
|
- (NSArray *) secondaryEmails
|
||||||
{
|
{
|
||||||
NSString *email, *fn, *mailTo;
|
NSString *email, *fn, *mailTo;
|
||||||
NSMutableArray *emails;
|
NSMutableArray *emails;
|
||||||
|
NSMutableArrays *secondaryEmails;
|
||||||
|
|
||||||
emails = [NSMutableArray array];
|
emails = [NSMutableArray array];
|
||||||
|
secondayEmails = [NSMutableArray array];
|
||||||
mailTo = nil;
|
mailTo = nil;
|
||||||
|
|
||||||
[emails addObjectsFromArray: [card childrenWithTag: @"email"]];
|
[emails addObjectsFromArray: [card childrenWithTag: @"email"]];
|
||||||
|
@ -185,6 +187,7 @@
|
||||||
{
|
{
|
||||||
email = [[emails objectAtIndex: i] flattenedValuesForKey: @""];
|
email = [[emails objectAtIndex: i] flattenedValuesForKey: @""];
|
||||||
|
|
||||||
|
// skip primary email
|
||||||
if ([email caseInsensitiveCompare: [card preferredEMail]] != NSOrderedSame)
|
if ([email caseInsensitiveCompare: [card preferredEMail]] != NSOrderedSame)
|
||||||
{
|
{
|
||||||
fn = [card fn];
|
fn = [card fn];
|
||||||
|
@ -193,13 +196,19 @@
|
||||||
mailTo = [NSString stringWithFormat: @"<a href=\"mailto:%@\""
|
mailTo = [NSString stringWithFormat: @"<a href=\"mailto:%@\""
|
||||||
@" onclick=\"return openMailTo('%@ <%@>');\">"
|
@" onclick=\"return openMailTo('%@ <%@>');\">"
|
||||||
@"%@</a>", email, fn, email, email];
|
@"%@</a>", email, fn, email, email];
|
||||||
break;
|
[secondaryEmails addObject: [self _cardStringWithLabel: @"Additional Email:"
|
||||||
|
value: mailTo]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[secondaryEmails addObject: [self _cardStringWithLabel: @"Additional Email:"
|
||||||
|
value: mailTo]];
|
||||||
|
}
|
||||||
|
|
||||||
return [self _cardStringWithLabel: @"Additional Email:"
|
|
||||||
value: mailTo];
|
return secondayEmails;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *) screenName
|
- (NSString *) screenName
|
||||||
|
|
|
@ -19,8 +19,10 @@
|
||||||
><var:string value="displayName" escapeHTML="NO"
|
><var:string value="displayName" escapeHTML="NO"
|
||||||
/><var:string value="nickName" escapeHTML="NO"
|
/><var:string value="nickName" escapeHTML="NO"
|
||||||
/><var:string value="primaryEmail" escapeHTML="NO"
|
/><var:string value="primaryEmail" escapeHTML="NO"
|
||||||
/><var:string value="secondaryEmail" escapeHTML="NO"
|
/><var:foreach list="secondaryEmails" item="currentEmail">
|
||||||
/><var:string value="screenName" escapeHTML="NO"
|
<var:string value="currentEmail" escapeHTML="NO"/>
|
||||||
|
</var:foreach>
|
||||||
|
<var:string value="screenName" escapeHTML="NO"
|
||||||
/><var:string value="preferredAddress" escapeHTML="NO"
|
/><var:string value="preferredAddress" escapeHTML="NO"
|
||||||
/><var:string value="categories" escapeHTML="NO"
|
/><var:string value="categories" escapeHTML="NO"
|
||||||
/></div
|
/></div
|
||||||
|
|
Loading…
Reference in a new issue