See ChangeLog
Monotone-Parent: d83f2319ca5fd2cef90d70715abf703c4b070397 Monotone-Revision: 4810e3862e96fcf14dc360590c88655b590f0bfb Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2009-01-07T21:01:16 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
be45d91c24
commit
440b119845
|
@ -3,6 +3,8 @@
|
|||
* UI/Scheduler/UIxComponentEditor.m ([UIxComponentEditor
|
||||
-_handleCustomRRule:]): set the proper timezone for the end date.
|
||||
([UIxComponentEditor -_loadRRules]): idem.
|
||||
([UIxComponentEditor -init): instanciates an UIxDatePicker object
|
||||
to retrieve the proper date format.
|
||||
|
||||
* UI/Scheduler/UIxAppointmentEditor.m ([UIxAppointmentEditor
|
||||
-saveAction]): for recurrent events with an end date, the method
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
NSString *cycleEnd;
|
||||
iCalPerson *organizer;
|
||||
NSString *componentOwner;
|
||||
NSString *dateFormat;
|
||||
|
||||
NSString *attendeesNames;
|
||||
NSString *attendeesUIDs;
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
#import <SoObjects/SOGo/SOGoPermissions.h>
|
||||
|
||||
#import "UIxComponentEditor.h"
|
||||
#import "UIxDatePicker.h"
|
||||
|
||||
#define iREPEAT(X) \
|
||||
- (NSString *) repeat##X; \
|
||||
|
@ -66,6 +67,7 @@
|
|||
- (NSString *) range##X; \
|
||||
- (void) setRange##X: (NSString *) theValue
|
||||
|
||||
|
||||
@interface UIxComponentEditor (Private)
|
||||
|
||||
iREPEAT(1);
|
||||
|
@ -94,6 +96,13 @@ iRANGE(2);
|
|||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
UIxDatePicker *datePicker;
|
||||
|
||||
// We must instanciate a UIxDatePicker object to retrieve
|
||||
// the proper date format to use.
|
||||
datePicker = [[UIxDatePicker alloc] initWithContext: context];
|
||||
dateFormat = [datePicker dateFormat];
|
||||
|
||||
component = nil;
|
||||
[self setPrivacy: @"PUBLIC"];
|
||||
[self setIsCycleEndNever];
|
||||
|
@ -117,6 +126,8 @@ iRANGE(2);
|
|||
repeat7 = nil;
|
||||
range1 = nil;
|
||||
range2 = nil;
|
||||
|
||||
[datePicker release];
|
||||
}
|
||||
|
||||
return self;
|
||||
|
@ -342,11 +353,11 @@ iRANGE(2);
|
|||
else if ([rule untilDate])
|
||||
{
|
||||
NSCalendarDate *date;
|
||||
|
||||
|
||||
date = [[rule untilDate] copy];
|
||||
[date setTimeZone: [[context activeUser] timeZone]];
|
||||
[self setRange1: @"2"];
|
||||
[self setRange2: [date descriptionWithCalendarFormat: @"%Y-%m-%d"]];
|
||||
[self setRange2: [date descriptionWithCalendarFormat: dateFormat]];
|
||||
[date release];
|
||||
}
|
||||
else
|
||||
|
@ -1395,11 +1406,11 @@ RANGE(2);
|
|||
{
|
||||
NSCalendarDate *date;
|
||||
SOGoUser *user;
|
||||
|
||||
|
||||
user = [context activeUser];
|
||||
date = [NSCalendarDate dateWithString: [self range2]
|
||||
calendarFormat: @"%Y-%m-%d"
|
||||
locale: [[WOApplication application] localeForLanguageNamed: [user language]]];
|
||||
calendarFormat: dateFormat
|
||||
locale: [[WOApplication application] localeForLanguageNamed: [user language]]];
|
||||
[theRule setUntilDate: date];
|
||||
}
|
||||
// No end date.
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
/* UIxDatePicker.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2009 Inverse inc.
|
||||
*
|
||||
* Author: Francis Lachapelle <flachapelle@inverse.ca>
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This file 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef UIXDATEPICKER_H
|
||||
#define UIXDATEPICKER_H
|
||||
|
||||
#import <NGObjWeb/WOComponent.h>
|
||||
|
||||
@class NSString;
|
||||
|
||||
@interface UIxDatePicker : WOComponent
|
||||
{
|
||||
NSString *dateID;
|
||||
id day;
|
||||
id month;
|
||||
id year;
|
||||
NSString *label;
|
||||
BOOL isDisabled;
|
||||
}
|
||||
|
||||
- (NSString *) dateID;
|
||||
- (NSString *) dateFormat;
|
||||
- (NSString *) jsDateFormat;
|
||||
- (BOOL) useISOFormats;
|
||||
@end
|
||||
|
||||
#endif /* UIXDATEPICKER_H */
|
|
@ -22,28 +22,11 @@
|
|||
#import <Foundation/NSValue.h>
|
||||
#import <Foundation/NSCalendarDate.h>
|
||||
|
||||
#import <NGObjWeb/WOComponent.h>
|
||||
#import <NGObjWeb/WOContext.h>
|
||||
#import <NGObjWeb/WORequest.h>
|
||||
#import <NGExtensions/NSObject+Logs.h>
|
||||
|
||||
@class NSString;
|
||||
|
||||
@interface UIxDatePicker : WOComponent
|
||||
{
|
||||
NSString *dateID;
|
||||
id day;
|
||||
id month;
|
||||
id year;
|
||||
NSString *label;
|
||||
BOOL isDisabled;
|
||||
}
|
||||
|
||||
- (NSString *) dateID;
|
||||
- (NSString *) dateFormat;
|
||||
- (NSString *) jsDateFormat;
|
||||
- (BOOL) useISOFormats;
|
||||
@end
|
||||
#import "UIxDatePicker.h"
|
||||
|
||||
@implementation UIxDatePicker
|
||||
|
||||
|
|
Loading…
Reference in New Issue