From f19c2c0d6722d2af58107369b2d0b9f5f27ff489 Mon Sep 17 00:00:00 2001 From: maxime Date: Thu, 14 Jul 2005 12:39:34 +0000 Subject: [PATCH] Adding Attendees from AB works again git-svn-id: http://svn.opengroupware.org/SOGo/trunk@751 d1b88da0-ebda-0310-925b-ed51d893ca5b --- SOGo/SoObjects/Contacts/SOGoContactFolder.m | 2 +- SOGo/UI/Contacts/UIxContactsSelectionView.m | 40 ++++++++++----------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/SOGo/SoObjects/Contacts/SOGoContactFolder.m b/SOGo/SoObjects/Contacts/SOGoContactFolder.m index 6bd07b89..23bb95d4 100644 --- a/SOGo/SoObjects/Contacts/SOGoContactFolder.m +++ b/SOGo/SoObjects/Contacts/SOGoContactFolder.m @@ -82,7 +82,7 @@ NSArray *fields, *records; fields = [NSArray arrayWithObjects: - @"c_name", + @"c_name", @"cn", @"sn", @"givenname", @"l", @"mail", @"telephonenumber", nil]; diff --git a/SOGo/UI/Contacts/UIxContactsSelectionView.m b/SOGo/UI/Contacts/UIxContactsSelectionView.m index ee926fd2..2e960de9 100644 --- a/SOGo/UI/Contacts/UIxContactsSelectionView.m +++ b/SOGo/UI/Contacts/UIxContactsSelectionView.m @@ -66,20 +66,7 @@ static SOGoJSStringFormatter *jsFormatter = nil; } - (NSString *)_getCN { - NSString *sn, *gn; - - sn = [self->contact valueForKey:@"sn"]; - gn = [self->contact valueForKey:@"givenname"]; - - if((!sn || [sn length] == 0) && - (!gn || [gn length] == 0)) { - return @""; - } else if(!sn || [sn length] == 0) { - return gn; - } else if(!gn || [gn length] == 0) { - return sn; - } - return [NSString stringWithFormat:@"%@ %@", sn, gn]; + return [self->contact valueForKey:@"cn"]; } - (NSString *)getCN { @@ -101,15 +88,28 @@ static SOGoJSStringFormatter *jsFormatter = nil; - (NSString *)jsOnClickCode { /* callback parameters: (type, cn, dn, email, uid, sn) */ + + + + /* changed to : type, email, uid, sn, cn, dn */ static NSString *jsCode = \ - @"javascript:opener.window.%@('', '%@', '', '%@', '%@', '%@');"; + @"javascript:opener.window.%@('', '%@', '%@', '%@', '%@', '');"; return [NSString stringWithFormat:jsCode, - [self callback], - [self getCN], - [self getMail], - [self getUID], - [self getSN]]; + [self callback], + [self getMail], + [self getUID], + [self getSN], + [self getCN]]; + + + + // return [NSString stringWithFormat:jsCode, + // [self callback], + // [self getCN], + // [self getMail], + // [self getUID], + // [self getSN]]; } @end /* UIxContactsInlineListView */ -- 2.39.5