From babc5d2d6913443e4c780651fed156e67e47f12f Mon Sep 17 00:00:00 2001 From: wolfgang Date: Wed, 3 Jan 2007 21:24:27 +0000 Subject: [PATCH] git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1006 d1b88da0-ebda-0310-925b-ed51d893ca5b --- ChangeLog | 10 ++ UI/Common/UIxAclEditor.h | 5 +- UI/Common/UIxAclEditor.m | 30 +++- UI/Templates/UIxAclEditor.wox | 16 +- UI/WebServerResources/UIxAclEditor.css | 4 + UI/WebServerResources/UIxAclEditor.js | 143 +++++++++++++---- UI/WebServerResources/generic.js | 203 +++++++++++-------------- 7 files changed, 255 insertions(+), 156 deletions(-) diff --git a/ChangeLog b/ChangeLog index c532738d..e22af632 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2007-01-03 Wolfgang Sourdeau + + * UI/Common/UIxAclEditor.m ([UIxAclEditor -assistantsValue]): new + accessor that returns the comma-separated list of users with role + "Assistant". + ([UIxAclEditor -delegatesValue]): same as above for "Delegate". + ([UIxAclEditor -_prepareUsers]): there is no longer a concept of + "checkedUsers". Instead, each user is either classified in the + list of assistants or the list of delegates. + 2006-12-22 Wolfgang Sourdeau * UI/MailerUI/UIxMailMainFrame.m ([UIxMailMainFrame diff --git a/UI/Common/UIxAclEditor.h b/UI/Common/UIxAclEditor.h index 53f7d299..e1dbaa50 100644 --- a/UI/Common/UIxAclEditor.h +++ b/UI/Common/UIxAclEditor.h @@ -31,12 +31,15 @@ BOOL publishInFreeBusy; NSArray *acls; NSMutableArray *users; - NSMutableArray *checkedUsers; + NSMutableArray *assistants; + NSMutableArray *delegates; NSString *ownerCN; } - (NSArray *) aclsForFolder; - (NSString *) ownerCN; +- (NSString *) assistantsValue; +- (NSString *) delegatesValue; @end diff --git a/UI/Common/UIxAclEditor.m b/UI/Common/UIxAclEditor.m index cb8cdb0b..7b00e62d 100644 --- a/UI/Common/UIxAclEditor.m +++ b/UI/Common/UIxAclEditor.m @@ -41,7 +41,8 @@ prepared = NO; publishInFreeBusy = NO; users = [NSMutableArray new]; - checkedUsers = [NSMutableArray new]; + delegates = [NSMutableArray new]; + assistants = [NSMutableArray new]; ownerCN = nil; } @@ -51,7 +52,8 @@ - (void) dealloc { [users release]; - [checkedUsers release]; + [delegates release]; + [assistants release]; if (ownerCN) [ownerCN release]; [super dealloc]; @@ -104,7 +106,9 @@ { if ([[currentAcl objectForKey: @"c_role"] isEqualToString: SOGoRole_Delegate]) - [checkedUsers addObject: currentUser]; + [delegates addObject: [currentUser cn]]; + else + [assistants addObject: [currentUser cn]]; [users addObject: currentUser]; } } @@ -122,12 +126,28 @@ return users; } -- (NSArray *) checkedUsers +- (NSArray *) delegates { if (!prepared) [self _prepareUsers]; - return checkedUsers; + return delegates; +} + +- (NSString *) assistantsValue +{ + if (!prepared) + [self _prepareUsers]; + + return [assistants componentsJoinedByString: @","]; +} + +- (NSString *) delegatesValue +{ + if (!prepared) + [self _prepareUsers]; + + return [delegates componentsJoinedByString: @","]; } - (BOOL) publishInFreeBusy diff --git a/UI/Templates/UIxAclEditor.wox b/UI/Templates/UIxAclEditor.wox index f750aed9..f32d4841 100644 --- a/UI/Templates/UIxAclEditor.wox +++ b/UI/Templates/UIxAclEditor.wox @@ -12,18 +12,20 @@
- - + +
-
+ contacts="usersForFolder" /> +