mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-04 22:56:24 +00:00
Monotone-Parent: b0ba815a88a1243ad497187fab3660f3ebef9f27
Monotone-Revision: 7e4012769b937d5a36d8043bf2b2b1392a61a376 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-10-04T23:15:25 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -20,7 +20,9 @@
|
||||
*/
|
||||
|
||||
#import <NGCards/NSString+NGCards.h>
|
||||
#import <NGCards/NSCalendarDate+NGCards.h>
|
||||
|
||||
#import <SOGo/NSCalendarDate+SOGo.h>
|
||||
#import <SOGoUI/UIxComponent.h>
|
||||
|
||||
/* TODO: CLEAN UP */
|
||||
@@ -97,10 +99,6 @@
|
||||
#import <Appointments/SOGoAppointmentObject.h>
|
||||
#import "UIxComponent+Agenor.h"
|
||||
|
||||
@interface NSDate(UsedPrivates)
|
||||
- (NSString *)icalString; // TODO: this is in NGCards
|
||||
@end
|
||||
|
||||
@implementation UIxAppointmentEditor
|
||||
|
||||
+ (int)version {
|
||||
@@ -521,9 +519,9 @@
|
||||
s = [self iCalParticipantsAndResourcesStringFromQueryParameters];
|
||||
template = [NSString stringWithFormat:iCalStringTemplate,
|
||||
[[self clientObject] nameInContainer],
|
||||
[[NSCalendarDate date] icalString],
|
||||
[lStartDate icalString],
|
||||
[lEndDate icalString],
|
||||
[[NSCalendarDate date] iCalFormattedString],
|
||||
[lStartDate iCalFormattedString],
|
||||
[lEndDate iCalFormattedString],
|
||||
[self transparency],
|
||||
[self iCalOrganizerString],
|
||||
s];
|
||||
@@ -685,15 +683,6 @@
|
||||
/* save */
|
||||
|
||||
/* returned dates are in GMT */
|
||||
- (NSCalendarDate *)_dateFromString:(NSString *)_str {
|
||||
NSCalendarDate *date;
|
||||
|
||||
date = [NSCalendarDate dateWithString:_str
|
||||
calendarFormat:@"%Y-%m-%d %H:%M %Z"];
|
||||
[date setTimeZone:[[self clientObject] serverTimeZone]];
|
||||
return date;
|
||||
}
|
||||
|
||||
- (NSArray *)getICalPersonsFromFormValues:(NSArray *)_values
|
||||
treatAsResource:(BOOL)_isResource
|
||||
{
|
||||
@@ -764,16 +753,23 @@
|
||||
{
|
||||
NSString *s;
|
||||
iCalRecurrenceRule *rrule;
|
||||
NSTimeZone *uTZ;
|
||||
|
||||
if ((startDate = [[_appointment startDate] copy]) == nil)
|
||||
startDate = [[[NSCalendarDate date] hour:11 minute:0] copy];
|
||||
if ((endDate = [[_appointment endDate] copy]) == nil) {
|
||||
if ((startDate = [_appointment startDate]) == nil)
|
||||
startDate = [[NSCalendarDate date] hour:11 minute:0];
|
||||
if ((endDate = [_appointment endDate]) == nil) {
|
||||
endDate =
|
||||
[[startDate hour:[startDate hourOfDay] + 1 minute:0] copy];
|
||||
[startDate hour:[startDate hourOfDay] + 1 minute:0];
|
||||
}
|
||||
[startDate setTimeZone:[[self clientObject] userTimeZone]];
|
||||
[endDate setTimeZone:[[self clientObject] userTimeZone]];
|
||||
|
||||
|
||||
uTZ = [[self clientObject] userTimeZone];
|
||||
[startDate setTimeZone: uTZ];
|
||||
[endDate setTimeZone: uTZ];
|
||||
// startDate = [startDate adjustedDate];
|
||||
// endDate = [endDate adjustedDate];
|
||||
[startDate retain];
|
||||
[endDate retain];
|
||||
|
||||
title = [[_appointment summary] copy];
|
||||
location = [[_appointment location] copy];
|
||||
comment = [[_appointment comment] copy];
|
||||
@@ -854,11 +850,6 @@
|
||||
return appointment;
|
||||
}
|
||||
|
||||
- (void) loadValuesFromICalString: (NSString *) _iCalString
|
||||
{
|
||||
[self loadValuesFromAppointment: [self appointmentFromString: _iCalString]];
|
||||
}
|
||||
|
||||
/* contact editor compatibility */
|
||||
|
||||
- (void)setContentString:(NSString *)_s {
|
||||
@@ -868,11 +859,6 @@
|
||||
return [self iCalStringTemplate];
|
||||
}
|
||||
|
||||
- (void)loadValuesFromContentString:(NSString *)_s {
|
||||
[self loadValuesFromICalString:_s];
|
||||
}
|
||||
|
||||
|
||||
/* access */
|
||||
|
||||
- (BOOL) isMyApt
|
||||
@@ -982,7 +968,7 @@
|
||||
ical = [self contentStringTemplate];
|
||||
|
||||
[self setContentString:ical];
|
||||
[self loadValuesFromContentString:ical];
|
||||
[self loadValuesFromAppointment: [self appointmentFromString: ical]];
|
||||
|
||||
if (![self canEditApt]) {
|
||||
/* TODO: we need proper ACLs */
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#import <NGExtensions/NSCalendarDate+misc.h>
|
||||
|
||||
#import "NSCalendarDate+Scheduler.h"
|
||||
#import <SOGo/NSCalendarDate+SOGo.h>
|
||||
|
||||
#import "UIxCalDateSelector.h"
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#import <NGExtensions/NSCalendarDate+misc.h>
|
||||
|
||||
#import "NSCalendarDate+Scheduler.h"
|
||||
#import <SOGo/NSCalendarDate+SOGo.h>
|
||||
|
||||
#import "UIxCalInlineMonthOverview.h"
|
||||
|
||||
|
||||
@@ -63,7 +63,6 @@
|
||||
|
||||
- (id)holidayInfo;
|
||||
|
||||
|
||||
/* related to current day */
|
||||
- (void)setCurrentDay:(NSCalendarDate *)_day;
|
||||
- (NSCalendarDate *)currentDay;
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// $Id: UIxCalView.m 885 2005-07-21 16:41:34Z znek $
|
||||
|
||||
#include "UIxCalView.h"
|
||||
#include "common.h"
|
||||
//#include <OGoContentStore/OCSFolder.h>
|
||||
#include "SoObjects/Appointments/SOGoAppointmentFolder.h"
|
||||
#include <NGObjWeb/SoUser.h>
|
||||
#include <SOGoUI/SOGoAptFormatter.h>
|
||||
#include <NGExtensions/NGCalendarDateRange.h>
|
||||
#include <NGCards/NGCards.h>
|
||||
#include "UIxComponent+Agenor.h"
|
||||
#import "UIxCalView.h"
|
||||
#import "common.h"
|
||||
//#import <OGoContentStore/OCSFolder.h>
|
||||
#import "SoObjects/Appointments/SOGoAppointmentFolder.h"
|
||||
#import <NGObjWeb/SoUser.h>
|
||||
#import <SOGoUI/SOGoAptFormatter.h>
|
||||
#import <NGExtensions/NGCalendarDateRange.h>
|
||||
#import <NGCards/NGCards.h>
|
||||
#import "UIxComponent+Agenor.h"
|
||||
|
||||
@interface UIxCalView (PrivateAPI)
|
||||
- (NSString *) _userFolderURI;
|
||||
|
||||
@@ -20,7 +20,13 @@
|
||||
*/
|
||||
// $Id: UIxTimeDateControl.m 601 2005-02-22 15:45:03Z znek $
|
||||
|
||||
#import "common.h"
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSValue.h>
|
||||
|
||||
#import <NGObjWeb/SoObjects.h>
|
||||
|
||||
#import <SOGo/NSCalendarDate+SOGo.h>
|
||||
|
||||
#import "UIxTimeDateControl.h"
|
||||
|
||||
@@ -64,7 +70,11 @@
|
||||
- (void)setDate:(NSCalendarDate *)_date {
|
||||
if (!_date)
|
||||
_date = [NSCalendarDate date];
|
||||
[self _setDate:_date];
|
||||
[self _setDate: [_date driftedDate]];
|
||||
|
||||
NSLog (@"date Hour, before: %d; after: %d (tz: %@)",
|
||||
[_date hourOfDay], [[_date driftedDate] hourOfDay],
|
||||
[[_date timeZone] timeZoneName]);
|
||||
[self setHour:[NSNumber numberWithInt:[_date hourOfDay]]];
|
||||
[self setMinute:[NSNumber numberWithInt:[_date minuteOfHour]]];
|
||||
[self setYear:[NSNumber numberWithInt:[_date yearOfCommonEra]]];
|
||||
@@ -241,20 +251,16 @@
|
||||
[self setHour: [_rq formValueForKey: [self hourSelectId]]];
|
||||
[self setMinute: [_rq formValueForKey: [self minuteSelectId]]];
|
||||
|
||||
_month = [[self month] intValue];
|
||||
_day = [[self day] intValue];
|
||||
_hour = [[self hour] intValue];
|
||||
_month = [[self month] intValue];
|
||||
_day = [[self day] intValue];
|
||||
_hour = [[self hour] intValue];
|
||||
_minute = [[self minute] intValue];
|
||||
_second = [[self second] intValue];
|
||||
|
||||
d = [NSCalendarDate dateWithYear:_year
|
||||
month:_month
|
||||
day:_day
|
||||
hour:_hour
|
||||
minute:_minute
|
||||
second:_second
|
||||
d = [NSCalendarDate dateWithYear: _year month:_month day:_day
|
||||
hour:_hour minute:_minute second:_second
|
||||
timeZone: [[self clientObject] userTimeZone]];
|
||||
[self _setDate:d];
|
||||
[self _setDate: [d adjustedDate]];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<span class="checkBoxList"><var:string label:value="Start time" />
|
||||
<span class="content"><var:component className="UIxTimeDateControl"
|
||||
const:controlID="startTime"
|
||||
var:date="aptStartDate"
|
||||
date="aptStartDate"
|
||||
const:dayStartHour="8"
|
||||
const:dayEndHour="18"
|
||||
/></span></span>
|
||||
|
||||
Reference in New Issue
Block a user