diff --git a/ChangeLog b/ChangeLog index c69989105..0899f24ff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,14 @@ * Tests/Unit/SOGoTestRunner.m (-init): messages must be initialized to a mutable array. +2010-03-19 Ludovic Marcotte + + * Added the SOGoiPhoneForceAllDayTransparency + preference (and its associated code to handle + it in SOGoAppointmentObject.m) to force + transparency on all-day events coming from + the iPhone-OS based devices. + 2010-03-18 Ludovic Marcotte * Replaced SOGoUIxUserCanChangePassword with diff --git a/SoObjects/Appointments/SOGoAppointmentObject.m b/SoObjects/Appointments/SOGoAppointmentObject.m index 9628f25db..acac8c257 100644 --- a/SoObjects/Appointments/SOGoAppointmentObject.m +++ b/SoObjects/Appointments/SOGoAppointmentObject.m @@ -1497,6 +1497,33 @@ [rq setContent: newContent]; } +- (void) _adjustTransparencyInRequest: (WORequest *) rq +{ + iCalCalendar *calendar; + NSArray *allEvents; + iCalEvent *event; + int i; + BOOL modified; + + calendar = [iCalCalendar parseSingleFromSource: [rq contentAsString]]; + allEvents = [calendar events]; + modified = NO; + + for (i = 0; i < [allEvents count]; i++) + { + event = [allEvents objectAtIndex: i]; + + if ([event isAllDay] && [event isOpaque]) + { + [event setTransparency: @"TRANSPARENT"]; + modified = YES; + } + } + + if (modified) + [rq setContent: [[calendar versitString] dataUsingEncoding: [rq contentEncoding]]]; +} + - (void) _decomposeGroupsInRequest: (WORequest *) rq { iCalCalendar *calendar; @@ -1537,10 +1564,13 @@ // If we see "X-SOGo: NoGroupsDecomposition" in the HTTP headers, we // simply invoke super's PUTAction. // +// We also check if we must force transparency on all day events +// from iPhone clients. +// - (id) PUTAction: (WOContext *) _ctx { - WORequest *rq; NSArray *roles; + WORequest *rq; rq = [_ctx request]; @@ -1550,9 +1580,19 @@ [self _setupResponseCalendarInRequest: rq]; else { + SOGoUser *user; + + user = [SOGoUser userWithLogin: owner]; + if (![[rq headersForKey: @"X-SOGo"] containsObject: @"NoGroupsDecomposition"]) [self _decomposeGroupsInRequest: rq]; + + if ([[user domainDefaults] iPhoneForceAllDayTransparency] + && [rq isIPhone]) + { + [self _adjustTransparencyInRequest: rq]; + } } return [super PUTAction: _ctx]; diff --git a/SoObjects/SOGo/SOGoDomainDefaults.h b/SoObjects/SOGo/SOGoDomainDefaults.h index 78de03b78..76ed304fb 100644 --- a/SoObjects/SOGo/SOGoDomainDefaults.h +++ b/SoObjects/SOGo/SOGoDomainDefaults.h @@ -66,6 +66,8 @@ - (NSArray *) freeBusyDefaultInterval; - (int) davCalendarStartTimeLimit; +- (BOOL) iPhoneForceAllDayTransparency; + @end #endif /* SOGODOMAINDEFAULTS_H */ diff --git a/SoObjects/SOGo/SOGoDomainDefaults.m b/SoObjects/SOGo/SOGoDomainDefaults.m index fc77834d0..2d5f17f6c 100644 --- a/SoObjects/SOGo/SOGoDomainDefaults.m +++ b/SoObjects/SOGo/SOGoDomainDefaults.m @@ -260,6 +260,11 @@ return [self integerForKey: @"SOGoDAVCalendarStartTimeLimit"]; } +- (BOOL) iPhoneForceAllDayTransparency +{ + return [self boolForKey: @"SOGoiPhoneForceAllDayTransparency"]; +} + /* overriden methods */ - (NSString *) language { diff --git a/SoObjects/SOGo/WORequest+SOGo.m b/SoObjects/SOGo/WORequest+SOGo.m index 7d239f521..824cb8bc5 100644 --- a/SoObjects/SOGo/WORequest+SOGo.m +++ b/SoObjects/SOGo/WORequest+SOGo.m @@ -1,6 +1,6 @@ /* WORequest+SOGo.m - this file is part of SOGo * - * Copyright (C) 2007 Inverse inc. + * Copyright (C) 2007-2010 Inverse inc. * * Author: Wolfgang Sourdeau * diff --git a/UI/Contacts/UIxContactsListView.m b/UI/Contacts/UIxContactsListView.m index 2a5a45ba2..dd521162b 100644 --- a/UI/Contacts/UIxContactsListView.m +++ b/UI/Contacts/UIxContactsListView.m @@ -1,20 +1,21 @@ /* + Copyright (C) 2006-2010 Inverse inc. Copyright (C) 2004-2005 SKYRIX Software AG This file is part of OpenGroupware.org. - OGo is free software; you can redistribute it and/or modify it under + SOGo is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - OGo is distributed in the hope that it will be useful, but WITHOUT ANY + SOGo is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public - License along with OGo; see the file COPYING. If not, write to the + License along with SOGo; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ diff --git a/UI/WebServerResources/ContactsUI.css b/UI/WebServerResources/ContactsUI.css index e0003bf2d..86084f388 100644 --- a/UI/WebServerResources/ContactsUI.css +++ b/UI/WebServerResources/ContactsUI.css @@ -304,20 +304,20 @@ BODY.popup DIV#rightPanel { top: 4em; } BODY.popup DIV#dragHandle -{ top: 6em; } +{ top: 7em; } BODY.popup DIV#contactsListContent -{ height: 8em; +{ height: 7em; top: 34px; } BODY.popup DIV#contactFoldersList { top: 50px; } BODY.popup DIV#rightDragHandle -{ top: 10em; } +{ top: 10.2em; } BODY.popup DIV#contactView -{ top: 10em; } +{ top: 10.2em; } BODY.popup DIV#filterPanel { position: relative;