Monotone-Parent: 843a82037dc71e1dd55379b4245e267fe0b6e025
Monotone-Revision: 7ccd1ab7beef95f5bf3ce66708988dbf11332387 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-06-07T18:12:20 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
271ac512e3
commit
1b3f33a605
|
@ -1,3 +1,10 @@
|
|||
2007-06-07 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/Scheduler/UIxAppointmentEditor.m ([UIxAppointmentEditor
|
||||
-takeValuesFromRequest:_rqinContext:_ctx]): take the new ivar
|
||||
"isAllDay" into account and compute the amount of days to pass to
|
||||
the iCalEvent.
|
||||
|
||||
2007-06-06 Francis Lachapelle <flachapelle@inverse.ca>
|
||||
|
||||
* SoObjects/SOGo/NSNumber+Utilities.m: initial import.
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
@interface UIxAppointmentEditor : UIxComponent
|
||||
{
|
||||
iCalEvent *event;
|
||||
BOOL isAllDay;
|
||||
NSCalendarDate *aptStartDate;
|
||||
NSCalendarDate *aptEndDate;
|
||||
NSString *item;
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#import <NGObjWeb/SoObject.h>
|
||||
#import <NGObjWeb/WORequest.h>
|
||||
#import <NGObjWeb/NSException+HTTP.h>
|
||||
|
@ -46,6 +48,7 @@
|
|||
aptEndDate = nil;
|
||||
item = nil;
|
||||
event = nil;
|
||||
isAllDay = NO;
|
||||
}
|
||||
|
||||
return self;
|
||||
|
@ -66,11 +69,12 @@
|
|||
/* icalendar values */
|
||||
- (BOOL) isAllDay
|
||||
{
|
||||
return NO;
|
||||
return isAllDay;
|
||||
}
|
||||
|
||||
- (void) setIsAllDay: (BOOL) newIsAllDay
|
||||
{
|
||||
isAllDay = newIsAllDay;
|
||||
}
|
||||
|
||||
- (void) setAptStartDate: (NSCalendarDate *) newAptStartDate
|
||||
|
@ -263,6 +267,7 @@
|
|||
ASSIGN (aptStartDate, startDate);
|
||||
ASSIGN (aptEndDate, endDate);
|
||||
|
||||
|
||||
/* here comes the code for initializing repeat, reminder and isAllDay... */
|
||||
|
||||
return self;
|
||||
|
@ -313,14 +318,25 @@
|
|||
inContext: (WOContext *) _ctx
|
||||
{
|
||||
SOGoAppointmentObject *clientObject;
|
||||
int nbrDays;
|
||||
|
||||
clientObject = [self clientObject];
|
||||
event = (iCalEvent *) [clientObject component: YES];
|
||||
|
||||
[super takeValuesFromRequest: _rq inContext: _ctx];
|
||||
|
||||
[event setStartDate: aptStartDate];
|
||||
[event setEndDate: aptEndDate];
|
||||
if (isAllDay)
|
||||
{
|
||||
nbrDays = ((float) abs ([aptEndDate timeIntervalSinceDate: aptStartDate])
|
||||
/ 86400) + 1;
|
||||
[event setAllDayWithStartDate: aptStartDate
|
||||
duration: nbrDays];
|
||||
}
|
||||
else
|
||||
{
|
||||
[event setStartDate: aptStartDate];
|
||||
[event setEndDate: aptEndDate];
|
||||
}
|
||||
if ([clientObject isNew])
|
||||
[event setTransparency: @"OPAQUE"];
|
||||
}
|
||||
|
|
|
@ -10,14 +10,9 @@
|
|||
className="UIxComponentEditor"
|
||||
var:component="event"
|
||||
var:saveURL="saveURL">
|
||||
<!-- <label><span id="allDay" class="content"><input class="checkBox"
|
||||
type="checkbox" var:selection="isAllDay"
|
||||
var:checked="isAllDay"
|
||||
/><var:string label:value="All day Event"
|
||||
/></span></label> -->
|
||||
<label><span id="allDay" class="content"><input class="checkBox"
|
||||
type="checkbox" var:selection="isAllDay"
|
||||
const:disabled="1"
|
||||
var:checked="isAllDay"
|
||||
/><var:string label:value="All day Event"
|
||||
/></span></label>
|
||||
<span class="checkBoxList"><var:string label:value="Start:" />
|
||||
|
|
Loading…
Reference in New Issue