Monotone-Parent: e705fe92d77e84f110a9afc8e89c7bd0fe76b58c

Monotone-Revision: 844f1f631a8e5c8bd991267dca0d6ec51a256f21

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2006-08-30T22:57:18
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau 2006-08-30 22:57:18 +00:00
parent 39fd16a59f
commit ef89c28110
2 changed files with 27 additions and 50 deletions

View file

@ -1,5 +1,14 @@
2006-08-30 Wolfgang Sourdeau <wsourdeau@inverse.ca> 2006-08-30 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/Contacts/UIxContactSelector.m ([UIxContactSelector
-initialContactsAsString]): renamed implementation of
initialParticipants.
([UIxContactSelector -currentContactId])
([UIxContactSelector -currentContactName]): new methods used when
listing the initial contacts in the widget. Currently, both return
the person's cn but the latter should ultimately return a user
fullname.
* UI/Contacts/UIxContactSelector.h: separated interface from * UI/Contacts/UIxContactSelector.h: separated interface from
UIxContactSelector.m. UIxContactSelector.m.

View file

@ -20,41 +20,15 @@
*/ */
// $Id: UIxContactSelector.m 394 2004-10-14 08:47:35Z znek $ // $Id: UIxContactSelector.m 394 2004-10-14 08:47:35Z znek $
#import <NGExtensions/NGExtensions.h>
#import <SOGoUI/UIxComponent.h> #import <SOGoUI/UIxComponent.h>
#import <SOGo/AgenorUserManager.h> #import <SOGo/AgenorUserManager.h>
#import <Scheduler/iCalPerson+UIx.h> #import <Scheduler/iCalPerson+UIx.h>
@interface UIxContactSelector : UIxComponent #import "common.h"
{
NSString *title;
NSString *windowId;
NSString *selectorId;
NSString *callback;
NSArray *contacts; #import "UIxContactSelector.h"
}
- (void)setTitle:(NSString *)_title;
- (NSString *)title;
- (void)setWindowId:(NSString *)_winId;
- (NSString *)windowId;
- (void)setSelectorId:(NSString *)_selId;
- (NSString *)selectorId;
- (void)setCallback:(NSString *)_callback;
- (NSString *)callback;
- (void) setContacts: (NSArray *) _contacts;
- (NSArray *) contacts;
- (NSString *)relativeContactsPath;
- (NSString *)jsFunctionName;
- (NSString *)jsFunctionHref;
- (NSString *)jsCode;
@end
#include "common.h"
#include <NGExtensions/NGExtensions.h>
@implementation UIxContactSelector @implementation UIxContactSelector
@ -189,32 +163,16 @@
NSLog (@"go no attendees!"); NSLog (@"go no attendees!");
} }
- (NSString *) initialParticipantIds - (void) setCurrentContact: (iCalPerson *) aContact
{ {
NSMutableArray *uids; currentContact = aContact;
NSEnumerator *persons;
iCalPerson *person;
AgenorUserManager *um;
um = [AgenorUserManager sharedUserManager];
uids = [NSMutableArray arrayWithCapacity: [contacts count]];
persons = [contacts objectEnumerator];
person = [persons nextObject];
while (person)
{
[uids addObject: [um getUIDForICalPerson: person]];
person = [persons nextObject];
}
return [uids componentsJoinedByString: @","];
} }
- (NSString *) initialParticipants - (NSString *) initialContactsAsString
{ {
NSMutableArray *participants;
NSEnumerator *persons; NSEnumerator *persons;
iCalPerson *person; iCalPerson *person;
NSMutableArray *participants;
participants = [NSMutableArray arrayWithCapacity: [contacts count]]; participants = [NSMutableArray arrayWithCapacity: [contacts count]];
persons = [contacts objectEnumerator]; persons = [contacts objectEnumerator];
@ -228,4 +186,14 @@
return [participants componentsJoinedByString: @","]; return [participants componentsJoinedByString: @","];
} }
- (NSString *) currentContactId
{
return [currentContact cn];
}
- (NSString *) currentContactName
{
return [currentContact cn];
}
@end /* UIxContactSelector */ @end /* UIxContactSelector */