From: znek Date: Thu, 23 Dec 2004 03:27:34 +0000 (+0000) Subject: new layout X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13e74e969685150492aa3da81b65358aa51304ff;p=scalable-opengroupware.org new layout git-svn-id: http://svn.opengroupware.org/SOGo/trunk@484 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/SOGo/UI/Scheduler/ChangeLog b/SOGo/UI/Scheduler/ChangeLog index 105655d8..1c5ffc69 100644 --- a/SOGo/UI/Scheduler/ChangeLog +++ b/SOGo/UI/Scheduler/ChangeLog @@ -1,3 +1,13 @@ +2004-12-23 Marcus Mueller + + * v0.9.109 + + * UIxCalScheduleOverview.[wox,m]: changed the UI to the final proposal + agreed upon by Laurent. + + * English.lproj/default.strings: renamed value for "action", suited to + new UI Layout + 2004-12-22 Marcus Mueller * v0.9.108 diff --git a/SOGo/UI/Scheduler/English.lproj/default.strings b/SOGo/UI/Scheduler/English.lproj/default.strings index eea01285..478ba4a0 100644 --- a/SOGo/UI/Scheduler/English.lproj/default.strings +++ b/SOGo/UI/Scheduler/English.lproj/default.strings @@ -93,7 +93,7 @@ "Meetings proposed by you" = "Meetings proposed by you"; "Meetings proposed to you" = "Meetings proposed to you"; "sched_startDateFormat" = "%d.%m. %H:%M"; -"action" = "Your Status"; +"action" = "Action"; "accept" = "Accept"; "decline" = "Decline"; "more participants" = "more participants"; diff --git a/SOGo/UI/Scheduler/UIxCalScheduleOverview.m b/SOGo/UI/Scheduler/UIxCalScheduleOverview.m index e0c3127f..2f490e8e 100644 --- a/SOGo/UI/Scheduler/UIxCalScheduleOverview.m +++ b/SOGo/UI/Scheduler/UIxCalScheduleOverview.m @@ -28,10 +28,11 @@ NSMutableArray *userApts; NSMutableArray *foreignApts; id item; - NSArray *partNames; - NSArray *partStates; + NSMutableArray *partNames; + NSMutableArray *partStates; NSString *userParticipationStatus; unsigned participantIndex; + unsigned userIndex; } - (NSCalendarDate *)startDate; @@ -77,16 +78,61 @@ /* accessors */ - (void)setItem:(id)_item { - NSString *ps; - + NSString *ps, *email; + NSArray *partmails; + unsigned idx; + ASSIGN(self->item, _item); - [self->partNames release]; + [self->partNames release]; [self->partStates release]; ps = [self->item valueForKey:@"participants"]; - self->partNames = [[ps componentsSeparatedByString:@"\n"] retain]; + self->partNames = [[ps componentsSeparatedByString:@"\n"] mutableCopy]; ps = [self->item valueForKey:@"partstates"]; - self->partStates = [[ps componentsSeparatedByString:@"\n"] retain]; + self->partStates = [[ps componentsSeparatedByString:@"\n"] mutableCopy]; + ps = [self->item valueForKey:@"partmails"]; + partmails = [ps componentsSeparatedByString:@"\n"]; + + /* reorder partNames/partStates */ + + /* ensure organizer is first entry */ + email = [self->item valueForKey:@"orgmail"]; + if ([email isNotNull]) { + idx = [partmails indexOfObject:email]; + if (idx != NSNotFound && idx != 0) { + id obj; + + obj = [self->partNames objectAtIndex:idx]; + [self->partNames insertObject:obj atIndex:0]; /* frontmost */ + [self->partNames removeObjectAtIndex:idx + 1]; + obj = [self->partStates objectAtIndex:idx]; + [self->partStates insertObject:obj atIndex:0]; /* frontmost */ + [self->partStates removeObjectAtIndex:idx + 1]; + } + } + /* user is either second, first or none at all */ + [self->userParticipationStatus release]; + email = [self emailForUser]; + idx = [partmails indexOfObject:email]; + if (idx != NSNotFound && idx != 0 && idx != 1) { + id obj; + + self->userIndex = 1; + obj = [self->partNames objectAtIndex:idx]; + [self->partNames insertObject:obj atIndex:self->userIndex]; /* second */ + [self->partNames removeObjectAtIndex:idx + 1]; + obj = [self->partStates objectAtIndex:idx]; + [self->partStates insertObject:obj atIndex:self->userIndex]; /* second */ + [self->partStates removeObjectAtIndex:idx + 1]; + } + else { + self->userIndex = idx; + } + if (self->userIndex != NSNotFound) + self->userParticipationStatus = + [[self->partStates objectAtIndex:self->userIndex] retain]; + else + self->userParticipationStatus = nil; } - (id)item { return self->item; @@ -99,6 +145,10 @@ return self->participantIndex; } +- (unsigned)userIndex { + return self->userIndex; +} + - (BOOL)isFirstParticipant { return self->participantIndex == 0 ? YES : NO; } @@ -155,20 +205,7 @@ } - (NSString *)userParticipationStatus { - if (!self->userParticipationStatus) { - NSString *pms; - NSArray *partmails; - unsigned idx; - - pms = [self->item valueForKey:@"partmails"]; - partmails = [pms componentsSeparatedByString:@"\n"]; - idx = [partmails indexOfObject:[self emailForUser]]; - if (idx == NSNotFound) - self->userParticipationStatus = @""; - self->userParticipationStatus = - [[self->partStates objectAtIndex:idx] retain]; - } - return userParticipationStatus; + return self->userParticipationStatus; } diff --git a/SOGo/UI/Scheduler/UIxCalScheduleOverview.wox b/SOGo/UI/Scheduler/UIxCalScheduleOverview.wox index e28ab2bd..50b7bdcd 100644 --- a/SOGo/UI/Scheduler/UIxCalScheduleOverview.wox +++ b/SOGo/UI/Scheduler/UIxCalScheduleOverview.wox @@ -179,35 +179,28 @@ partStat="participationStatus" /> - - + -

- -

- - - - - - - - - -
+ + + + + + + + diff --git a/SOGo/UI/Scheduler/Version b/SOGo/UI/Scheduler/Version index c10fc579..79c0acac 100644 --- a/SOGo/UI/Scheduler/Version +++ b/SOGo/UI/Scheduler/Version @@ -1,6 +1,6 @@ # $Id$ -SUBMINOR_VERSION:=108 +SUBMINOR_VERSION:=109 # v0.9.107 requires WOExtensions v4.5.21 # v0.9.105 requires NGObjWeb v4.5.102