merge of '7d7bd9ebaef743c2d234e3487f041c1d213b742e'

and 'c650aab7e4429bb8a2b8885d4161d881a1f9f2e7'

Monotone-Parent: 7d7bd9ebaef743c2d234e3487f041c1d213b742e
Monotone-Parent: c650aab7e4429bb8a2b8885d4161d881a1f9f2e7
Monotone-Revision: 00c44c219ebc45d53f4b71a1825bc55315546793

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-03-22T17:11:10
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2010-03-22 17:11:10 +00:00
commit abec0f84fb
7 changed files with 65 additions and 9 deletions

View File

@ -3,6 +3,14 @@
* Tests/Unit/SOGoTestRunner.m (-init): messages must be
initialized to a mutable array.
2010-03-19 Ludovic Marcotte <lmarcotte@inverse.ca>
* 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 <lmarcotte@inverse.ca>
* Replaced SOGoUIxUserCanChangePassword with

View File

@ -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];

View File

@ -66,6 +66,8 @@
- (NSArray *) freeBusyDefaultInterval;
- (int) davCalendarStartTimeLimit;
- (BOOL) iPhoneForceAllDayTransparency;
@end
#endif /* SOGODOMAINDEFAULTS_H */

View File

@ -260,6 +260,11 @@
return [self integerForKey: @"SOGoDAVCalendarStartTimeLimit"];
}
- (BOOL) iPhoneForceAllDayTransparency
{
return [self boolForKey: @"SOGoiPhoneForceAllDayTransparency"];
}
/* overriden methods */
- (NSString *) language
{

View File

@ -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 <wsourdeau@inverse.ca>
*

View File

@ -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.
*/

View File

@ -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;