See ChangeLog
Monotone-Parent: d83f2319ca5fd2cef90d70715abf703c4b070397 Monotone-Revision: 4810e3862e96fcf14dc360590c88655b590f0bfb Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2009-01-07T21:01:16 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
be45d91c24
commit
440b119845
|
@ -3,6 +3,8 @@
|
||||||
* UI/Scheduler/UIxComponentEditor.m ([UIxComponentEditor
|
* UI/Scheduler/UIxComponentEditor.m ([UIxComponentEditor
|
||||||
-_handleCustomRRule:]): set the proper timezone for the end date.
|
-_handleCustomRRule:]): set the proper timezone for the end date.
|
||||||
([UIxComponentEditor -_loadRRules]): idem.
|
([UIxComponentEditor -_loadRRules]): idem.
|
||||||
|
([UIxComponentEditor -init): instanciates an UIxDatePicker object
|
||||||
|
to retrieve the proper date format.
|
||||||
|
|
||||||
* UI/Scheduler/UIxAppointmentEditor.m ([UIxAppointmentEditor
|
* UI/Scheduler/UIxAppointmentEditor.m ([UIxAppointmentEditor
|
||||||
-saveAction]): for recurrent events with an end date, the method
|
-saveAction]): for recurrent events with an end date, the method
|
||||||
|
|
|
@ -60,6 +60,7 @@
|
||||||
NSString *cycleEnd;
|
NSString *cycleEnd;
|
||||||
iCalPerson *organizer;
|
iCalPerson *organizer;
|
||||||
NSString *componentOwner;
|
NSString *componentOwner;
|
||||||
|
NSString *dateFormat;
|
||||||
|
|
||||||
NSString *attendeesNames;
|
NSString *attendeesNames;
|
||||||
NSString *attendeesUIDs;
|
NSString *attendeesUIDs;
|
||||||
|
|
|
@ -57,6 +57,7 @@
|
||||||
#import <SoObjects/SOGo/SOGoPermissions.h>
|
#import <SoObjects/SOGo/SOGoPermissions.h>
|
||||||
|
|
||||||
#import "UIxComponentEditor.h"
|
#import "UIxComponentEditor.h"
|
||||||
|
#import "UIxDatePicker.h"
|
||||||
|
|
||||||
#define iREPEAT(X) \
|
#define iREPEAT(X) \
|
||||||
- (NSString *) repeat##X; \
|
- (NSString *) repeat##X; \
|
||||||
|
@ -66,6 +67,7 @@
|
||||||
- (NSString *) range##X; \
|
- (NSString *) range##X; \
|
||||||
- (void) setRange##X: (NSString *) theValue
|
- (void) setRange##X: (NSString *) theValue
|
||||||
|
|
||||||
|
|
||||||
@interface UIxComponentEditor (Private)
|
@interface UIxComponentEditor (Private)
|
||||||
|
|
||||||
iREPEAT(1);
|
iREPEAT(1);
|
||||||
|
@ -94,6 +96,13 @@ iRANGE(2);
|
||||||
{
|
{
|
||||||
if ((self = [super init]))
|
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;
|
component = nil;
|
||||||
[self setPrivacy: @"PUBLIC"];
|
[self setPrivacy: @"PUBLIC"];
|
||||||
[self setIsCycleEndNever];
|
[self setIsCycleEndNever];
|
||||||
|
@ -117,6 +126,8 @@ iRANGE(2);
|
||||||
repeat7 = nil;
|
repeat7 = nil;
|
||||||
range1 = nil;
|
range1 = nil;
|
||||||
range2 = nil;
|
range2 = nil;
|
||||||
|
|
||||||
|
[datePicker release];
|
||||||
}
|
}
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
|
@ -342,11 +353,11 @@ iRANGE(2);
|
||||||
else if ([rule untilDate])
|
else if ([rule untilDate])
|
||||||
{
|
{
|
||||||
NSCalendarDate *date;
|
NSCalendarDate *date;
|
||||||
|
|
||||||
date = [[rule untilDate] copy];
|
date = [[rule untilDate] copy];
|
||||||
[date setTimeZone: [[context activeUser] timeZone]];
|
[date setTimeZone: [[context activeUser] timeZone]];
|
||||||
[self setRange1: @"2"];
|
[self setRange1: @"2"];
|
||||||
[self setRange2: [date descriptionWithCalendarFormat: @"%Y-%m-%d"]];
|
[self setRange2: [date descriptionWithCalendarFormat: dateFormat]];
|
||||||
[date release];
|
[date release];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1395,11 +1406,11 @@ RANGE(2);
|
||||||
{
|
{
|
||||||
NSCalendarDate *date;
|
NSCalendarDate *date;
|
||||||
SOGoUser *user;
|
SOGoUser *user;
|
||||||
|
|
||||||
user = [context activeUser];
|
user = [context activeUser];
|
||||||
date = [NSCalendarDate dateWithString: [self range2]
|
date = [NSCalendarDate dateWithString: [self range2]
|
||||||
calendarFormat: @"%Y-%m-%d"
|
calendarFormat: dateFormat
|
||||||
locale: [[WOApplication application] localeForLanguageNamed: [user language]]];
|
locale: [[WOApplication application] localeForLanguageNamed: [user language]]];
|
||||||
[theRule setUntilDate: date];
|
[theRule setUntilDate: date];
|
||||||
}
|
}
|
||||||
// No end date.
|
// No end date.
|
||||||
|
|
46
UI/Scheduler/UIxDatePicker.h
Normal file
46
UI/Scheduler/UIxDatePicker.h
Normal file
|
@ -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/NSValue.h>
|
||||||
#import <Foundation/NSCalendarDate.h>
|
#import <Foundation/NSCalendarDate.h>
|
||||||
|
|
||||||
#import <NGObjWeb/WOComponent.h>
|
|
||||||
#import <NGObjWeb/WOContext.h>
|
#import <NGObjWeb/WOContext.h>
|
||||||
#import <NGObjWeb/WORequest.h>
|
#import <NGObjWeb/WORequest.h>
|
||||||
#import <NGExtensions/NSObject+Logs.h>
|
#import <NGExtensions/NSObject+Logs.h>
|
||||||
|
|
||||||
@class NSString;
|
#import "UIxDatePicker.h"
|
||||||
|
|
||||||
@interface UIxDatePicker : WOComponent
|
|
||||||
{
|
|
||||||
NSString *dateID;
|
|
||||||
id day;
|
|
||||||
id month;
|
|
||||||
id year;
|
|
||||||
NSString *label;
|
|
||||||
BOOL isDisabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (NSString *) dateID;
|
|
||||||
- (NSString *) dateFormat;
|
|
||||||
- (NSString *) jsDateFormat;
|
|
||||||
- (BOOL) useISOFormats;
|
|
||||||
@end
|
|
||||||
|
|
||||||
@implementation UIxDatePicker
|
@implementation UIxDatePicker
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue