+2007-06-12 Wolfgang Sourdeau <wsourdeau@inverse.ca>
+
+ * SoObjects/Mailer/SOGoMailObject.m ([SOGoMailObject
+ -aclsForUser:uid]): implemented method by forwarding the request
+ to the container. This fixes a bug where users could no longer
+ read emails from shared folders.
+
+ * SoObjects/Appointments/SOGoCalendarComponent.m
+ ([SOGoCalendarComponent -init]): "isNew" is no longer defined
+ here, but rather in its parent class.
+
+ * UI/SOGoUI/SOGoDateFormatter.m ([SOGoDateFormatter
+ -stringForSecondsSinceThe70s:seconds]): new utility method.
+
+ * UI/Scheduler/UIxCalListingActions.m ([UIxCalListingActions
+ -eventsListAction]): no longer reduce the end day of one day for
+ all day events since everything has been fixed in
+ OCSiCalFieldExtractor.
+
+ * OGoContentStore/OCSiCalFieldExtractor.m ([OCSiCalFieldExtractor
+ -extractQuickFieldsFromEvent:_event]): reduce the seconds/70 of
+ the end date of all day events of 1 so that they stay on their
+ real last day.
+
+2007-06-11 Wolfgang Sourdeau <wsourdeau@inverse.ca>
+
+ * UI/Scheduler/UIxCalMonthView.m: no longer retrieve appointments.
+
+ * UI/Scheduler/UIxCalView.m ([-fetchCoreAppointmentsInfos]):
+ removed method.
+ ([-fetchCoreTasksInfos]): removed method.
+
+ * UI/Scheduler/UIxCalListingActions.m ([UIxCalListingActions
+ -init]): initialize an instance of SOGoDateFormatter.
+ ([UIxCalListingActions -eventsListAction]): the display start and
+ end dates are added to the listing for each event.
+
+ * UI/Scheduler/UIxCalDayTable.m: no longer retrieve appointments.
+
+ * UI/Scheduler/UIxAppointmentEditor.m ([UIxAppointmentEditor
+ -isAllDay]): returns YES if the "hm" url parameter is set to
+ "allday".
+ ([UIxAppointmentEditor -defaultAction]): if isAllDay, the enddate
+ is displayed one day earlier.
+
+2007-06-07 Wolfgang Sourdeau <wsourdeau@inverse.ca>
+
+ * UI/Scheduler/UIxCalListingActions.m ([UIxCalListingActions
+ -_setupContext]): take the range of dates specified by the popup
+ into account.
+
+ * UI/Scheduler/UIxCalListingActions.[hm]: new subclass of
+ WODirectAction that returns WOResponse objects with the events or
+ todos satisfying the parameters passed in the url.
+
+ * 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.
+ * SoObjects/SOGo/NSNull+Utilities.m: initial import.
+ * UI/Scheduler/UIxCalTasksListView.m ([WOResponse -tasksListAction]):
+ new method that returns a json-formatted array of the visible tasks
+ for the current user.
+
2007-06-05 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/Appointments/SOGoAppointmentObject.m: the owner of the
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.
*/
@implementation OCSiCalFieldExtractor
-static OCSiCalFieldExtractor *extractor = nil;
-static NSCalendarDate *distantFuture = nil;
-static NSNumber *distantFutureNumber = nil;
+static NSCalendarDate *distantFuture = nil;
+static NSNumber *distantFutureNumber = nil;
+ (void) initialize
{
- static BOOL didInit = NO;
-
- if (didInit) return;
- didInit = YES;
-
- distantFuture = [[NSCalendarDate distantFuture] retain];
- /* INT_MAX due to Postgres constraint */
- distantFutureNumber = [[NSNumber numberWithUnsignedInt:INT_MAX] retain];
+ if (!distantFuture)
+ {
+ distantFuture = [[NSCalendarDate distantFuture] retain];
+ /* INT_MAX due to Postgres constraint */
+ distantFutureNumber = [[NSNumber numberWithUnsignedInt: INT_MAX] retain];
+ }
}
+ (id) sharedICalFieldExtractor
{
- if (extractor == nil)
+ static OCSiCalFieldExtractor *extractor = nil;
+
+ if (!extractor)
extractor = [self new];
return extractor;
- (NSNumber *) numberForDate: (NSCalendarDate *) _date
{
- if (_date == distantFuture)
- return distantFutureNumber;
-
- return [NSNumber numberWithUnsignedInt:[_date timeIntervalSince1970]];
+ return ((_date == distantFuture)
+ ? distantFutureNumber
+ : [NSNumber numberWithUnsignedInt: [_date timeIntervalSince1970]]);
}
- (NSMutableDictionary *) extractQuickFieldsFromEvent: (iCalEvent *) _event
{
NSMutableDictionary *row;
- NSCalendarDate *startDate, *endDate;
- NSArray *attendees;
- NSString *uid, *title, *location, *status;
- NSNumber *sequence;
- id organizer;
- id participants, partmails;
- NSMutableString *partstates;
- unsigned i, count;
+ NSCalendarDate *startDate, *endDate;
+ NSArray *attendees;
+ NSString *uid, *title, *location, *status;
+ NSNumber *sequence, *dateNumber;
+ id organizer;
+ id participants, partmails;
+ NSMutableString *partstates;
+ unsigned int i, count;
+ BOOL isAllDay;
iCalAccessClass accessClass;
if (_event == nil)
return nil;
/* extract values */
-
- startDate = [_event startDate];
- endDate = [_event endDate];
- uid = [_event uid];
- title = [_event summary];
- location = [_event location];
- sequence = [_event sequence];
- accessClass = [_event symbolicAccessClass];
- status = [[_event status] uppercaseString];
-
- attendees = [_event attendees];
- partmails = [attendees valueForKey:@"rfc822Email"];
- partmails = [partmails componentsJoinedByString:@"\n"];
- participants = [attendees valueForKey:@"cn"];
- participants = [participants componentsJoinedByString:@"\n"];
+
+ startDate = [_event startDate];
+ endDate = [_event endDate];
+ uid = [_event uid];
+ title = [_event summary];
+ location = [_event location];
+ sequence = [_event sequence];
+ accessClass = [_event symbolicAccessClass];
+ isAllDay = [_event isAllDay];
+ status = [[_event status] uppercaseString];
+
+ attendees = [_event attendees];
+ partmails = [attendees valueForKey: @"rfc822Email"];
+ partmails = [partmails componentsJoinedByString: @"\n"];
+ participants = [attendees valueForKey: @"cn"];
+ participants = [participants componentsJoinedByString: @"\n"];
/* build row */
row = [NSMutableDictionary dictionaryWithCapacity:8];
[row setObject: @"vevent" forKey: @"component"];
-
+
if ([uid isNotNull])
- [row setObject:uid forKey:@"uid"];
+ [row setObject:uid forKey: @"uid"];
else
- [self logWithFormat:@"WARNING: could not extract a uid from event!"];
+ [self logWithFormat: @"WARNING: could not extract a uid from event!"];
+
- [row setObject:[NSNumber numberWithBool: [_event isAllDay]]
+ [row setObject: [NSNumber numberWithBool: isAllDay]
forKey: @"isallday"];
- [row setObject:[NSNumber numberWithBool: [_event isRecurrent]]
+ [row setObject: [NSNumber numberWithBool: [_event isRecurrent]]
forKey: @"iscycle"];
- [row setObject:[NSNumber numberWithBool: [_event isOpaque]]
+ [row setObject: [NSNumber numberWithBool: [_event isOpaque]]
forKey: @"isopaque"];
- [row setObject:[NSNumber numberWithInt: [_event priorityNumber]]
+ [row setObject: [NSNumber numberWithInt: [_event priorityNumber]]
forKey: @"priority"];
- if ([title isNotNull]) [row setObject: title forKey:@"title"];
- if ([location isNotNull]) [row setObject: location forKey:@"location"];
- if ([sequence isNotNull]) [row setObject: sequence forKey:@"sequence"];
+ if ([title isNotNull]) [row setObject: title forKey: @"title"];
+ if ([location isNotNull]) [row setObject: location forKey: @"location"];
+ if ([sequence isNotNull]) [row setObject: sequence forKey: @"sequence"];
if ([startDate isNotNull])
- [row setObject: [self numberForDate: startDate] forKey:@"startdate"];
+ [row setObject: [self numberForDate: startDate]
+ forKey: @"startdate"];
if ([endDate isNotNull])
- [row setObject: [self numberForDate: endDate] forKey:@"enddate"];
+ {
+ if (endDate == distantFuture)
+ dateNumber = distantFutureNumber;
+ else
+ {
+ if (isAllDay)
+ i = 1;
+ else
+ i = 0;
+ dateNumber
+ = [NSNumber numberWithUnsignedInt:
+ [endDate timeIntervalSince1970] - i];
+ }
+ [row setObject: dateNumber forKey: @"enddate"];
+ }
+
if ([_event isRecurrent]) {
NSCalendarDate *date;
-
+
date = [_event lastPossibleRecurrenceStartDate];
if (!date) {
/* this could also be *nil*, but in the end it makes the fetchspecs
- more complex - thus we set it to a "reasonable" distant future */
+ more complex - thus we set it to a "reasonable" distant future */
date = distantFuture;
}
- [row setObject:[self numberForDate:date] forKey:@"cycleenddate"];
- [row setObject:[_event cycleInfo] forKey:@"cycleinfo"];
+ [row setObject:[self numberForDate:date] forKey: @"cycleenddate"];
+ [row setObject:[_event cycleInfo] forKey: @"cycleinfo"];
}
if ([participants length] > 0)
- [row setObject: participants forKey:@"participants"];
+ [row setObject: participants forKey: @"participants"];
if ([partmails length] > 0)
- [row setObject: partmails forKey:@"partmails"];
+ [row setObject: partmails forKey: @"partmails"];
if ([status isNotNull]) {
int code = 1;
-
- if ([status isEqualToString:@"TENTATIVE"])
+
+ if ([status isEqualToString: @"TENTATIVE"])
code = 2;
- else if ([status isEqualToString:@"CANCELLED"])
+ else if ([status isEqualToString: @"CANCELLED"])
code = 0;
- [row setObject:[NSNumber numberWithInt:code] forKey:@"status"];
+ [row setObject:[NSNumber numberWithInt:code] forKey: @"status"];
}
else {
/* confirmed by default */
organizer = [_event organizer];
if (organizer) {
NSString *email;
-
- email = [organizer valueForKey:@"rfc822Email"];
+
+ email = [organizer valueForKey: @"rfc822Email"];
if (email)
- [row setObject:email forKey:@"orgmail"];
+ [row setObject:email forKey: @"orgmail"];
}
-
+
/* construct partstates */
- count = [attendees count];
- partstates = [[NSMutableString alloc] initWithCapacity:count * 2];
+ count = [attendees count];
+ partstates = [[NSMutableString alloc] initWithCapacity:count * 2];
for ( i = 0; i < count; i++) {
- iCalPerson *p;
+ iCalPerson *p;
iCalPersonPartStat stat;
-
- p = [attendees objectAtIndex:i];
+
+ p = [attendees objectAtIndex:i];
stat = [p participationStatus];
if(i != 0)
- [partstates appendString:@"\n"];
- [partstates appendFormat:@"%d", stat];
+ [partstates appendString: @"\n"];
+ [partstates appendFormat: @"%d", stat];
}
- [row setObject:partstates forKey:@"partstates"];
+ [row setObject:partstates forKey: @"partstates"];
[partstates release];
return row;
}
- (NSMutableDictionary *) extractQuickFieldsFromTodo: (iCalToDo *) _task
{
NSMutableDictionary *row;
- NSCalendarDate *startDate, *dueDate;
- NSArray *attendees;
- NSString *uid, *title, *location, *status;
- NSNumber *sequence;
- id organizer, date;
- id participants, partmails;
- NSMutableString *partstates;
- unsigned i, count, code;
+ NSCalendarDate *startDate, *dueDate;
+ NSArray *attendees;
+ NSString *uid, *title, *location, *status;
+ NSNumber *sequence;
+ id organizer, date;
+ id participants, partmails;
+ NSMutableString *partstates;
+ unsigned i, count, code;
iCalAccessClass accessClass;
if (_task == nil)
return nil;
/* extract values */
-
- startDate = [_task startDate];
- dueDate = [_task due];
- uid = [_task uid];
- title = [_task summary];
- location = [_task location];
- sequence = [_task sequence];
- accessClass = [_task symbolicAccessClass];
- status = [[_task status] uppercaseString];
-
- attendees = [_task attendees];
- partmails = [attendees valueForKey:@"rfc822Email"];
- partmails = [partmails componentsJoinedByString:@"\n"];
- participants = [attendees valueForKey:@"cn"];
- participants = [participants componentsJoinedByString:@"\n"];
+
+ startDate = [_task startDate];
+ dueDate = [_task due];
+ uid = [_task uid];
+ title = [_task summary];
+ location = [_task location];
+ sequence = [_task sequence];
+ accessClass = [_task symbolicAccessClass];
+ status = [[_task status] uppercaseString];
+
+ attendees = [_task attendees];
+ partmails = [attendees valueForKey: @"rfc822Email"];
+ partmails = [partmails componentsJoinedByString: @"\n"];
+ participants = [attendees valueForKey: @"cn"];
+ participants = [participants componentsJoinedByString: @"\n"];
/* build row */
[row setObject: @"vtodo" forKey: @"component"];
if ([uid isNotNull])
- [row setObject:uid forKey:@"uid"];
+ [row setObject:uid forKey: @"uid"];
else
- [self logWithFormat:@"WARNING: could not extract a uid from event!"];
+ [self logWithFormat: @"WARNING: could not extract a uid from event!"];
[row setObject:[NSNumber numberWithBool:[_task isRecurrent]]
- forKey:@"iscycle"];
+ forKey: @"iscycle"];
[row setObject:[NSNumber numberWithInt:[_task priorityNumber]]
- forKey:@"priority"];
+ forKey: @"priority"];
- if ([title isNotNull]) [row setObject: title forKey:@"title"];
- if ([location isNotNull]) [row setObject: location forKey:@"location"];
- if ([sequence isNotNull]) [row setObject: sequence forKey:@"sequence"];
-
+ if ([title isNotNull]) [row setObject: title forKey: @"title"];
+ if ([location isNotNull]) [row setObject: location forKey: @"location"];
+ if ([sequence isNotNull]) [row setObject: sequence forKey: @"sequence"];
+
if ([startDate isNotNull])
date = [self numberForDate: startDate];
else
[row setObject: date forKey: @"enddate"];
if ([participants length] > 0)
- [row setObject:participants forKey:@"participants"];
+ [row setObject:participants forKey: @"participants"];
if ([partmails length] > 0)
- [row setObject:partmails forKey:@"partmails"];
+ [row setObject:partmails forKey: @"partmails"];
if ([status isNotNull]) {
code = 0; /* NEEDS-ACTION */
- if ([status isEqualToString:@"COMPLETED"])
+ if ([status isEqualToString: @"COMPLETED"])
code = 1;
- else if ([status isEqualToString:@"IN-PROCESS"])
+ else if ([status isEqualToString: @"IN-PROCESS"])
code = 2;
- else if ([status isEqualToString:@"CANCELLED"])
+ else if ([status isEqualToString: @"CANCELLED"])
code = 3;
- [row setObject: [NSNumber numberWithInt: code] forKey:@"status"];
+ [row setObject: [NSNumber numberWithInt: code] forKey: @"status"];
}
else {
/* confirmed by default */
- [row setObject:[NSNumber numberWithInt:1] forKey:@"status"];
+ [row setObject:[NSNumber numberWithInt:1] forKey: @"status"];
}
[row setObject: [NSNumber numberWithUnsignedInt: accessClass]
organizer = [_task organizer];
if (organizer) {
NSString *email;
-
- email = [organizer valueForKey:@"rfc822Email"];
+
+ email = [organizer valueForKey: @"rfc822Email"];
if (email)
- [row setObject:email forKey:@"orgmail"];
+ [row setObject:email forKey: @"orgmail"];
}
-
+
/* construct partstates */
- count = [attendees count];
- partstates = [[NSMutableString alloc] initWithCapacity:count * 2];
+ count = [attendees count];
+ partstates = [[NSMutableString alloc] initWithCapacity:count * 2];
for ( i = 0; i < count; i++) {
- iCalPerson *p;
+ iCalPerson *p;
iCalPersonPartStat stat;
-
- p = [attendees objectAtIndex:i];
+
+ p = [attendees objectAtIndex:i];
stat = [p participationStatus];
if(i != 0)
- [partstates appendString:@"\n"];
- [partstates appendFormat:@"%d", stat];
+ [partstates appendString: @"\n"];
+ [partstates appendFormat: @"%d", stat];
}
- [row setObject:partstates forKey:@"partstates"];
+ [row setObject:partstates forKey: @"partstates"];
[partstates release];
return row;
}
NSArray *elements;
CardGroup *element;
unsigned int count;
-
+
elements = [ical allObjects];
count = [elements count];
if (count)
{
if (count > 1)
- [self logWithFormat:
- @"WARNING: given calendar contains more than one event: %@",
- ical];
+ [self logWithFormat:
+ @"WARNING: given calendar contains more than one event: %@",
+ ical];
element = [elements objectAtIndex: 0];
}
else
{
- [self logWithFormat:@"ERROR: given calendar contains no elements: %@", ical];
+ [self logWithFormat: @"ERROR: given calendar contains no elements: %@", ical];
element = nil;
}
NSAutoreleasePool *pool;
NSDictionary *fields;
id cal;
-
+
if ([_content length] == 0)
return nil;
pool = [[NSAutoreleasePool alloc] init];
cal = [iCalCalendar parseSingleFromSource: _content];
-
+
fields = nil;
if (cal)
{
if ([cal isKindOfClass:[iCalCalendar class]])
- cal = [self firstElementFromCalendar: cal];
+ cal = [self firstElementFromCalendar: cal];
if ([cal isKindOfClass:[iCalEvent class]])
- fields = [[self extractQuickFieldsFromEvent:cal] retain];
+ fields = [[self extractQuickFieldsFromEvent:cal] retain];
else if ([cal isKindOfClass:[iCalToDo class]])
- fields = [[self extractQuickFieldsFromTodo:cal] retain];
+ fields = [[self extractQuickFieldsFromTodo:cal] retain];
else if ([cal isNotNull]) {
- [self logWithFormat:@"ERROR: unexpected iCalendar parse result: %@",
- cal];
+ [self logWithFormat: @"ERROR: unexpected iCalendar parse result: %@",
+ cal];
}
}
else
- [self logWithFormat:@"ERROR: parsing source didn't return anything"];
+ [self logWithFormat: @"ERROR: parsing source didn't return anything"];
[pool release];
-
+
return [fields autorelease];
}
@end
+#define IS_EQUAL(a,b,sel) \
+ _iCalSafeCompareObjects (a, b, @selector(sel))
+
+static __inline__ BOOL _iCalSafeCompareObjects(id a, id b, SEL comparator)
+{
+ id va = a;
+ id vb = b;
+ BOOL (*compm)(id, SEL, id);
+
+ if((!va && vb) || (va && !vb))
+ return NO;
+ else if(va == vb)
+ return YES;
+ compm = (BOOL (*)( id, SEL, id)) [va methodForSelector: comparator];
+
+ return compm(va, comparator, vb);
+}
+
#endif /* CARDELEMENT_H */
+++ /dev/null
-/* CardGroup+iCal.h - this file is part of $PROJECT_NAME_HERE$
- *
- * Copyright (C) 2006 Inverse groupe conseil
- *
- * Author: Wolfgang Sourdeau <wsourdeau@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 CARDGROUP_ICAL_H
-#define CARDGROUP_ICAL_H
-
-@class NSString;
-@class NSCalendarDate;
-
-#import "CardGroup.h"
-
-@interface CardGroup (iCalExtensions)
-
-- (void) setDate: (NSCalendarDate *) _value
- forDateTimeValue: (NSString *) valueName;
-- (NSCalendarDate *) dateForDateTimeValue: (NSString *) valueName;
-
-@end
-
-#endif /* CARDGROUP_ICAL_H */
+++ /dev/null
-/* CardGroup+iCal.m - this file is part of SOPE
- *
- * Copyright (C) 2006 Inverse groupe conseil
- *
- * Author: Wolfgang Sourdeau <wsourdeau@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.
- */
-
-#import "iCalDateTime.h"
-
-#import "CardGroup+iCal.h"
-
-@implementation CardGroup (iCalExtensions)
-
-- (void) setDate: (NSCalendarDate *) _value
- forDateTimeValue: (NSString *) valueName
-{
- iCalDateTime *dateValue;
-
- dateValue = (iCalDateTime *) [self uniqueChildWithTag: valueName];
-
- [dateValue setDateTime: _value];
-}
-
-- (NSCalendarDate *) dateForDateTimeValue: (NSString *) valueName
-{
- iCalDateTime *dateValue;
-
- dateValue = (iCalDateTime *) [self uniqueChildWithTag: valueName];
-
- return [dateValue dateTime];
-}
-
-@end
+2007-06-07 Wolfgang Sourdeau <wsourdeau@inverse.ca>
+
+ * iCalDateTime.m ([iCalDateTime
+ -_setDateTime:dateTimeforAllDayEntity:forAllDayEntity]):
+ inverted the all day logic because all day dates where generated
+ for regular dates and the other way around...
+
+ * iCalEvent.m ([iCalEvent
+ -setAllDayWithStartDate:newStartDateduration:days]): new method
+ that sets the start and end dates in an all day fashion.
+ ([iCalEvent -setEndDate:newEndDate]): no longer use the methods
+ provided by the removed module CardGroup+iCal.
+ ([-isAllDay]): reimplemented method by testing if the start day
+ component is an all day date.
+
+ * iCalEntityObject.m ([iCalEntityObject -setCreated:newCreated])
+ ([iCalEntityObject -created], [-setLastModified:_value])
+ ([iCalEntityObject -lastModified])
+ ([iCalEntityObject -setTimeStampAsDate:newTimeStamp])
+ ([iCalEntityObject -timeStampAsDate], [-setStartDate:_value])
+ ([iCalEntityObject -startDate]): no longer use the methods
+ provided by the removed module CardGroup+iCal.
+
+ * iCalDateTime.m ([iCalDateTime -setDate:dateTime]): take the date
+ passed as parameter as an all day date.
+ ([iCalDateTime -isAllDay]): new method determining whether the
+ current value is an all day value.
+
+ * NSString+NGCards.m ([NSString -isAllDayDate]): new method that
+ determines whether the date represented in "self" is an all day
+ date (date only) or not (date + time).
+
+ * CardElement.h: moved IS_EQUAL macro from removed module
+ "common.h".
+
+ * CardGroup+iCal.[hm]: removed category module.
+
2007-04-27 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* NGVCard.m ([NGVCard -n]): simplified method by returning the
FHS_HEADER_DIRS = NGCards
-libNGCards_PCH_FILE = common.h
libNGCards_HEADER_FILES_DIR = .
libNGCards_HEADER_FILES_INSTALL_DIR = /NGCards
libNGCards_SOVERSION=$(MAJOR_VERSION).$(MINOR_VERSION)
\
CardElement.h \
CardGroup.h \
- CardGroup+iCal.h \
CardVersitRenderer.h \
\
NGCards.h \
\
CardElement.m \
CardGroup.m \
- CardGroup+iCal.m \
CardVersitRenderer.m \
\
iCalAlarm.m \
}
@end
-#include "common.h"
static inline NSDictionary *ExtractParameters(NSDictionary *_set) {
/* extracts ? parameters */
02111-1307, USA.
*/
-#import "NGCardsSaxHandler.h"
-#import "common.h"
#import <string.h>
+#import <Foundation/NSArray.h>
+
+#import "NGCardsSaxHandler.h"
#import "CardGroup.h"
02111-1307, USA.
*/
-#include "NSCalendarDate+ICal.h"
-#include "iCalDateHolder.h"
-#include "common.h"
+#import <Foundation/NSString.h>
+#import <Foundation/NSTimeZone.h>
+
+#import <NGExtensions/NSCalendarDate+misc.h>
+
+#import "NSCalendarDate+ICal.h"
+#import "iCalDateHolder.h"
static NSTimeZone *gmt = nil;
static inline void _setupGMT(void) {
- (NSTimeInterval) durationAsTimeInterval;
- (NSCalendarDate *) asCalendarDate;
+- (BOOL) isAllDayDate;
- (NSArray *) commaSeparatedValues;
NSRange cursor;
NSCalendarDate *date;
NSTimeZone *utc;
+ unsigned int length;
int year, month, day, hour, minute, second;
- if ([self length] > 14)
+ length = [self length];
+ if (length > 7)
{
cursor = NSMakeRange(0, 4);
year = [[self substringWithRange: cursor] intValue];
cursor.location += cursor.length;
day = [[self substringWithRange: cursor] intValue];
- cursor.location += cursor.length + 1;
- hour = [[self substringWithRange: cursor] intValue];
- cursor.location += cursor.length;
- minute = [[self substringWithRange: cursor] intValue];
- cursor.location += cursor.length;
- second = [[self substringWithRange: cursor] intValue];
+ if (length > 14)
+ {
+ cursor.location += cursor.length + 1;
+ hour = [[self substringWithRange: cursor] intValue];
+ cursor.location += cursor.length;
+ minute = [[self substringWithRange: cursor] intValue];
+ cursor.location += cursor.length;
+ second = [[self substringWithRange: cursor] intValue];
+ }
+ else
+ {
+ hour = 0;
+ minute = 0;
+ second = 0;
+ }
utc = [NSTimeZone timeZoneWithAbbreviation: @"GMT"];
date = [NSCalendarDate dateWithYear: year month: month
return date;
}
+- (BOOL) isAllDayDate
+{
+ return ([self length] == 8);
+}
+
- (NSArray *) commaSeparatedValues
{
NSEnumerator *rawValues;
+++ /dev/null
-/*
- Copyright (C) 2000-2005 SKYRIX Software AG
-
- This file is part of SOPE.
-
- SOPE 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.
-
- SOPE 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 SOPE; see the file COPYING. If not, write to the
- Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA.
-*/
-
-#ifndef __ICal_common_H__
-#define __ICal_common_H__
-
-#import <Foundation/Foundation.h>
-#import <EOControl/EOControl.h>
-#include <NGExtensions/NGExtensions.h>
-
-#define IS_EQUAL(a, b, sel) \
- _iCalSafeCompareObjects(a, b, @selector(sel))
-
-static __inline__ BOOL _iCalSafeCompareObjects(id a, id b, SEL comparator) {
- id va = a;
- id vb = b;
- BOOL (*compm)(id, SEL, id);
-
- if((va == nil && vb != nil) || (va != nil && vb == nil))
- return NO;
- else if(va == vb)
- return YES;
- compm = (BOOL (*)( id, SEL, id))[va methodForSelector:comparator];
- return compm(va, comparator, vb);
-}
-
-#endif /* __ICal_common_H__ */
02111-1307, USA.
*/
+#import <Foundation/NSString.h>
+
#import "iCalAttachment.h"
#import "iCalRecurrenceRule.h"
#import "iCalTrigger.h"
#import "iCalAlarm.h"
-#import "common.h"
@implementation iCalAlarm
02111-1307, USA.
*/
+#import <Foundation/NSString.h>
#import "iCalAttachment.h"
-#import "common.h"
@implementation iCalAttachment
02111-1307, USA.
*/
-#include "iCalRecurrenceCalculator.h"
+#import <Foundation/NSDate.h>
+#import <Foundation/NSArray.h>
+
+#import <NGExtensions/NSCalendarDate+misc.h>
+
+#import "iCalRecurrenceCalculator.h"
@interface iCalDailyRecurrenceCalculator : iCalRecurrenceCalculator
@end
-#include <NGExtensions/NGCalendarDateRange.h>
-#include "iCalRecurrenceRule.h"
-#include "NSCalendarDate+ICal.h"
-#include "common.h"
+#import <NGExtensions/NGCalendarDateRange.h>
+#import "iCalRecurrenceRule.h"
+#import "NSCalendarDate+ICal.h"
@interface iCalRecurrenceCalculator(PrivateAPI)
- (NSCalendarDate *)lastInstanceStartDate;
02111-1307, USA.
*/
-#include "iCalDataSource.h"
-#include "iCalObject.h"
-#include "iCalCalendar.h"
-#include <SaxObjC/SaxObjC.h>
-#include "common.h"
+#import <Foundation/NSArray.h>
+#import <Foundation/NSAutoreleasePool.h>
+#import <Foundation/NSBundle.h>
+#import <Foundation/NSObject.h>
+#import <Foundation/NSURL.h>
+
+#import <EOControl/EOClassDescription.h>
+#import <EOControl/EOFetchSpecification.h>
+#import <EOControl/EOQualifier.h>
+#import <EOControl/EOSortOrdering.h>
+#import <NGExtensions/EODataSource+NGExtensions.h>
+#import <NGExtensions/NSObject+Logs.h>
+#import <SaxObjC/SaxObjectDecoder.h>
+#import <SaxObjC/SaxXMLReaderFactory.h>
+
+#import "iCalObject.h"
+#import "iCalCalendar.h"
+
+#import "iCalDataSource.h"
@interface NSObject(suppressCapitalizedKeyWarning)
+ (void)suppressCapitalizedKeyWarning;
02111-1307, USA.
*/
-#include "iCalDateHolder.h"
-#include "iCalObject.h"
-#include "common.h"
+#import <Foundation/NSDate.h>
+#import <Foundation/NSDictionary.h>
+#import <Foundation/NSString.h>
+#import <Foundation/NSTimeZone.h>
+#import <Foundation/NSUserDefaults.h>
+
+#import <NGExtensions/NSCalendarDate+misc.h>
+#import <NGExtensions/NSObject+Logs.h>
+
+#import "iCalDateHolder.h"
+#import "iCalObject.h"
@interface NSTimeZone(iCalTimeZone)
- (void) setTimeZone: (iCalTimeZone *) iTZ;
- (iCalTimeZone *) timeZone;
+- (void) setDate: (NSCalendarDate *) date;
- (void) setDateTime: (NSCalendarDate *) dateTime;
- (NSCalendarDate *) dateTime;
+- (BOOL) isAllDay;
+
@end
#endif /* ICALDATETIMEELEMENT_H */
/* TODO: should implement the case where the TZ would be implicitly local
(no TZID and no UTC) */
-- (void) setDateTime: (NSCalendarDate *) dateTime
+- (void) _setDateTime: (NSCalendarDate *) dateTime
+ forAllDayEntity: (BOOL) forAllDayEntity
{
NSCalendarDate *tmpTime;
NSTimeZone *utcTZ;
tmpTime = [dateTime copy];
[tmpTime setTimeZone: utcTZ];
- timeString = [NSString stringWithFormat: @"%@Z",
- [tmpTime iCalFormattedDateTimeString]];
+ if (forAllDayEntity)
+ timeString = [tmpTime iCalFormattedDateString];
+ else
+ timeString = [NSString stringWithFormat: @"%@Z",
+ [tmpTime iCalFormattedDateTimeString]];
[tmpTime release];
}
}
[self setValue: 0 to: timeString];
}
+- (void) setDateTime: (NSCalendarDate *) dateTime
+{
+ [self _setDateTime: dateTime forAllDayEntity: NO];
+}
+
+- (void) setDate: (NSCalendarDate *) dateTime
+{
+ [self _setDateTime: dateTime forAllDayEntity: YES];
+}
+
- (NSCalendarDate *) dateTime
{
iCalTimeZone *iTZ;
return dateTime;
}
+- (BOOL) isAllDay
+{
+ return [[self value: 0] isAllDayDate];
+}
+
@end
- (void) setTimeStampAsDate: (NSCalendarDate *)_date;
- (NSCalendarDate *) timeStampAsDate;
-- (void) setStartDate: (NSCalendarDate *) _date;
+- (void) setStartDate: (NSCalendarDate *) newStartDate;
- (NSCalendarDate *) startDate;
- (BOOL) hasStartDate;
02111-1307, USA.
*/
+#import <Foundation/NSArray.h>
+#import <Foundation/NSString.h>
+#import <Foundation/NSURL.h>
+#import <Foundation/NSValue.h>
+
#import "NSCalendarDate+NGCards.h"
-#import "CardGroup+iCal.h"
#import "iCalAlarm.h"
#import "iCalDateTime.h"
#import "iCalEntityObject.h"
#import "iCalPerson.h"
-#import "common.h"
@interface iCalEntityObject (PrivateAPI)
- (NSArray *)_filteredAttendeesThinkingOfPersons:(BOOL)_persons;
[self setSequence: [NSNumber numberWithInt: seq]];
}
-- (void) setCreated: (NSCalendarDate *) _value
+- (void) setCreated: (NSCalendarDate *) newCreated
{
- [self setDate: _value forDateTimeValue: @"created"];
+ [(iCalDateTime *) [self uniqueChildWithTag: @"created"]
+ setDateTime: newCreated];
}
- (NSCalendarDate *) created
{
- return [self dateForDateTimeValue: @"created"];
+ return [(iCalDateTime *) [self uniqueChildWithTag: @"created"]
+ dateTime];
}
-- (void) setLastModified: (NSCalendarDate *) _value
+- (void) setLastModified: (NSCalendarDate *) newLastModified
{
- [self setDate: _value forDateTimeValue: @"last-modified"];
+ [(iCalDateTime *) [self uniqueChildWithTag: @"last-modified"]
+ setDateTime: newLastModified];
}
- (NSCalendarDate *) lastModified
{
- return [self dateForDateTimeValue: @"last-modified"];
+ return [(iCalDateTime *) [self uniqueChildWithTag: @"last-modified"]
+ dateTime];
}
-- (void) setTimeStampAsDate: (NSCalendarDate *) _value
+- (void) setTimeStampAsDate: (NSCalendarDate *) newTimeStamp
{
- [self setDate: _value forDateTimeValue: @"dtstamp"];
+ [(iCalDateTime *) [self uniqueChildWithTag: @"dtstamp"]
+ setDateTime: newTimeStamp];
}
- (NSCalendarDate *) timeStampAsDate
{
- return [self dateForDateTimeValue: @"dtstamp"];
+ return [(iCalDateTime *) [self uniqueChildWithTag: @"dtstamp"]
+ dateTime];
}
-- (void) setStartDate: (NSCalendarDate *) _value
+- (void) setStartDate: (NSCalendarDate *) newStartDate
{
- [self setDate: _value forDateTimeValue: @"dtstart"];
+ [(iCalDateTime *) [self uniqueChildWithTag: @"dtstart"]
+ setDateTime: newStartDate];
}
- (NSCalendarDate *) startDate
{
- return [self dateForDateTimeValue: @"dtstart"];
+ return [(iCalDateTime *) [self uniqueChildWithTag: @"dtstart"]
+ dateTime];
}
- (BOOL) hasStartDate
/* accessors */
+- (void) setAllDayWithStartDate: (NSCalendarDate *) newStartDate
+ duration: (unsigned int) days;
+
- (void) setEndDate: (NSCalendarDate *) _date;
- (NSCalendarDate *) endDate;
- (BOOL) hasEndDate;
02111-1307, USA.
*/
+#import <NGExtensions/NSCalendarDate+misc.h>
#import <NGExtensions/NGCalendarDateRange.h>
#import "NSCalendarDate+NGCards.h"
-#import "CardGroup+iCal.h"
#import "NSString+NGCards.h"
#import "iCalEventChanges.h"
}
/* accessors */
+- (void) setAllDayWithStartDate: (NSCalendarDate *) newStartDate
+ duration: (unsigned int) days
+{
+ NSCalendarDate *endDate;
+
+ [(iCalDateTime *) [self uniqueChildWithTag: @"dtstart"]
+ setDate: newStartDate];
+ endDate = [newStartDate dateByAddingYears: 0 months: 0 days: days];
+ [(iCalDateTime *) [self uniqueChildWithTag: @"dtend"]
+ setDate: endDate];
+}
-- (void) setEndDate: (NSCalendarDate *)_date
+- (void) setEndDate: (NSCalendarDate *) newEndDate
{
- [self setDate: _date forDateTimeValue: @"dtend"];
+ [(iCalDateTime *) [self uniqueChildWithTag: @"dtend"]
+ setDateTime: newEndDate];
}
- (NSCalendarDate *) endDate
{
- return [self dateForDateTimeValue: @"dtend"];
+ return [(iCalDateTime *) [self uniqueChildWithTag: @"dtend"]
+ dateTime];
}
- (BOOL) hasEndDate
return (![s isEqualToString: @"TRANSPARENT"]);
}
-/* TODO: FIX THIS!
- The problem is, that startDate/endDate are inappropriately modelled here.
- We'd need to have a special iCalDate in order to fix all the mess.
- For the time being, we chose allday to mean 00:00 - 23:59 in startDate's
- timezone.
-*/
- (BOOL) isAllDay
{
- NSCalendarDate *ed, *startDate;
- BOOL allDay;
-
- if ([self hasEndDate])
- {
- ed = [self endDate];
- startDate = [self startDate];
- [ed setTimeZone: [startDate timeZone]];
- allDay = (([startDate hourOfDay] == 0)
- && ([startDate minuteOfHour] == 0)
- && ([ed hourOfDay] == 23)
- && ([ed minuteOfHour] == 59));
- }
- else
- allDay = NO;
-
- return allDay;
+ return [(iCalDateTime *) [self uniqueChildWithTag: @"dtstart"] isAllDay];
}
- (BOOL) isWithinCalendarDateRange: (NGCalendarDateRange *) _range
02111-1307, USA.
*/
+#import <Foundation/NSArray.h>
-#include "iCalEventChanges.h"
-#include "iCalEvent.h"
-#include "iCalPerson.h"
-#include "common.h"
+#import "iCalEventChanges.h"
+#import "iCalEvent.h"
+#import "iCalPerson.h"
@interface iCalEventChanges (PrivateAPI)
- (void)_trackAttendeeChanges:(iCalEvent *)_from :(iCalEvent *)_to;
#import <Foundation/NSString.h>
#import <Foundation/NSTimeZone.h>
-#import "CardGroup+iCal.h"
#import "iCalDateTime.h"
#import "NSCalendarDate+NGCards.h"
}
/* accessors */
-- (void) setEndDate: (NSCalendarDate *)_date
+- (void) setEndDate: (NSCalendarDate *) newEndDate
{
- [self setDate: _date forDateTimeValue: @"dtend"];
+ [(iCalDateTime *) [self uniqueChildWithTag: @"dtend"]
+ setDateTime: newEndDate];
}
- (NSCalendarDate *) endDate
{
- return [self dateForDateTimeValue: @"dtend"];
+ return [(iCalDateTime *) [self uniqueChildWithTag: @"dtend"]
+ dateTime];
}
- (BOOL) hasEndDate
02111-1307, USA.
*/
-#include "iCalJournal.h"
-#include "common.h"
+#import <Foundation/NSString.h>
+
+#import "iCalJournal.h"
@implementation iCalJournal
02111-1307, USA.
*/
-#include "iCalRecurrenceCalculator.h"
+#import <NGExtensions/NSCalendarDate+misc.h>
+
+#import "iCalRecurrenceCalculator.h"
@interface iCalMonthlyRecurrenceCalculator : iCalRecurrenceCalculator
@end
-#include <NGExtensions/NGCalendarDateRange.h>
-#include "iCalRecurrenceRule.h"
-#include "NSCalendarDate+ICal.h"
-#include "common.h"
-#include <string.h>
+#import <NGExtensions/NGCalendarDateRange.h>
+#import "iCalRecurrenceRule.h"
+#import "NSCalendarDate+ICal.h"
+#import <string.h>
@interface iCalRecurrenceCalculator(PrivateAPI)
- (NSCalendarDate *)lastInstanceStartDate;
02111-1307, USA.
*/
-#include "iCalObject.h"
-#include "common.h"
+#import <Foundation/NSString.h>
+
+#import "iCalObject.h"
@implementation iCalObject
02111-1307, USA.
*/
-#include "iCalPerson.h"
-#include "common.h"
+#import <Foundation/NSString.h>
+
+#import "iCalPerson.h"
@implementation iCalPerson
02111-1307, USA.
*/
-#include "iCalRecurrenceCalculator.h"
-#include <NGExtensions/NGCalendarDateRange.h>
-#include "iCalRecurrenceRule.h"
-#include "NSCalendarDate+ICal.h"
-#include "common.h"
+#import <NGExtensions/NSCalendarDate+misc.h>
+#import <NGExtensions/NGCalendarDateRange.h>
+#import <NGExtensions/NSNull+misc.h>
+#import <NGExtensions/NSObject+Logs.h>
+
+#import "iCalRecurrenceRule.h"
+#import "NSCalendarDate+ICal.h"
+
+
+#import "iCalRecurrenceCalculator.h"
/* class cluster */
#include <NGExtensions/NGCalendarDateRange.h>
#include "iCalRecurrenceRule.h"
#include "iCalRecurrenceCalculator.h"
-#include "common.h"
@implementation iCalRepeatableEntityObject
#import "iCalDateTime.h"
#import "iCalRecurrenceRule.h"
-#import "CardGroup+iCal.h"
#import "iCalTimeZonePeriod.h"
#import <Foundation/NSString.h>
#import "NSCalendarDate+NGCards.h"
-#import "CardGroup+iCal.h"
#import "iCalDateTime.h"
#import "iCalToDo.h"
return [[self uniqueChildWithTag: @"percent-complete"] value: 0];
}
-- (void) setDue: (NSCalendarDate *) _date
+- (void) setDue: (NSCalendarDate *) newDueDate
{
- [self setDate: _date
- forDateTimeValue: @"due"];
+ [(iCalDateTime *) [self uniqueChildWithTag: @"due"]
+ setDate: newDueDate];
}
- (NSCalendarDate *) due
{
- return [self dateForDateTimeValue: @"due"];
-// return [[self uniqueChildWithTag: @"percent-complete"] asCalendarDate];
+ return [(iCalDateTime *) [self uniqueChildWithTag: @"due"]
+ dateTime];
}
-- (void) setCompleted: (NSCalendarDate *) _date
+- (void) setCompleted: (NSCalendarDate *) newCompletedDate
{
+ [(iCalDateTime *) [self uniqueChildWithTag: @"completed"]
+ setDate: newCompletedDate];
[self setStatus: @"COMPLETED"];
- [self setDate: _date forDateTimeValue: @"completed"];
}
- (NSCalendarDate *) completed
{
- return [self dateForDateTimeValue: @"completed"];
+ return [(iCalDateTime *) [self uniqueChildWithTag: @"completed"]
+ dateTime];
}
/* ical typing */
02111-1307, USA.
*/
-#include "iCalTrigger.h"
-#include "common.h"
+#import <Foundation/NSString.h>
+
+#import "iCalTrigger.h"
@implementation iCalTrigger
02111-1307, USA.
*/
-#include "iCalRecurrenceCalculator.h"
+#import <NGExtensions/NSCalendarDate+misc.h>
+
+#import "iCalRecurrenceCalculator.h"
@interface iCalWeeklyRecurrenceCalculator : iCalRecurrenceCalculator
@end
-#include <NGExtensions/NGCalendarDateRange.h>
-#include "iCalRecurrenceRule.h"
-#include "NSCalendarDate+ICal.h"
-#include "common.h"
+#import <NGExtensions/NGCalendarDateRange.h>
+#import "iCalRecurrenceRule.h"
+#import "NSCalendarDate+ICal.h"
@interface iCalRecurrenceCalculator (PrivateAPI)
02111-1307, USA.
*/
-#include "iCalRecurrenceCalculator.h"
+#import <NGExtensions/NSCalendarDate+misc.h>
+
+#import "iCalRecurrenceCalculator.h"
@interface iCalYearlyRecurrenceCalculator : iCalRecurrenceCalculator
@end
-#include <NGExtensions/NGCalendarDateRange.h>
-#include "iCalRecurrenceRule.h"
-#include "NSCalendarDate+ICal.h"
-#include "common.h"
+#import <NGExtensions/NGCalendarDateRange.h>
+#import "iCalRecurrenceRule.h"
+#import "NSCalendarDate+ICal.h"
@interface iCalRecurrenceCalculator(PrivateAPI)
- (NSCalendarDate *)lastInstanceStartDate;
{
iCalCalendar *calendar;
NSString *calContent;
- BOOL isNew;
}
- (NSString *) componentTag;
- (iCalCalendar *) calendar: (BOOL) create;
- (iCalRepeatableEntityObject *) component: (BOOL) create;
-- (BOOL) isNew;
- (NSException *) primarySaveContentString: (NSString *) _iCalString;
- (NSException *) primaryDelete;
{
calendar = nil;
calContent = nil;
- isNew = NO;
}
return self;
newComponent = [[calendar classForTag: componentTag]
groupWithTag: componentTag];
[calendar addChild: newComponent];
- isNew = YES;
}
}
if (calendar)
firstChildWithTag: [self componentTag]];
}
-- (BOOL) isNew
-{
- return isNew;
-}
-
/* raw saving */
- (NSException *) primarySaveContentString: (NSString *) _iCalString
/* create object */
- return [[[SOGoMailFolder alloc] initWithName:_key
- inContainer:self] autorelease];
+ return [SOGoMailFolder objectWithName: _key inContainer: self];
}
- (id) lookupImap4Message: (NSString *) _key
inContext: (id) _ctx
{
// TODO: we might want to check for existence prior controller creation
- return [[[SOGoMailObject alloc] initWithName:_key
- inContainer:self] autorelease];
+ return [SOGoMailObject objectWithName: _key inContainer: self];
}
- (id) lookupName: (NSString *) _key
/* name lookup */
-- (id)lookupImap4BodyPartKey:(NSString *)_key inContext:(id)_ctx {
+- (id) lookupImap4BodyPartKey: (NSString *) _key
+ inContext: (id) _ctx
+{
// TODO: we might want to check for existence prior controller creation
Class clazz;
clazz = [SOGoMailBodyPart bodyPartClassForKey:_key inContext:_ctx];
- return [[[clazz alloc] initWithName:_key inContainer:self] autorelease];
+
+ return [clazz objectWithName:_key inContainer: self];
}
- (id)lookupName:(NSString *)_key inContext:(id)_ctx acquire:(BOOL)_flag {
return @"IPM.Message"; /* email, default class */
}
+- (NSArray *) aclsForUser: (NSString *) uid
+{
+ return [container aclsForUser: uid];
+}
+
/* debugging */
- (BOOL)isDebuggingEnabled {
NSDictionary+Utilities.h \
NSObject+Utilities.h \
NSString+Utilities.h \
+ NSNumber+Utilities.h \
+ NSNull+Utilities.h \
NSDictionary+URL.h \
NSCalendarDate+SOGo.h \
\
NSDictionary+Utilities.m \
NSObject+Utilities.m \
NSString+Utilities.m \
+ NSNumber+Utilities.m \
+ NSNull+Utilities.m \
NSCalendarDate+SOGo.m \
\
SOGoAuthenticator.m \
actionClass = "UIxMailAccountActions";
actionName = "listMailboxes";
};
+ createFolder = {
+ protectedBy = "View";
+ actionClass = "UIxMailFolderActions";
+ actionName = "createFolder";
+ };
};
};
- (void)setFullWeekdayNameAndDetails;
- (NSString *)stringForObjectValue:(id)_obj;
+- (NSString *) stringForSecondsSinceThe70s: (unsigned int) seconds;
- (NSString *)shortDayOfWeek:(int)_day;
- (NSString *)fullDayOfWeek:(int)_day;
/* operation */
-- (NSString *)stringForObjectValue:(id)_obj {
+- (NSString *) stringForObjectValue: (id) _obj
+{
return [self performSelector:self->formatAction
withObject:_obj];
}
+- (NSString *) stringForSecondsSinceThe70s: (unsigned int) seconds
+{
+ return [self stringForObjectValue:
+ [NSCalendarDate dateWithTimeIntervalSince1970: seconds]];
+}
+
/* Helpers */
- (NSString *)shortDayOfWeek:(int)_day {
- (NSDictionary *)locale {
/* we need no fallback here, as locale is guaranteed to be set by sogod */
- return [[self context] valueForKey:@"locale"];
+ return [context valueForKey: @"locale"];
}
- (WOResourceManager *) pageResourceManager
"Workweek days only" = "Workweek days only";
"Tasks in View" = "Tasks in View";
-"appointmentDeleteConfirmation" = "Erasing this event will be permanent.\\nWould you like to continue?";
+"eventDeleteConfirmation" = "Erasing this event will be permanent.\\nWould you like to continue?";
"taskDeleteConfirmation" = "Erasing this task will be permanent.\\nWould you like to continue?";
/* Legend */
"Workweek days only" = "Semaine de travail seulement";
"Tasks in View" = "Afficher les tâches";
-"appointmentDeleteConfirmation" = "L'effacement de cet événement sera permanent.\\nVoulez-vous continuer?";
+"eventDeleteConfirmation" = "L'effacement de cet événement sera permanent.\\nVoulez-vous continuer?";
"taskDeleteConfirmation" = "L'effacement de cette tâche sera permanent.\\nVoulez-vous continuer?";
/* Legend */
\
UIxComponent+Scheduler.m \
UIxCalView.m \
- UIxCalAptListView.m \
- UIxCalTasksListView.m \
UIxCalDayView.m \
UIxCalMulticolumnDayView.m \
UIxCalWeekView.m \
UIxCalMonthViewOld.m \
UIxAptTableView.m \
\
+ UIxCalListingActions.m \
+ \
UIxAttendeesEditor.m \
UIxComponentEditor.m \
UIxCalendarSelector.m \
UIxCalDateLabel.m \
UIxDatePicker.m \
UIxTimeDateControl.m \
- UIxCalInlineAptView.m \
- UIxCalInlineMonthAptView.m \
UIxCalParticipationStatusView.m \
UIxCalMonthOverview.m
@interface UIxAppointmentEditor : UIxComponent
{
iCalEvent *event;
+ BOOL isAllDay;
NSCalendarDate *aptStartDate;
NSCalendarDate *aptEndDate;
NSString *item;
* Boston, MA 02111-1307, USA.
*/
+#include <math.h>
+
#import <NGObjWeb/SoObject.h>
#import <NGObjWeb/WORequest.h>
#import <NGObjWeb/NSException+HTTP.h>
aptEndDate = nil;
item = nil;
event = nil;
+ isAllDay = NO;
}
return self;
/* icalendar values */
- (BOOL) isAllDay
{
- return NO;
+ NSString *hm;
+
+ hm = [self queryParameterForKey: @"hm"];
+
+ return (isAllDay
+ || (hm && [hm isEqualToString: @"allday"]));
}
- (void) setIsAllDay: (BOOL) newIsAllDay
{
+ isAllDay = newIsAllDay;
}
- (void) setAptStartDate: (NSCalendarDate *) newAptStartDate
if (event)
{
startDate = [event startDate];
- endDate = [event endDate];
+ isAllDay = [event isAllDay];
+ if (isAllDay)
+ endDate = [[event endDate] dateByAddingYears: 0 months: 0 days: -1];
+ else
+ endDate = [event endDate];
}
else
{
ASSIGN (aptStartDate, startDate);
ASSIGN (aptEndDate, endDate);
+
/* here comes the code for initializing repeat, reminder and isAllDay... */
return self;
iCalString = [[clientObject calendar: NO] versitString];
[clientObject saveContentString: iCalString];
- return [self jsCloseWithRefreshMethod: @"refreshAppointmentsAndDisplay()"];
+ return [self jsCloseWithRefreshMethod: @"refreshEventsAndDisplay()"];
}
- (BOOL) shouldTakeValuesFromRequest: (WORequest *) request
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"];
}
+++ /dev/null
-/* UIxCalAptListView.h - this file is part of SOGo
- *
- * Copyright (C) 2006 Inverse groupe conseil
- *
- * Author: Wolfgang Sourdeau <wsourdeau@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 UIXCALAPTLISTVIEW_H
-#define UIXCALAPTLISTVIEW_H
-
-#import "UIxCalView.h"
-
-@class NSDictionary;
-
-@interface UIxCalAptListView : UIxCalView
-{
- NSCalendarDate *startDate;
- NSCalendarDate *endDate;
-
- NSDictionary *currentAppointment;
-}
-
-- (void) setCurrentAppointment: (NSDictionary *) apt;
-- (NSDictionary *) currentAppointment;
-
-@end
-
-#endif /* UIXCALAPTLIST_H */
+++ /dev/null
-/* UIxCalAptListView.m - this file is part of SOGo
- *
- * Copyright (C) 2006 Inverse groupe conseil
- *
- * Author: Wolfgang Sourdeau <wsourdeau@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.
- */
-
-#import <Foundation/NSDate.h>
-#import <Foundation/NSDictionary.h>
-#import <Foundation/NSString.h>
-
-#import <NGExtensions/NSCalendarDate+misc.h>
-#import <Appointments/SOGoAppointmentFolder.h>
-
-#import <SOGoUI/SOGoDateFormatter.h>
-
-#import "UIxCalAptListView.h"
-
-@implementation UIxCalAptListView
-
-- (id) init
-{
- if ((self = [super init]))
- {
- startDate = nil;
- endDate = nil;
- }
-
- return self;
-}
-
-- (void) setCurrentAppointment: (NSDictionary *) apt
-{
- currentAppointment = apt;
-}
-
-- (NSDictionary *) currentAppointment
-{
- return currentAppointment;
-}
-
-- (NSCalendarDate *) startDate
-{
- NSCalendarDate *today;
- NSString *filterPopup;
-
- if (!startDate)
- {
- filterPopup = [self queryParameterForKey: @"filterpopup"];
- today = [[NSCalendarDate date] beginOfDay];
- if (!filterPopup || ![filterPopup length])
- startDate = today;
- else if ([filterPopup isEqualToString: @"view_selectedday"])
- startDate = [[self selectedDate] beginOfDay];
- else if ([filterPopup isEqualToString: @"view_thismonth"])
- startDate = [today firstDayOfMonth];
- else if ([filterPopup isEqualToString: @"view_all"])
- startDate = [NSCalendarDate dateWithTimeIntervalSince1970: 0];
- else
- startDate = today;
- }
-
- return startDate;
-}
-
-- (NSCalendarDate *) endDate
-{
- NSCalendarDate *today;
- NSString *filterPopup;
-
- if (!endDate)
- {
- filterPopup = [self queryParameterForKey: @"filterpopup"];
-
- today = [[NSCalendarDate date] endOfDay];
- if (!filterPopup || ![filterPopup length]
- || [filterPopup isEqualToString: @"view_today"])
- endDate = today;
- else if ([filterPopup isEqualToString: @"view_all"]
- || [filterPopup isEqualToString: @"view_future"])
- endDate = [NSCalendarDate dateWithTimeIntervalSince1970: 0x7fffffff];
- else if ([filterPopup isEqualToString: @"view_thismonth"])
- endDate = [today lastDayOfMonth];
- else if ([filterPopup isEqualToString: @"view_selectedday"])
- endDate = [[self selectedDate] endOfDay];
- else if ([filterPopup isEqualToString: @"view_next7"])
- endDate = [today dateByAddingYears: 0 months: 0 days: 7];
- else if ([filterPopup isEqualToString: @"view_next14"])
- endDate = [today dateByAddingYears: 0 months: 0 days: 14];
- else if ([filterPopup isEqualToString: @"view_next31"])
- endDate = [today dateByAddingYears: 0 months: 1 days: 0];
- else
- endDate = today;
- }
-
- return endDate;
-}
-
-- (SOGoDateFormatter *) itemDateFormatter
-{
- SOGoDateFormatter *fmt;
-
- fmt = [[SOGoDateFormatter alloc] initWithLocale: [self locale]];
- [fmt autorelease];
- [fmt setFullWeekdayNameAndDetails];
-
- return fmt;
-}
-
-- (NSString *) currentStartTime
-{
- NSCalendarDate *date;
-
- date = [NSCalendarDate dateWithTimeIntervalSince1970:
- [[currentAppointment objectForKey: @"startdate"]
- intValue]];
- [date setTimeZone: timeZone];
-
- return [[self itemDateFormatter] stringForObjectValue: date];
-}
-
-- (NSString *) currentEndTime
-{
- NSCalendarDate *date;
-
- date = [NSCalendarDate dateWithTimeIntervalSince1970:
- [[currentAppointment objectForKey: @"enddate"]
- intValue]];
- [date setTimeZone: timeZone];
-
- return [[self itemDateFormatter] stringForObjectValue: date];
-}
-
-- (NSString *) currentLocation
-{
- return [currentAppointment objectForKey: @"location"];
-}
-
-- (NSString *) currentSerialDay
-{
- NSCalendarDate *date;
- int intDate;
-
- intDate = [[currentAppointment objectForKey: @"startdate"] intValue];
- date = [NSCalendarDate dateWithTimeIntervalSince1970: intDate];
- [date setTimeZone: timeZone];
-
- return [NSString stringWithFormat: @"%d%.2d%.2d",
- [date yearOfCommonEra],
- [date monthOfYear],
- [date dayOfMonth]];
-}
-
-- (NSString *) currentSerialHour
-{
- NSCalendarDate *date;
- int intDate;
-
- intDate = [[currentAppointment objectForKey: @"startdate"] intValue];
- date = [NSCalendarDate dateWithTimeIntervalSince1970: intDate];
- [date setTimeZone: timeZone];
-
- return [NSString stringWithFormat: @"%.2d%.2d",
- [date hourOfDay],
- [date minuteOfHour]];
-}
-
-@end
NSString *currentTableHour;
NSMutableArray *daysToDisplay;
NSMutableArray *hoursToDisplay;
- NSArray *allAppointments;
-
- NSDictionary *currentAppointment;
NSString *cssClass;
NSString *cssId;
- (void) setCurrentTableDay: (NSCalendarDate *) aTableDay;
- (NSCalendarDate *) currentTableDay;
-- (void) setCurrentAppointment: (NSDictionary *) newCurrentAppointment;
-- (NSDictionary *) currentAppointment;
-
@end
#endif /* UIXCALDAYTABLE_H */
{
if ((self = [super init]))
{
- allAppointments = nil;
+// allAppointments = nil;
daysToDisplay = nil;
hoursToDisplay = nil;
numberOfDays = 1;
- (void) dealloc
{
- if (allAppointments)
- [allAppointments release];
- if (daysToDisplay)
- [daysToDisplay release];
- if (hoursToDisplay)
- [hoursToDisplay release];
+// if (allAppointments)
+// [allAppointments release];
+ [daysToDisplay release];
+ [hoursToDisplay release];
[dateFormatter release];
[super dealloc];
}
- (void) setNumberOfDays: (NSString *) aNumber
{
numberOfDays = [aNumber intValue];
- if (daysToDisplay)
- {
- [daysToDisplay release];
- daysToDisplay = nil;
- }
+ [daysToDisplay release];
+ daysToDisplay = nil;
}
- (NSString *) numberOfDays
- (void) setStartDate: (NSCalendarDate *) aStartDate
{
startDate = aStartDate;
- if (daysToDisplay)
- {
- [daysToDisplay release];
- daysToDisplay = nil;
- }
+ [daysToDisplay release];
+ daysToDisplay = nil;
}
- (NSCalendarDate *) startDate
[daysToDisplay addObject: [currentDate dateByAddingYears: 0
months: 0
days: count]];
+
}
return daysToDisplay;
- (NSString *) labelForDay
{
- return [NSString stringWithFormat: @"%@<br />%@",
- [dateFormatter shortDayOfWeek: [currentTableDay dayOfWeek]],
- [dateFormatter stringForObjectValue: currentTableDay]];
+ return [dateFormatter shortDayOfWeek: [currentTableDay dayOfWeek]];
}
-- (NSDictionary *) _adjustedAppointment: (NSDictionary *) anAppointment
- forStart: (NSCalendarDate *) start
- andEnd: (NSCalendarDate *) end
+- (NSString *) labelForDate
{
- NSMutableDictionary *newMutableAppointment;
- NSDictionary *newAppointment;
- BOOL startIsEarlier, endIsLater;
-
- startIsEarlier
- = ([[anAppointment objectForKey: @"startDate"] laterDate: start] == start);
- endIsLater
- = ([[anAppointment objectForKey: @"endDate"] earlierDate: end] == end);
-
- if (startIsEarlier || endIsLater)
- {
- newMutableAppointment
- = [NSMutableDictionary dictionaryWithDictionary: anAppointment];
-
- if (startIsEarlier)
- [newMutableAppointment setObject: start
- forKey: @"startDate"];
- if (endIsLater)
- [newMutableAppointment setObject: end
- forKey: @"endDate"];
-
- newAppointment = newMutableAppointment;
- }
- else
- newAppointment = anAppointment;
-
- return newAppointment;
+ return [dateFormatter stringForObjectValue: currentTableDay];
}
-- (NSArray *) appointmentsForCurrentDay
-{
- NSMutableArray *filteredAppointments;
- NSEnumerator *aptsEnumerator;
- NSDictionary *currentDayAppointment;
- NSCalendarDate *start, *end;
- int endHour;
-
- if (!allAppointments)
- {
- allAppointments = [self fetchCoreAppointmentsInfos];
- [allAppointments retain];
- }
-
- filteredAppointments = [NSMutableArray new];
- [filteredAppointments autorelease];
-
- start = [currentTableDay hour: [self dayStartHour] minute: 0];
- endHour = [self dayEndHour];
- if (endHour < 24)
- end = [currentTableDay hour: [self dayEndHour] minute: 59];
- else
- end = [[currentTableDay tomorrow] hour: 0 minute: 0];
-
- aptsEnumerator = [allAppointments objectEnumerator];
- currentDayAppointment = [aptsEnumerator nextObject];
- while (currentDayAppointment)
- {
- if (([end laterDate: [currentDayAppointment
- valueForKey: @"startDate"]] == end)
- && ([start earlierDate: [currentDayAppointment
- valueForKey: @"endDate"]] == start))
- [filteredAppointments
- addObject: [self _adjustedAppointment: currentDayAppointment
- forStart: start andEnd: end]];
- currentDayAppointment = [aptsEnumerator nextObject];
- }
-
- return filteredAppointments;
-}
-
-- (void) setCurrentAppointment: (NSDictionary *) newCurrentAppointment
-{
- currentAppointment = newCurrentAppointment;
-}
-
-- (NSDictionary *) currentAppointment
-{
- return currentAppointment;
-}
+// - (NSDictionary *) _adjustedAppointment: (NSDictionary *) anAppointment
+// forStart: (NSCalendarDate *) start
+// andEnd: (NSCalendarDate *) end
+// {
+// NSMutableDictionary *newMutableAppointment;
+// NSDictionary *newAppointment;
+// BOOL startIsEarlier, endIsLater;
+
+// startIsEarlier
+// = ([[anAppointment objectForKey: @"startDate"] laterDate: start] == start);
+// endIsLater
+// = ([[anAppointment objectForKey: @"endDate"] earlierDate: end] == end);
+
+// if (startIsEarlier || endIsLater)
+// {
+// newMutableAppointment
+// = [NSMutableDictionary dictionaryWithDictionary: anAppointment];
+
+// if (startIsEarlier)
+// [newMutableAppointment setObject: start
+// forKey: @"startDate"];
+// if (endIsLater)
+// [newMutableAppointment setObject: end
+// forKey: @"endDate"];
+
+// newAppointment = newMutableAppointment;
+// }
+// else
+// newAppointment = anAppointment;
+
+// return newAppointment;
+// }
+
+// - (NSArray *) appointmentsForCurrentDay
+// {
+// NSMutableArray *filteredAppointments;
+// NSEnumerator *aptsEnumerator;
+// NSDictionary *currentDayAppointment;
+// NSCalendarDate *start, *end;
+// int endHour;
+
+// if (!allAppointments)
+// {
+// allAppointments = [self fetchCoreAppointmentsInfos];
+// [allAppointments retain];
+// }
+
+// filteredAppointments = [NSMutableArray new];
+// [filteredAppointments autorelease];
+
+// start = [currentTableDay hour: [self dayStartHour] minute: 0];
+// endHour = [self dayEndHour];
+// if (endHour < 24)
+// end = [currentTableDay hour: [self dayEndHour] minute: 59];
+// else
+// end = [[currentTableDay tomorrow] hour: 0 minute: 0];
+
+// aptsEnumerator = [allAppointments objectEnumerator];
+// currentDayAppointment = [aptsEnumerator nextObject];
+// while (currentDayAppointment)
+// {
+// if (([end laterDate: [currentDayAppointment
+// valueForKey: @"startDate"]] == end)
+// && ([start earlierDate: [currentDayAppointment
+// valueForKey: @"endDate"]] == start))
+// [filteredAppointments
+// addObject: [self _adjustedAppointment: currentDayAppointment
+// forStart: start andEnd: end]];
+// currentDayAppointment = [aptsEnumerator nextObject];
+// }
+
+// return filteredAppointments;
+// }
+
+// - (void) setCurrentAppointment: (NSDictionary *) newCurrentAppointment
+// {
+// currentAppointment = newCurrentAppointment;
+// }
+
+// - (NSDictionary *) currentAppointment
+// {
+// return currentAppointment;
+// }
- (NSString *) appointmentsClasses
{
+++ /dev/null
-/*
- Copyright (C) 2000-2004 SKYRIX Software AG
-
- This file is part of OGo
-
- OGo 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
- 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
- Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA.
- */
-// $Id: UIxCalInlineAptView.h 1031 2007-03-07 22:52:32Z wolfgang $
-
-#ifndef UIXCALINLINEAPTVIEW_H
-#define UIXCALINLINEAPTVIEW_H
-
-#import <NGObjWeb/WOComponent.h>
-
-@interface UIxCalInlineAptView : WOComponent
-{
- NSDictionary *appointment;
- id formatter;
- id tooltipFormatter;
- id url;
- id style;
- id queryDictionary;
- id referenceDate;
- int dayStartHour;
- int dayEndHour;
- BOOL canAccess;
-}
-
-@end
-
-#endif /* UIXCALINLINEAPTVIEW_H */
+++ /dev/null
-/*
- Copyright (C) 2000-2004 SKYRIX Software AG
-
- This file is part of OGo
-
- OGo 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
- 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
- Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA.
- */
-// $Id$
-
-#import <math.h>
-
-#import <Foundation/NSDictionary.h>
-
-#import <NGExtensions/NSNull+misc.h>
-#import <NGExtensions/NSCalendarDate+misc.h>
-#import <NGObjWeb/WOContext+SoObjects.h>
-
-#import <NGCards/iCalEntityObject.h>
-#import <SOGo/SOGoAuthenticator.h>
-#import <SOGo/SOGoUser.h>
-#import <SOGoUI/SOGoAptFormatter.h>
-
-#import "UIxCalInlineAptView.h"
-
-@implementation UIxCalInlineAptView
-
-- (id) init
-{
- if ((self = [super init]))
- {
- dayStartHour = 0;
- dayEndHour = 24;
- appointment = nil;
- }
-
- return self;
-}
-
-- (void) dealloc
-{
- [appointment release];
- [formatter release];
- [tooltipFormatter release];
- [url release];
- [style release];
- [queryDictionary release];
- [referenceDate release];
- [super dealloc];
-}
-
-- (void) setAppointment: (NSDictionary *) _appointment
-{
- ASSIGN(appointment, _appointment);
-}
-
-- (NSDictionary *) appointment
-{
- return appointment;
-}
-
-- (void) setDayStartHour: (unsigned int) anHour
-{
- dayStartHour = anHour;
-}
-
-- (void) setDayEndHour: (unsigned int) anHour
-{
- dayEndHour = anHour;
-}
-
-- (void) setFormatter: (id) _formatter
-{
- ASSIGN(formatter, _formatter);
-}
-
-- (id) formatter
-{
- return formatter;
-}
-
-- (void) setTooltipFormatter: (id) _tooltipFormatter
-{
- ASSIGN(tooltipFormatter, _tooltipFormatter);
-}
-
-- (id) tooltipFormatter
-{
- return tooltipFormatter;
-}
-
-- (void) setUrl: (id) _url
-{
- ASSIGN(url, _url);
-}
-
-- (id) url
-{
- return url;
-}
-
-- (void) setStyle: (id) _style
-{
- NSMutableString *ms;
- NSNumber *prio;
- NSString *s;
- NSString *email;
-
- if (_style)
- ms = [NSMutableString stringWithString: _style];
- else
- ms = (NSMutableString *)[NSMutableString string];
-
- if ((prio = [appointment valueForKey:@"priority"])) {
- [ms appendFormat:@" apt_prio%@", prio];
- }
- email = [[context activeUser] primaryEmail];
- s = [appointment valueForKey:@"orgmail"];
- if ([s isNotNull])
- {
- if ([s rangeOfString: email].length > 0)
- [ms appendString:@" apt_organizer"];
- else
- [ms appendString:@" apt_other"];
- }
- s = [appointment valueForKey:@"partmails"];
- if ([s isNotNull])
- {
- if ([s rangeOfString:email].length > 0)
- [ms appendString:@" apt_participant"];
- else
- [ms appendString:@" apt_nonparticipant"];
- }
- ASSIGNCOPY(style, ms);
-}
-
-- (id)style {
- return style;
-}
-
-- (void) setQueryDictionary: (id) _queryDictionary
-{
- ASSIGN(queryDictionary, _queryDictionary);
-}
-
-- (id) queryDictionary
-{
- return queryDictionary;
-}
-
-- (void) setReferenceDate: (id) _referenceDate
-{
- ASSIGN(referenceDate, _referenceDate);
-}
-
-- (id) referenceDate
-{
- return referenceDate;
-}
-
-- (void) setCanAccess: (BOOL) _canAccess
-{
- canAccess = _canAccess;
-}
-
-- (BOOL) canAccess
-{
- return canAccess;
-}
-
-- (NSString *) displayClasses
-{
- NSTimeInterval secondsStart, secondsEnd, delta;
- NSCalendarDate *startDate;
- int deltaStart, deltaLength;
-
- startDate = [appointment objectForKey: @"startDate"];
- secondsStart = [startDate timeIntervalSince1970];
- secondsEnd = [[appointment objectForKey: @"endDate"] timeIntervalSince1970];
- delta = (secondsEnd - [startDate timeIntervalSince1970]) / 60;
- deltaLength = delta / 15;
- if (((int) delta % 15) > 0)
- deltaLength += 1;
-
- deltaStart = (([startDate hourOfDay] * 60 + [startDate minuteOfHour]
- - dayStartHour * 60) / 15);
-
- return [NSString stringWithFormat: @"appointment starts%d lasts%d",
- deltaStart, deltaLength, [startDate dayOfWeek]];
-}
-
-- (NSString *) innerDisplayClasses
-{
- return [NSString stringWithFormat: @"appointmentInside ownerIs%@",
- [appointment objectForKey: @"owner"]];
-}
-
-- (NSString *) displayStyle
-{
- NSCalendarDate *startDate, *endDate, *dayStart, *dayEnd;
- int sSeconds, eSeconds, deltaMinutes;
- unsigned int height;
- NSTimeZone *uTZ;
-
- uTZ = [referenceDate timeZone];
- dayStart = [referenceDate beginOfDay];
- dayEnd = [referenceDate endOfDay];
-
- sSeconds = [[appointment objectForKey: @"startdate"] intValue];
- eSeconds = [[appointment objectForKey: @"enddate"] intValue];
- startDate = [NSCalendarDate dateWithTimeIntervalSince1970: sSeconds];
- [startDate setTimeZone: uTZ];
- if ([startDate earlierDate: dayStart] == startDate)
- startDate = dayStart;
- endDate = [NSCalendarDate dateWithTimeIntervalSince1970: eSeconds];
- [endDate setTimeZone: uTZ];
- if ([endDate earlierDate: dayEnd] == dayEnd)
- endDate = dayEnd;
-
- deltaMinutes = (([endDate hourOfDay] - [startDate hourOfDay]) * 60
- + [endDate minuteOfHour] - [startDate minuteOfHour]);
- height = ceil(deltaMinutes / 15) * 25;
-
- return [NSString stringWithFormat: @"height: %d%%;", height];
-}
-
-/* helpers */
-
-- (NSString *) startHour
-{
- NSCalendarDate *start;
-
- start = [appointment objectForKey: @"startDate"];
-
- return [NSString stringWithFormat: @"%.2d:%.2d",
- [start hourOfDay], [start minuteOfHour]];
-}
-
-- (NSString *) title
-{
- return [formatter stringForObjectValue: appointment
- referenceDate: [self referenceDate]];
-}
-
-- (NSString *) tooltip
-{
- return [tooltipFormatter stringForObjectValue: appointment
- referenceDate: [self referenceDate]];
-}
-
-- (BOOL) _userIsInTheCard: (NSString *) email
-{
- NSString *orgMailString, *partMailsString;
- NSArray *partMails;
- BOOL userIsInTheCard;
-
- orgMailString = [appointment objectForKey: @"orgmail"];
- if ([orgMailString isNotNull] && [orgMailString isEqualToString: email])
- userIsInTheCard = YES;
- else
- {
- partMailsString = [appointment objectForKey: @"partmails"];
- if ([partMailsString isNotNull])
- {
- partMails = [partMailsString componentsSeparatedByString: @"\n"];
- userIsInTheCard = [partMails containsObject: email];
- }
- else
- userIsInTheCard = NO;
- }
-
- return userIsInTheCard;
-}
-
-@end
+++ /dev/null
-/* UIxCalInlineMonthAptView.h - this file is part of SOGo
- *
- * Copyright (C) 2007 Inverse groupe conseil
- *
- * Author: Wolfgang Sourdeau <wsourdeau@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 UIXCALINLINEMONTHAPTVIEW_H
-#define UIXCALINLINEMONTHAPTVIEW_H
-
-#import "UIxCalInlineAptView.h"
-
-@interface UIxCalInlineMonthAptView : UIxCalInlineAptView
-
-@end
-
-#endif /* UIXCALINLINEMONTHAPTVIEW_H */
+++ /dev/null
-/* UIxCalInlineMonthAptView.m - this file is part of SOGo
- *
- * Copyright (C) 2007 Inverse groupe conseil
- *
- * Author: Wolfgang Sourdeau <wsourdeau@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.
- */
-
-#import "UIxCalInlineMonthAptView.h"
-
-@implementation UIxCalInlineMonthAptView
-
-@end
-/* UIxCalTasksListView.h - this file is part of SOGo
+/* UIxCalListingActions.h - this file is part of SOGo
*
* Copyright (C) 2006 Inverse groupe conseil
*
* Boston, MA 02111-1307, USA.
*/
-#ifndef UIXCALTASKSLISTVIEW_H
-#define UIXCALTASKSLISTVIEW_H
+#ifndef UIXCALLISTINGACTIONVIEW_H
+#define UIXCALLISTINGACTIONVIEW_H
#import <NGObjWeb/WODirectAction.h>
-@class WOResponse;
+@class NSCalendarDate;
+@class NSMutableDictionary;
+@class NSString;
+@class NSTimeZone;
-@interface UIxCalTasksListView : WODirectAction
+@class SOGoDateFormatter;
+@class WOResponse;
+@class WORequest;
+
+@interface UIxCalListingActions : WODirectAction
+{
+ NSMutableDictionary *componentsData;
+ NSCalendarDate *startDate;
+ NSCalendarDate *endDate;
+ NSString *userLogin;
+ WORequest *request;
+ SOGoDateFormatter *dateFormatter;
+}
+
+- (WOResponse *) eventsListAction;
- (WOResponse *) tasksListAction;
@end
-#endif /* UIXCALTASKSLIST_H */
+#endif /* UIXCALLISTINGACTION_H */
--- /dev/null
+/* UIxCalListingActions.m - this file is part of SOGo
+ *
+ * Copyright (C) 2006 Inverse groupe conseil
+ *
+ * Author: Wolfgang Sourdeau <wsourdeau@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.
+ */
+
+#import <Foundation/NSArray.h>
+#import <Foundation/NSDictionary.h>
+#import <Foundation/NSEnumerator.h>
+#import <Foundation/NSNull.h>
+#import <Foundation/NSString.h>
+
+#import <NGObjWeb/WOContext.h>
+#import <NGObjWeb/WOContext+SoObjects.h>
+#import <NGObjWeb/WORequest.h>
+#import <NGObjWeb/WOResponse.h>
+#import <NGExtensions/NSCalendarDate+misc.h>
+
+#import <SoObjects/SOGo/SOGoUser.h>
+#import <SoObjects/SOGo/NSCalendarDate+SOGo.h>
+#import <SoObjects/SOGo/NSArray+Utilities.h>
+#import <SoObjects/SOGo/NSObject+Utilities.h>
+#import <SoObjects/Appointments/SOGoAppointmentFolder.h>
+
+#import "../SOGoUI/SOGoDateFormatter.h"
+
+#import "UIxCalListingActions.h"
+
+@implementation UIxCalListingActions
+
+- (id) initWithRequest: (WORequest *) newRequest
+{
+ NSDictionary *locale;
+
+ if ((self = [super initWithRequest: newRequest]))
+ {
+ componentsData = [NSMutableDictionary new];
+ startDate = nil;
+ endDate = nil;
+ ASSIGN (request, newRequest);
+ locale = [[self context] valueForKey: @"locale"];
+ dateFormatter = [[SOGoDateFormatter alloc] initWithLocale: locale];
+ [dateFormatter setFullWeekdayNameAndDetails];
+ }
+
+ return self;
+}
+
+- (void) dealloc
+{
+ [dateFormatter release];
+ [request release];
+ [componentsData release];
+ [startDate release];
+ [endDate release];
+ [super dealloc];
+}
+
+- (void) _setupDatesWithPopup: (NSString *) popupValue
+ andUserTZ: (NSTimeZone *) userTZ
+{
+ NSCalendarDate *newDate;
+ NSString *param;
+
+ if ([popupValue isEqualToString: @"view_today"])
+ {
+ newDate = [NSCalendarDate calendarDate];
+ [newDate setTimeZone: userTZ];
+ startDate = [newDate beginOfDay];
+ endDate = [newDate endOfDay];
+ }
+ else if ([popupValue isEqualToString: @"view_all"])
+ {
+ startDate = nil;
+ endDate = nil;
+ }
+ else if ([popupValue isEqualToString: @"view_next7"])
+ {
+ newDate = [NSCalendarDate calendarDate];
+ [newDate setTimeZone: userTZ];
+ startDate = [newDate beginOfDay];
+ endDate = [[startDate dateByAddingYears: 0 months: 0 days: 6] endOfDay];
+ }
+ else if ([popupValue isEqualToString: @"view_next14"])
+ {
+ newDate = [NSCalendarDate calendarDate];
+ [newDate setTimeZone: userTZ];
+ startDate = [newDate beginOfDay];
+ endDate = [[startDate dateByAddingYears: 0 months: 0 days: 13] endOfDay];
+ }
+ else if ([popupValue isEqualToString: @"view_next31"])
+ {
+ newDate = [NSCalendarDate calendarDate];
+ [newDate setTimeZone: userTZ];
+ startDate = [newDate beginOfDay];
+ endDate = [[startDate dateByAddingYears: 0 months: 0 days: 30] endOfDay];
+ }
+ else if ([popupValue isEqualToString: @"view_thismonth"])
+ {
+ newDate = [NSCalendarDate calendarDate];
+ [newDate setTimeZone: userTZ];
+ startDate = [[newDate firstDayOfMonth] beginOfDay];
+ endDate = [[newDate lastDayOfMonth] endOfDay];
+ }
+ else if ([popupValue isEqualToString: @"view_future"])
+ {
+ newDate = [NSCalendarDate calendarDate];
+ [newDate setTimeZone: userTZ];
+ startDate = [newDate beginOfDay];
+ endDate = [NSCalendarDate distantFuture];
+ }
+ else if ([popupValue isEqualToString: @"view_selectedday"])
+ {
+ param = [request formValueForKey: @"day"];
+ if ([param length] > 0)
+ startDate = [[NSCalendarDate dateFromShortDateString: param
+ andShortTimeString: nil
+ inTimeZone: userTZ] beginOfDay];
+ else
+ {
+ newDate = [NSCalendarDate calendarDate];
+ [newDate setTimeZone: userTZ];
+ startDate = [newDate beginOfDay];
+ }
+ endDate = [startDate endOfDay];
+ }
+}
+
+- (void) _setupContext
+{
+ SOGoUser *user;
+ NSTimeZone *userTZ;
+ NSString *param;
+
+ user = [context activeUser];
+ userLogin = [user login];
+ userTZ = [user timeZone];
+
+ param = [request formValueForKey: @"filterpopup"];
+ if ([param length] > 0)
+ [self _setupDatesWithPopup: param andUserTZ: userTZ];
+ else
+ {
+ param = [request formValueForKey: @"sd"];
+ if ([param length] > 0)
+ startDate = [[NSCalendarDate dateFromShortDateString: param
+ andShortTimeString: nil
+ inTimeZone: userTZ] beginOfDay];
+ else
+ startDate = nil;
+
+ param = [request formValueForKey: @"ed"];
+ if ([param length] > 0)
+ endDate = [[NSCalendarDate dateFromShortDateString: param
+ andShortTimeString: nil
+ inTimeZone: userTZ] endOfDay];
+ else
+ endDate = nil;
+ }
+}
+
+- (void) _updatePrivacyInComponent: (NSMutableDictionary *) component
+ fromFolder: (SOGoAppointmentFolder *) folder
+{
+ int privacyFlag;
+ NSString *roleString;
+
+ privacyFlag = [[component objectForKey: @"classification"] intValue];
+ roleString = [folder roleForComponentsWithAccessClass: privacyFlag
+ forUser: userLogin];
+ if ([roleString isEqualToString: @"ComponentDAndTViewer"])
+ {
+ [component setObject: @"" forKey: @"title"];
+ [component setObject: @"" forKey: @"location"];
+ }
+}
+
+- (SOGoAppointmentFolder *) _aptFolder: (NSString *) folder
+ withClientObject: (SOGoAppointmentFolder *) clientObject
+{
+ SOGoAppointmentFolder *aptFolder;
+ NSArray *folderParts;
+
+ if ([folder isEqualToString: @"/"])
+ aptFolder = clientObject;
+ else
+ {
+ folderParts = [folder componentsSeparatedByString: @":"];
+ aptFolder
+ = [clientObject lookupCalendarFolderForUID:
+ [folderParts objectAtIndex: 0]];
+ }
+
+ return aptFolder;
+}
+
+- (NSArray *) _activeCalendarFolders
+{
+ NSMutableArray *activeFolders;
+ NSEnumerator *folders;
+ NSDictionary *currentFolderDict;
+ SOGoAppointmentFolder *currentFolder, *clientObject;
+
+ activeFolders = [NSMutableArray new];
+ [activeFolders autorelease];
+
+ clientObject = [self clientObject];
+
+ folders = [[clientObject calendarFolders] objectEnumerator];
+ currentFolderDict = [folders nextObject];
+ while (currentFolderDict)
+ {
+ if ([[currentFolderDict objectForKey: @"active"] boolValue])
+ {
+ currentFolder
+ = [self _aptFolder: [currentFolderDict objectForKey: @"folder"]
+ withClientObject: clientObject];
+ [activeFolders addObject: currentFolder];
+ }
+
+ currentFolderDict = [folders nextObject];
+ }
+
+ return activeFolders;
+}
+
+- (NSArray *) _fetchFields: (NSArray *) fields
+ forComponentOfType: (NSString *) component
+{
+ NSEnumerator *folders, *currentInfos;
+ SOGoAppointmentFolder *currentFolder;
+ NSMutableDictionary *infos, *currentInfo, *newInfo;
+ NSString *owner, *uid;
+ NSNull *marker;
+
+ marker = [NSNull null];
+
+ infos = [NSMutableDictionary dictionary];
+ folders = [[self _activeCalendarFolders] objectEnumerator];
+ currentFolder = [folders nextObject];
+ while (currentFolder)
+ {
+ owner = [currentFolder ownerInContext: context];
+ currentInfos = [[currentFolder fetchCoreInfosFrom: startDate
+ to: endDate
+ component: component] objectEnumerator];
+ newInfo = [currentInfos nextObject];
+ while (newInfo)
+ {
+ uid = [newInfo objectForKey: @"uid"];
+ currentInfo = [infos objectForKey: uid];
+ if (!currentInfo
+ || [owner isEqualToString: userLogin])
+ {
+ [self _updatePrivacyInComponent: newInfo
+ fromFolder: currentFolder];
+ [newInfo setObject: owner forKey: @"owner"];
+ [infos setObject: [newInfo objectsForKeys: fields
+ notFoundMarker: marker]
+ forKey: uid];
+ }
+ newInfo = [currentInfos nextObject];
+ }
+ currentFolder = [folders nextObject];
+ }
+
+ return [infos allValues];
+}
+
+- (WOResponse *) _responseWithData: (NSArray *) data
+{
+ WOResponse *response;
+
+ response = [context response];
+ [response setHeader: @"text/plain; charset=utf-8"
+ forKey: @"content-type"];
+ [response setStatus: 200];
+ [response appendContentString: [data jsonRepresentation]];
+
+ return response;
+}
+
+- (WOResponse *) eventsListAction
+{
+ NSArray *fields, *oldEvent;
+ NSEnumerator *events;
+ NSString *date;
+ NSMutableArray *newEvents, *newEvent;
+ unsigned int interval;
+
+ [self _setupContext];
+
+ newEvents = [NSMutableArray array];
+ fields = [NSArray arrayWithObjects: @"c_name", @"owner", @"status",
+ @"title", @"startdate", @"enddate", @"location",
+ @"isallday", nil];
+ events = [[self _fetchFields: fields
+ forComponentOfType: @"vevent"] objectEnumerator];
+ oldEvent = [events nextObject];
+ while (oldEvent)
+ {
+ newEvent = [NSMutableArray arrayWithArray: oldEvent];
+ interval = [[oldEvent objectAtIndex: 4] intValue];
+ date = [dateFormatter stringForSecondsSinceThe70s: interval];
+ [newEvent addObject: date];
+ interval = [[oldEvent objectAtIndex: 5] intValue];
+ date = [dateFormatter stringForSecondsSinceThe70s: interval];
+ [newEvent addObject: date];
+ [newEvents addObject: newEvent];
+
+ oldEvent = [events nextObject];
+ }
+
+ return [self _responseWithData: newEvents];
+}
+
+- (NSString *) _getStatusClassForStatusCode: (int) statusCode
+ andEndDateStamp: (unsigned int) endDateStamp
+{
+ NSCalendarDate *taskDate, *now;
+ NSString *statusClass;
+
+ if (statusCode == 1)
+ statusClass = @"completed";
+ else
+ {
+ if (endDateStamp)
+ {
+ now = [NSCalendarDate calendarDate];
+ taskDate
+ = [NSCalendarDate dateWithTimeIntervalSince1970: endDateStamp];
+ if ([taskDate earlierDate: now] == taskDate)
+ statusClass = @"overdue";
+ else
+ {
+ if ([taskDate isToday])
+ statusClass = @"duetoday";
+ else
+ statusClass = @"duelater";
+ }
+ }
+ else
+ statusClass = @"duelater";
+ }
+
+ return statusClass;
+}
+
+- (WOResponse *) tasksListAction
+{
+ NSEnumerator *tasks;
+ NSMutableArray *filteredTasks, *filteredTask;
+ BOOL showCompleted;
+ NSArray *fields, *task;
+ int statusCode;
+ unsigned int endDateStamp;
+ NSString *statusFlag;
+
+ filteredTasks = [NSMutableArray array];
+
+ [self _setupContext];
+
+ fields = [NSArray arrayWithObjects: @"c_name", @"owner", @"status",
+ @"title", @"enddate", nil];
+
+ tasks = [[self _fetchFields: fields
+ forComponentOfType: @"vtodo"] objectEnumerator];
+ showCompleted = [[request formValueForKey: @"show-completed"] intValue];
+
+ task = [tasks nextObject];
+ while (task)
+ {
+ statusCode = [[task objectAtIndex: 2] intValue];
+ if (statusCode != 1 || showCompleted)
+ {
+ filteredTask = [NSMutableArray arrayWithArray: task];
+ endDateStamp = [[task objectAtIndex: 4] intValue];
+ statusFlag = [self _getStatusClassForStatusCode: statusCode
+ andEndDateStamp: endDateStamp];
+ [filteredTask addObject: statusFlag];
+ [filteredTasks addObject: filteredTask];
+ }
+ task = [tasks nextObject];
+ }
+
+ return [self _responseWithData: filteredTasks];
+}
+
+// - (BOOL) shouldDisplayCurrentTask
+// {
+// if (!knowsToShow)
+// {
+// showCompleted
+// = [[self queryParameterForKey: @"show-completed"] intValue];
+// knowsToShow = YES;
+// }
+
+// return ([[currentTask objectForKey: @"status"] intValue] != 1
+// || showCompleted);
+// }
+
+// - (BOOL) shouldShowCompletedTasks
+// {
+// if (!knowsToShow)
+// {
+// showCompleted
+// = [[self queryParameterForKey: @"show-completed"] intValue];
+// knowsToShow = YES;
+// }
+
+// return showCompleted;
+// }
+
+@end
NSArray *currentTableColumn;
}
-- (id <WOActionResults>) defaultAction;
-
- (NSDictionary *) monthBeforePrevMonthQueryParameters;
- (NSDictionary *) prevMonthQueryParameters;
- (NSDictionary *) nextMonthQueryParameters;
[super dealloc];
}
-- (void) _addEventToSortedEvents: (NSDictionary *) newEvent
-{
- NSMutableArray *eventArray;
- NSString *dayId;
-
- dayId = [[newEvent objectForKey: @"startDate"] shortDateString];
- eventArray = [sortedAppointments objectForKey: dayId];
- if (!eventArray)
- {
- eventArray = [NSMutableArray new];
- [eventArray autorelease];
- [sortedAppointments setObject: eventArray forKey: dayId];
- }
- [eventArray addObject: newEvent];
-}
-
-- (id <WOActionResults>) defaultAction
-{
- NSEnumerator *events;
- NSDictionary *currentEvent;
-
- events = [[self fetchCoreAppointmentsInfos] objectEnumerator];
- currentEvent = [events nextObject];
- while (currentEvent)
- {
- [self _addEventToSortedEvents: currentEvent];
- currentEvent = [events nextObject];
-// NSLog (@"event:\n'%@'", currentEvent);
- }
-
- return self;
-}
-
- (NSArray *) headerDaysToDisplay
{
NSMutableArray *headerDaysToDisplay;
NSString *currentTableHour;
NSMutableArray *subscriptionUsers;
NSMutableArray *hoursToDisplay;
- NSArray *allAppointments;
+// NSArray *allAppointments;
NSString *currentTableUser;
- NSDictionary *currentAppointment;
+// NSDictionary *currentAppointment;
NSString *cssClass;
NSString *cssId;
- (void) setCurrentTableUser: (NSString *) aTableDay;
- (NSString *) currentTableUser;
-- (void) setCurrentAppointment: (NSDictionary *) newCurrentAppointment;
-- (NSDictionary *) currentAppointment;
+// - (void) setCurrentAppointment: (NSDictionary *) newCurrentAppointment;
+// - (NSDictionary *) currentAppointment;
@end
{
if ((self = [super init]))
{
- allAppointments = nil;
+// allAppointments = nil;
subscriptionUsers = nil;
hoursToDisplay = nil;
currentTableUser = nil;
currentTableHour = nil;
- dateFormatter = [[SOGoDateFormatter alloc]
- initWithLocale: [self locale]];
+// dateFormatter = [[SOGoDateFormatter alloc]
+// initWithLocale: [self locale]];
}
return self;
- (void) dealloc
{
- if (allAppointments)
- [allAppointments release];
- if (subscriptionUsers)
- [subscriptionUsers release];
- if (hoursToDisplay)
- [hoursToDisplay release];
- [dateFormatter release];
+// [allAppointments release];
+ [subscriptionUsers release];
+ [hoursToDisplay release];
+// [dateFormatter release];
[super dealloc];
}
/* fetching */
-- (NSCalendarDate *) startDate
-{
- return [[self selectedDate] beginOfDay];
-}
-
-- (NSCalendarDate *) endDate
-{
- return [[self selectedDate] endOfDay];
-}
-
-- (NSArray *) appointmentsForCurrentUser
-{
- NSMutableArray *filteredAppointments;
- NSEnumerator *aptsEnumerator;
- NSDictionary *userAppointment;
- NSCalendarDate *start, *end;
- int endHour;
-
- if (!allAppointments)
- {
- allAppointments = [self fetchCoreAppointmentsInfos];
- [allAppointments retain];
- }
-
- start = [[self selectedDate] hour: [self dayStartHour] minute: 0];
- endHour = [self dayEndHour];
- if (endHour < 24)
- end = [[self selectedDate] hour: [self dayEndHour] minute: 59];
- else
- end = [[[self selectedDate] tomorrow] hour: 0 minute: 0];
-
- filteredAppointments = [NSMutableArray new];
- [filteredAppointments autorelease];
-
- aptsEnumerator = [allAppointments objectEnumerator];
- userAppointment = [aptsEnumerator nextObject];
- while (userAppointment)
- {
- if ([[userAppointment objectForKey: @"owner"]
- isEqualToString: currentTableUser])
- [filteredAppointments
- addObject: [self _adjustedAppointment: userAppointment
- forStart: start andEnd: end]];
- userAppointment = [aptsEnumerator nextObject];
- }
-
- return filteredAppointments;
-}
-
-- (void) setCurrentAppointment: (NSDictionary *) newCurrentAppointment
-{
- currentAppointment = newCurrentAppointment;
-}
-
-- (NSDictionary *) currentAppointment
-{
- return currentAppointment;
-}
-
-- (NSString *) appointmentsClasses
-{
- return @"appointments appointmentsFor1Days";
-}
+// - (NSCalendarDate *) startDate
+// {
+// return [[self selectedDate] beginOfDay];
+// }
+
+// - (NSCalendarDate *) endDate
+// {
+// return [[self selectedDate] endOfDay];
+// }
+
+// - (NSArray *) appointmentsForCurrentUser
+// {
+// NSMutableArray *filteredAppointments;
+// NSEnumerator *aptsEnumerator;
+// NSDictionary *userAppointment;
+// NSCalendarDate *start, *end;
+// int endHour;
+
+// if (!allAppointments)
+// {
+// allAppointments = [self fetchCoreAppointmentsInfos];
+// [allAppointments retain];
+// }
+
+// start = [[self selectedDate] hour: [self dayStartHour] minute: 0];
+// endHour = [self dayEndHour];
+// if (endHour < 24)
+// end = [[self selectedDate] hour: [self dayEndHour] minute: 59];
+// else
+// end = [[[self selectedDate] tomorrow] hour: 0 minute: 0];
+
+// filteredAppointments = [NSMutableArray new];
+// [filteredAppointments autorelease];
+
+// aptsEnumerator = [allAppointments objectEnumerator];
+// userAppointment = [aptsEnumerator nextObject];
+// while (userAppointment)
+// {
+// if ([[userAppointment objectForKey: @"owner"]
+// isEqualToString: currentTableUser])
+// [filteredAppointments
+// addObject: [self _adjustedAppointment: userAppointment
+// forStart: start andEnd: end]];
+// userAppointment = [aptsEnumerator nextObject];
+// }
+
+// return filteredAppointments;
+// }
+
+// - (void) setCurrentAppointment: (NSDictionary *) newCurrentAppointment
+// {
+// currentAppointment = newCurrentAppointment;
+// }
+
+// - (NSDictionary *) currentAppointment
+// {
+// return currentAppointment;
+// }
+
+// - (NSString *) appointmentsClasses
+// {
+// return @"appointments appointmentsFor1Days";
+// }
- (NSString *) currentUserClasses
{
+++ /dev/null
-/* UIxCalTasksListView.m - this file is part of SOGo
- *
- * Copyright (C) 2006 Inverse groupe conseil
- *
- * Author: Wolfgang Sourdeau <wsourdeau@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.
- */
-
-#import <Foundation/NSDate.h>
-#import <Foundation/NSDictionary.h>
-#import <Foundation/NSString.h>
-#import <Foundation/NSValue.h>
-
-#import <NGExtensions/NSCalendarDate+misc.h>
-#import <Appointments/SOGoAppointmentFolder.h>
-#import <SOGoUI/SOGoDateFormatter.h>
-
-#import "UIxCalTasksListView.h"
-
-@implementation UIxCalTasksListView
-
-- (id) init
-{
- if ((self = [super init]))
- {
- startDate = nil;
- endDate = nil;
- knowsToShow = NO;
- showCompleted = NO;
- }
-
- return self;
-}
-
-- (void) _updatePrivacyInObjects: (NSArray *) objectInfos
- fromFolder: (SOGoAppointmentFolder *) folder
-{
- int hideDetails[] = {-1, -1, -1};
- NSMutableDictionary *currentRecord;
- int privacyFlag;
- NSString *roleString, *userLogin;
- NSEnumerator *infos;
-
- userLogin = [[context activeUser] login];
- infos = [objectInfos objectEnumerator];
- currentRecord = [infos nextObject];
- while (currentRecord)
- {
- privacyFlag = [[currentRecord objectForKey: @"classification"] intValue];
- if (hideDetails[privacyFlag] == -1)
- {
- roleString = [folder roleForComponentsWithAccessClass: privacyFlag
- forUser: userLogin];
- hideDetails[privacyFlag] = ([roleString isEqualToString: @"ComponentDAndTViewer"]
- ? 1 : 0);
- }
- if (hideDetails[privacyFlag])
- {
- [currentRecord setObject: [self labelForKey: @"(Private Event)"]
- forKey: @"title"];
- [currentRecord setObject: @"" forKey: @"location"];
- }
- currentRecord = [infos nextObject];
- }
-}
-
-- (NSArray *) _fetchCoreInfosForComponent: (NSString *) component
-{
- NSArray *currentInfos;
- NSMutableArray *infos;
- NSEnumerator *folders;
- SOGoAppointmentFolder *currentFolder;
-
- infos = [componentsData objectForKey: component];
- if (!infos)
- {
- infos = [NSMutableArray array];
- folders = [[self _activeCalendarFolders] objectEnumerator];
- currentFolder = [folders nextObject];
- while (currentFolder)
- {
- currentInfos = [currentFolder fetchCoreInfosFrom: [[self startDate] beginOfDay]
- to: [[self endDate] endOfDay]
- component: component];
- [currentInfos makeObjectsPerform: @selector (setObject:forKey:)
- withObject: [currentFolder ownerInContext: nil]
- withObject: @"owner"];
- [self _updatePrivacyInObjects: currentInfos
- fromFolder: currentFolder];
- [infos addObjectsFromArray: currentInfos];
- currentFolder = [folders nextObject];
- }
- [componentsData setObject: infos forKey: component];
- }
-
- return infos;
-}
-
-- (NSArray *) fetchCoreAppointmentsInfos
-{
- if (!appointments)
- [self setAppointments: [self _fetchCoreInfosForComponent: @"vevent"]];
-
- return appointments;
-}
-
-- (WOResponse *) tasksListAction
-{
- WOResponse *response;
- NSDictionary *tasks;
- NSMutableArray *filteredTasks;
- BOOL showCompleted;
- unsigned i, count;
-
- response = [context response];
- filteredTasks = [NSMutableArray new];
- [filteredTasks autorelease];
- tasks = [self _fetchCoreInfosForComponent: @"vtodo"];
- showCompleted = [[self queryParameterForKey: @"show-completed"] intValue];
-
- count = [tasks count];
- for (i = 0; i < count; i++) {
- NSDictionary *task;
- NSArray *filteredTask;
-
- task = [tasks objectAtIndex: i];
-
- if ([[task objectForKey: @"status"] intValue] != 1
- || showCompleted)
- {
- filteredTask = [NSArray arrayWithObjects:
- [task objectForKey: @"c_name"],
- [task objectForKey: @"owner"],
- [task objectForKey: @"status"],
- [task objectForKey: @"title"],
- [self getStatusClassForTask: task],
- nil];
- [filteredTasks addObject: filteredTask];
- }
- }
-
- [response setStatus: 200];
- [response appendContentString: [filteredTasks jsonRepresentation]];
-
- return response;
-}
-
-- (BOOL) shouldDisplayCurrentTask
-{
- if (!knowsToShow)
- {
- showCompleted
- = [[self queryParameterForKey: @"show-completed"] intValue];
- knowsToShow = YES;
- }
-
- return ([[currentTask objectForKey: @"status"] intValue] != 1
- || showCompleted);
-}
-
-- (BOOL) shouldShowCompletedTasks
-{
- if (!knowsToShow)
- {
- showCompleted
- = [[self queryParameterForKey: @"show-completed"] intValue];
- knowsToShow = YES;
- }
-
- return showCompleted;
-}
-
-@end
- (NSCalendarDate *) startDate;
- (NSCalendarDate *) endDate;
-- (NSArray *) fetchCoreAppointmentsInfos;
-- (NSArray *) fetchCoreTasksInfos;
/* date selection */
return [[self startDate] tomorrow];
}
-- (SOGoAppointmentFolder *) _aptFolder: (NSString *) folder
- withClientObject: (SOGoAppointmentFolder *) clientObject
-{
- SOGoAppointmentFolder *aptFolder;
- NSArray *folderParts;
-
- if ([folder isEqualToString: @"/"])
- aptFolder = clientObject;
- else
- {
- folderParts = [folder componentsSeparatedByString: @":"];
- aptFolder
- = [clientObject lookupCalendarFolderForUID:
- [folderParts objectAtIndex: 0]];
- }
-
- return aptFolder;
-}
-
-- (NSArray *) _activeCalendarFolders
-{
- NSMutableArray *activeFolders;
- NSEnumerator *folders;
- NSDictionary *currentFolderDict;
- SOGoAppointmentFolder *currentFolder, *clientObject;
-
- activeFolders = [NSMutableArray new];
- [activeFolders autorelease];
-
- clientObject = [self clientObject];
-
- folders = [[clientObject calendarFolders] objectEnumerator];
- currentFolderDict = [folders nextObject];
- while (currentFolderDict)
- {
- if ([[currentFolderDict objectForKey: @"active"] boolValue])
- {
- currentFolder
- = [self _aptFolder: [currentFolderDict objectForKey: @"folder"]
- withClientObject: clientObject];
- [activeFolders addObject: currentFolder];
- }
-
- currentFolderDict = [folders nextObject];
- }
-
- return activeFolders;
-}
-
-- (void) _updatePrivacyInObjects: (NSArray *) objectInfos
- fromFolder: (SOGoAppointmentFolder *) folder
-{
- int hideDetails[] = {-1, -1, -1};
- NSMutableDictionary *currentRecord;
- int privacyFlag;
- NSString *roleString, *userLogin;
- NSEnumerator *infos;
-
- userLogin = [[context activeUser] login];
- infos = [objectInfos objectEnumerator];
- currentRecord = [infos nextObject];
- while (currentRecord)
- {
- privacyFlag = [[currentRecord objectForKey: @"classification"] intValue];
- if (hideDetails[privacyFlag] == -1)
- {
- roleString = [folder roleForComponentsWithAccessClass: privacyFlag
- forUser: userLogin];
- hideDetails[privacyFlag] = ([roleString isEqualToString: @"ComponentDAndTViewer"]
- ? 1 : 0);
- }
- if (hideDetails[privacyFlag])
- {
- [currentRecord setObject: [self labelForKey: @"(Private Event)"]
- forKey: @"title"];
- [currentRecord setObject: @"" forKey: @"location"];
- }
- currentRecord = [infos nextObject];
- }
-}
-
-- (NSArray *) _fetchCoreInfosForComponent: (NSString *) component
-{
- NSArray *currentInfos;
- NSMutableArray *infos;
- NSEnumerator *folders;
- SOGoAppointmentFolder *currentFolder;
-
- infos = [componentsData objectForKey: component];
- if (!infos)
- {
- infos = [NSMutableArray array];
- folders = [[self _activeCalendarFolders] objectEnumerator];
- currentFolder = [folders nextObject];
- while (currentFolder)
- {
- currentInfos = [currentFolder fetchCoreInfosFrom: [[self startDate] beginOfDay]
- to: [[self endDate] endOfDay]
- component: component];
- [currentInfos makeObjectsPerform: @selector (setObject:forKey:)
- withObject: [currentFolder ownerInContext: nil]
- withObject: @"owner"];
- [self _updatePrivacyInObjects: currentInfos
- fromFolder: currentFolder];
- [infos addObjectsFromArray: currentInfos];
- currentFolder = [folders nextObject];
- }
- [componentsData setObject: infos forKey: component];
- }
-
- return infos;
-}
-
-- (NSArray *) fetchCoreAppointmentsInfos
-{
- if (!appointments)
- [self setAppointments: [self _fetchCoreInfosForComponent: @"vevent"]];
-
- return appointments;
-}
-
-- (NSArray *) fetchCoreTasksInfos
-{
- if (!tasks)
- [self setTasks: [self _fetchCoreInfosForComponent: @"vtodo"]];
-
- return tasks;
-}
-
/* query parameters */
- (BOOL) shouldDisplayRejectedAppointments
-{
+{ /* -*-javascript-*- */
requires = ( MAIN, MainUI, CommonUI, Appointments, Contacts, ContactsUI );
publicResources = (
- previous_week.gif,
- next_week.gif,
- icon_view_overview.gif,
- icon_view_overview_inactive.gif,
- icon_view_chart.gif,
- icon_view_chart_inactive.gif,
- icon_view_list.gif,
- icon_view_list_inactive.gif,
- icon_view_columns.gif,
- icon_view_columns_inactive.gif,
- icon_popupcalendar.gif,
- first.gif,
- previous.gif,
- next.gif,
- last.gif,
- skycalendar.html,
- skycalendar.js,
- green_corner.gif,
- invisible_space_2.gif,
- cycles.plist,
+ previous_week.gif,
+ next_week.gif,
+ icon_view_overview.gif,
+ icon_view_overview_inactive.gif,
+ icon_view_chart.gif,
+ icon_view_chart_inactive.gif,
+ icon_view_list.gif,
+ icon_view_list_inactive.gif,
+ icon_view_columns.gif,
+ icon_view_columns_inactive.gif,
+ icon_popupcalendar.gif,
+ first.gif,
+ previous.gif,
+ next.gif,
+ last.gif,
+ skycalendar.html,
+ skycalendar.js,
+ green_corner.gif,
+ invisible_space_2.gif,
+ cycles.plist,
);
factories = {
};
categories = {
- SOGoAppointmentFolder = {
- slots = {
- toolbar = {
- protectedBy = "View";
- value = "SOGoAppointmentFolder.toolbar";
- };
- };
- methods = {
- view = {
- protectedBy = "View";
- pageName = "UIxCalMainView";
- };
- dateselector = {
- protectedBy = "View";
- pageName = "UIxCalDateSelector";
- };
- aptlist = {
- protectedBy = "View";
- pageName = "UIxCalAptListView";
- };
- taskslist = {
- protectedBy = "View";
- pageName = "UIxCalTasksListView";
- };
- dayview = {
- protectedBy = "View";
- pageName = "UIxCalDayView";
- };
- multicolumndayview = {
- protectedBy = "View";
- pageName = "UIxCalMulticolumnDayView";
- };
- weekview = {
- protectedBy = "View";
- pageName = "UIxCalWeekView";
- };
- monthview = {
- protectedBy = "View";
- pageName = "UIxCalMonthView";
- };
- newevent = {
- protectedBy = "Add Documents, Images, and Files";
- pageName = "UIxAppointmentEditor";
- actionName = "new";
- };
- newtask = {
- protectedBy = "Add Documents, Images, and Files";
- pageName = "UIxTaskEditor";
- actionName = "new";
- };
- show = {
- protectedBy = "View";
- pageName = "UIxCalView";
- actionName = "redirectForUIDs";
- };
- proposal = {
- protectedBy = "View";
- pageName = "UIxAppointmentProposal";
- };
- proposalSearch = {
- protectedBy = "View";
- pageName = "UIxAppointmentProposal";
- actionName = "proposalSearch";
- };
- batchDelete = {
- protectedBy = "Delete Objects";
- pageName = "UIxCalMainView";
- actionName = "batchDelete";
- };
- updateCalendars = {
- protectedBy = "View";
- pageName = "UIxCalMainView";
- actionName = "updateCalendars";
- };
- editAttendees = {
- protectedBy = "View";
- pageName = "UIxAttendeesEditor";
+ SOGoAppointmentFolder = {
+ slots = {
+ toolbar = {
+ protectedBy = "View";
+ value = "SOGoAppointmentFolder.toolbar";
+ };
};
- userRights = {
- protectedBy = "ReadAcls";
- pageName = "UIxCalUserRightsEditor";
- };
- saveUserRights = {
- protectedBy = "SaveAcls";
- pageName = "UIxCalUserRightsEditor";
- actionName = "saveUserRights";
+ methods = {
+ view = {
+ protectedBy = "View";
+ pageName = "UIxCalMainView";
+ };
+ dateselector = {
+ protectedBy = "View";
+ pageName = "UIxCalDateSelector";
+ };
+ eventslist = {
+ protectedBy = "View";
+ actionClass = "UIxCalListingActions";
+ actionName = "eventsList";
+ };
+ taskslist = {
+ protectedBy = "View";
+ actionClass = "UIxCalListingActions";
+ actionName = "tasksList";
+ };
+ dayview = {
+ protectedBy = "View";
+ pageName = "UIxCalDayView";
+ };
+ multicolumndayview = {
+ protectedBy = "View";
+ pageName = "UIxCalMulticolumnDayView";
+ };
+ weekview = {
+ protectedBy = "View";
+ pageName = "UIxCalWeekView";
+ };
+ monthview = {
+ protectedBy = "View";
+ pageName = "UIxCalMonthView";
+ };
+ newevent = {
+ protectedBy = "Add Documents, Images, and Files";
+ pageName = "UIxAppointmentEditor";
+ actionName = "new";
+ };
+ newtask = {
+ protectedBy = "Add Documents, Images, and Files";
+ pageName = "UIxTaskEditor";
+ actionName = "new";
+ };
+ show = {
+ protectedBy = "View";
+ pageName = "UIxCalView";
+ actionName = "redirectForUIDs";
+ };
+ proposal = {
+ protectedBy = "View";
+ pageName = "UIxAppointmentProposal";
+ };
+ proposalSearch = {
+ protectedBy = "View";
+ pageName = "UIxAppointmentProposal";
+ actionName = "proposalSearch";
+ };
+ batchDelete = {
+ protectedBy = "Delete Objects";
+ pageName = "UIxCalMainView";
+ actionName = "batchDelete";
+ };
+ updateCalendars = {
+ protectedBy = "View";
+ pageName = "UIxCalMainView";
+ actionName = "updateCalendars";
+ };
+ editAttendees = {
+ protectedBy = "View";
+ pageName = "UIxAttendeesEditor";
+ };
+ userRights = {
+ protectedBy = "ReadAcls";
+ pageName = "UIxCalUserRightsEditor";
+ };
+ saveUserRights = {
+ protectedBy = "SaveAcls";
+ pageName = "UIxCalUserRightsEditor";
+ actionName = "saveUserRights";
+ };
};
- };
- };
- SOGoCalendarComponent = {
- };
+ };
+ SOGoCalendarComponent = {
+ };
- SOGoAppointmentObject = {
- slots = {
- toolbar = {
- protectedBy = "View";
- value = "SOGoAppointmentObject.toolbar";
- };
- };
- methods = {
- view = {
- protectedBy = "ViewAllComponent";
- pageName = "UIxAppointmentView";
- };
- delete = {
- protectedBy = "Delete Objects";
- pageName = "UIxAppointmentView";
- actionName = "delete";
- };
- edit = {
- protectedBy = "ViewAllComponent";
- pageName = "UIxAppointmentEditor";
- };
- editAsAppointment = {
- protectedBy = "ViewAllComponent";
- pageName = "UIxAppointmentEditor";
- };
- save = {
- protectedBy = "ModifyComponent";
- pageName = "UIxAppointmentEditor";
- actionName = "save";
- };
- saveAsAppointment = {
- protectedBy = "ModifyComponent";
- pageName = "UIxAppointmentEditor";
- actionName = "save";
- };
- accept = {
- protectedBy = "RespondToComponent";
- pageName = "UIxAppointmentEditor";
- actionName = "accept";
- };
- decline = {
- protectedBy = "RespondToComponent";
- pageName = "UIxAppointmentEditor";
- actionName = "decline";
- };
- };
- };
+ SOGoAppointmentObject = {
+ slots = {
+ toolbar = {
+ protectedBy = "View";
+ value = "SOGoAppointmentObject.toolbar";
+ };
+ };
+ methods = {
+ view = {
+ protectedBy = "ViewAllComponent";
+ pageName = "UIxAppointmentView";
+ };
+ delete = {
+ protectedBy = "Delete Objects";
+ pageName = "UIxAppointmentView";
+ actionName = "delete";
+ };
+ edit = {
+ protectedBy = "ViewAllComponent";
+ pageName = "UIxAppointmentEditor";
+ };
+ editAsAppointment = {
+ protectedBy = "ViewAllComponent";
+ pageName = "UIxAppointmentEditor";
+ };
+ save = {
+ protectedBy = "ModifyComponent";
+ pageName = "UIxAppointmentEditor";
+ actionName = "save";
+ };
+ saveAsAppointment = {
+ protectedBy = "ModifyComponent";
+ pageName = "UIxAppointmentEditor";
+ actionName = "save";
+ };
+ accept = {
+ protectedBy = "RespondToComponent";
+ pageName = "UIxAppointmentEditor";
+ actionName = "accept";
+ };
+ decline = {
+ protectedBy = "RespondToComponent";
+ pageName = "UIxAppointmentEditor";
+ actionName = "decline";
+ };
+ };
+ };
- SOGoTaskObject = {
- slots = {
- toolbar = {
- protectedBy = "View";
- value = "SOGoAppointmentObject.toolbar";
- };
- };
- methods = {
- view = {
- protectedBy = "ViewAllComponent";
- pageName = "UIxTaskView";
- };
- delete = {
- protectedBy = "Delete Objects";
- pageName = "UIxTaskView";
- actionName = "delete";
- };
- edit = {
- protectedBy = "ViewAllComponent";
- pageName = "UIxTaskEditor";
- };
- editAsTask = {
- protectedBy = "ViewAllComponent";
- pageName = "UIxTaskEditor";
- };
- save = {
- protectedBy = "ModifyComponent";
- pageName = "UIxTaskEditor";
- actionName = "save";
- };
- saveAsTask = {
- protectedBy = "ModifyComponent";
- pageName = "UIxTaskEditor";
- actionName = "save";
- };
- changeStatus = {
- protectedBy = "ModifyComponent";
- pageName = "UIxTaskEditor";
- actionName = "changeStatus";
- };
- accept = {
- protectedBy = "RespondToComponent";
- pageName = "UIxTaskEditor";
- actionName = "accept";
- };
- decline = {
- protectedBy = "RespondToComponent";
- pageName = "UIxTaskEditor";
- actionName = "decline";
- };
- };
- };
+ SOGoTaskObject = {
+ slots = {
+ toolbar = {
+ protectedBy = "View";
+ value = "SOGoAppointmentObject.toolbar";
+ };
+ };
+ methods = {
+ view = {
+ protectedBy = "ViewAllComponent";
+ pageName = "UIxTaskView";
+ };
+ delete = {
+ protectedBy = "Delete Objects";
+ pageName = "UIxTaskView";
+ actionName = "delete";
+ };
+ edit = {
+ protectedBy = "ViewAllComponent";
+ pageName = "UIxTaskEditor";
+ };
+ editAsTask = {
+ protectedBy = "ViewAllComponent";
+ pageName = "UIxTaskEditor";
+ };
+ save = {
+ protectedBy = "ModifyComponent";
+ pageName = "UIxTaskEditor";
+ actionName = "save";
+ };
+ saveAsTask = {
+ protectedBy = "ModifyComponent";
+ pageName = "UIxTaskEditor";
+ actionName = "save";
+ };
+ changeStatus = {
+ protectedBy = "ModifyComponent";
+ pageName = "UIxTaskEditor";
+ actionName = "changeStatus";
+ };
+ accept = {
+ protectedBy = "RespondToComponent";
+ pageName = "UIxTaskEditor";
+ actionName = "accept";
+ };
+ decline = {
+ protectedBy = "RespondToComponent";
+ pageName = "UIxTaskEditor";
+ actionName = "decline";
+ };
+ };
+ };
};
}
<var:popup list="filters"
item="filter" string="filterLabel" value="filter"
selection="selectedFilter"
- const:name="filterpopup"
- const:onchange="document.pageform.submit()" />
+ const:name="filterpopup" />
</var:if>
</div>
</container>
const:href="view"
var:queryDictionary="context.request.formValues"
/></td
- ><td class="tbtv_headercell"
+ ><td class="tbtv_headercell tbtv_from_headercell"
><var:if condition="showToAddress" const:negate="YES"
><var:component className="UIxSortableTableHeader"
label:label="From"
><td class="tbtv_headercell messageFlagColumn"
><img rsrc:src="title_read_14x14.png" width="14" height="14"
/></td
- ><td class="tbtv_headercell"
+ ><td class="tbtv_headercell tbtv_date_headercell"
><var:component className="UIxSortableTableHeader"
label:label="Date"
const:sortKey="date"
var currentIndex = <var:string value="currentIndex" />;
</script>
<script type="text/javascript" rsrc:src="UIxMailToSelection.js"> <!-- Space! --></script>
- <script type="text/javascript" rsrc:src="layout2or3_xlib.js"> <!-- Space! --></script>
<div id="addressList"
><var:foreach list="addressLists" item="addressList"
</var:foreach>
<div class="addressListElement" id="lastRow">
<span class="headerField">
- <select disabled="1">
- <option value="to"><var:string label:value="to" />:</option>
- </select>
+ <var:popup name="currentPopUpId"
+ const:disabled="1"
+ list="headers"
+ item="item"
+ label:string="$item"
+ />
</span>
<span class="headerInput">
<input onfocus="fancyAddRow(true,'');"
<a href="#" onclick="checkAddresses();">check addresses</a>
</var:if>-->
</div>
- <span id="addr_addresses" style="display: none; visibility: hidden;"><var:foreach list="addressLists" item="addressList"><var:foreach list="addressList" item="address"><span var:id="address" /></var:foreach></var:foreach>
- </span>
+ <span id="addr_addresses" style="display: none; visibility: hidden;"><var:foreach list="addressLists" item="addressList"><var:foreach list="addressList" item="address"><span var:id="address"><!-- Space! --></span></var:foreach></var:foreach></span>
</container>
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:" />
+++ /dev/null
-<?xml version="1.0" standalone="yes"?>
- <table id="appointmentsList" multiselect="yes"
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:var="http://www.skyrix.com/od/binding"
- xmlns:const="http://www.skyrix.com/od/constant"
- xmlns:rsrc="OGo:url"
- xmlns:label="OGo:label">
- <tr class="tableview"
- ><td class="tbtv_headercell tbtv_subject_headercell"
- ><var:component className="UIxSortableTableHeader"
- label:label="Title"
- const:sortKey="Title"
- const:href="aptlist"
- var:queryDictionary="context.request.formValues"
- /></td
- ><td class="tbtv_headercell headerDateTime"
- ><var:component className="UIxSortableTableHeader"
- label:label="Start"
- const:sortKey="Start"
- const:href="aptlist"
- var:queryDictionary="context.request.formValues"
- /></td
- ><td class="tbtv_headercell headerDateTime"
- ><var:component className="UIxSortableTableHeader"
- label:label="End"
- const:sortKey="End"
- const:href="aptlist"
- var:queryDictionary="context.request.formValues"
- /></td
- ><td class="tbtv_headercell headerLocation"
- ><var:component className="UIxSortableTableHeader"
- label:label="Location"
- const:sortKey="Location"
- const:href="aptlist"
- var:queryDictionary="context.request.formValues"
- /></td
- ></tr>
-
- <var:foreach list="fetchCoreAppointmentsInfos" item="currentAppointment"
- ><tr class="tableview appointmentRow"
- var:id="currentAppointment.c_name"
- var:owner="currentAppointment.owner"
- onclick="return onAppointmentClick(event);"
- ondblclick="return editDoubleClickedEvent(this);"
- oncontextmenu="return onAppointmentContextMenu(event, this);"
- var:day="currentSerialDay"
- var:hour="currentSerialHour"
- ><td onmousedown="return false;"
- class="subjectCell"
- ><var:string value="currentAppointment.title"
- const:escapeHTML="NO"
- /></td
- ><td onmousedown="return false;"
- ><var:string value="currentStartTime"/></td
- ><td onmousedown="return false;"
- ><var:string value="currentEndTime"/></td
- ><td onmousedown="return false;"
- ><var:string value="currentLocation" /></td
- ></tr
- ></var:foreach>
- </table>
<?xml version="1.0" standalone="yes"?>
- <container
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:var="http://www.skyrix.com/od/binding"
- xmlns:const="http://www.skyrix.com/od/constant"
- xmlns:rsrc="OGo:url"
- xmlns:label="OGo:label">
- <div id="daysView" var:class="daysViewClasses">
- <div class="hours">
- <var:foreach list="hoursToDisplay" item="currentTableHour"
- ><div class="hour"><var:string value="currentTableHour" />:00</div
- ></var:foreach>
- </div>
+<!DOCTYPE container>
+<container
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:var="http://www.skyrix.com/od/binding"
+ xmlns:const="http://www.skyrix.com/od/constant"
+ xmlns:rsrc="OGo:url"
+ xmlns:label="OGo:label">
+ <div id="calendarHeader" var:class="daysViewClasses">
+ <div class="dayLabels"
+ ><var:foreach list="daysToDisplay" item="currentTableDay"
+ ><div var:class="dayClasses"
+ ><var:string value="labelForDate"/><br
+ /><span class="dayOfWeek"><var:string value="labelForDay"/></span
+ ></div
+ ></var:foreach>
+ </div>
+ <div class="days"
+ ><var:foreach list="daysToDisplay" item="currentTableDay"
+ ><div var:class="dayClasses"
+ var:day="currentTableDay.shortDateString"
+ ><!-- space --></div
+ ></var:foreach
+ ></div>
+ </div>
+
+ <div id="daysView" var:class="daysViewClasses">
+ <div class="hours">
+ <var:foreach list="hoursToDisplay" item="currentTableHour"
+ ><div class="hour"><var:string value="currentTableHour" />:00</div
+ ></var:foreach>
+ </div>
- <div class="hourLines">
- <div class="hourLine hourLine0"><!-- space --></div
- ><div class="hourLine hourLine1"><!-- space --></div
- ><div class="hourLine hourLine2"><!-- space --></div
- ><div class="hourLine hourLine3"><!-- space --></div
- ><div class="hourLine hourLine4"><!-- space --></div
- ><div class="hourLine hourLine5"><!-- space --></div
- ><div class="hourLine hourLine6"><!-- space --></div
- ><div class="hourLine hourLine7"><!-- space --></div
- ><div class="hourLine hourLine8"><!-- space --></div
- ><div class="hourLine hourLine9"><!-- space --></div
- ><div class="hourLine hourLine10"><!-- space --></div
- ><div class="hourLine hourLine11"><!-- space --></div
- ><div class="hourLine hourLine12"><!-- space --></div
- ><div class="hourLine hourLine13"><!-- space --></div
- ><div class="hourLine hourLine14"><!-- space --></div
- ><div class="hourLine hourLine15"><!-- space --></div
- ><div class="hourLine hourLine16"><!-- space --></div
- ><div class="hourLine hourLine17"><!-- space --></div
- ><div class="hourLine hourLine18"><!-- space --></div
- ><div class="hourLine hourLine19"><!-- space --></div
- ><div class="hourLine hourLine20"><!-- space --></div
- ><div class="hourLine hourLine21"><!-- space --></div
- ><div class="hourLine hourLine22"><!-- space --></div
- ><div class="hourLine hourLine23"><!-- space --></div>
- </div>
+ <div class="days">
+ <var:foreach list="daysToDisplay" item="currentTableDay"
+ ><div var:class="dayClasses"
+ var:day="currentTableDay.shortDateString"
+ >
+ <div class="events">
+ <var:foreach list="hoursToDisplay" item="currentTableHour"
+ ><div var:class="clickableHourCellClass"
+ var:day="currentTableDay.shortDateString"
+ var:hour="currentAppointmentHour">
+ </div></var:foreach>
+ <!-- <var:foreach list="appointmentsForCurrentDay" item="currentAppointment"
+ ><var:component className="UIxCalInlineAptView"
+ dayStartHour="dayStartHour"
+ dayEndHour="dayEndHour"
+ appointment="currentAppointment"
+ formatter="aptFormatter"
+ tooltipFormatter="aptTooltipFormatter"
+ url="appointmentViewURL"
+ const:style="dayoverview"
+ queryDictionary="currentDateQueryParameters"
+ referenceDate="selectedDate"
+ canAccess="canAccessApt"
+ /></var:foreach
+ > -->
+ </div>
+ </div>
+ </var:foreach>
+ </div>
- <div class="days">
- <var:foreach list="daysToDisplay" item="currentTableDay"
- ><div var:class="dayClasses"
- var:day="currentTableDay.shortDateString"
- ><div class="header"><var:string value="labelForDay"
- const:escapeHTML="NO"/></div>
- <div class="appointments">
- <var:foreach list="hoursToDisplay" item="currentTableHour"
- ><div var:class="clickableHourCellClass"
- var:day="currentTableDay.shortDateString"
- var:hour="currentAppointmentHour">
- </div></var:foreach>
- <var:foreach list="appointmentsForCurrentDay" item="currentAppointment"
- ><var:component className="UIxCalInlineAptView"
- dayStartHour="dayStartHour"
- dayEndHour="dayEndHour"
- appointment="currentAppointment"
- formatter="aptFormatter"
- tooltipFormatter="aptTooltipFormatter"
- url="appointmentViewURL"
- const:style="dayoverview"
- queryDictionary="currentDateQueryParameters"
- referenceDate="selectedDate"
- canAccess="canAccessApt"
- /></var:foreach
- >
- </div>
- </div>
- </var:foreach>
- </div>
+ <div class="hourLines">
+ <div class="hourLine hourLine0"><!-- space --></div
+ ><div class="hourLine hourLine1"><!-- space --></div
+ ><div class="hourLine hourLine2"><!-- space --></div
+ ><div class="hourLine hourLine3"><!-- space --></div
+ ><div class="hourLine hourLine4"><!-- space --></div
+ ><div class="hourLine hourLine5"><!-- space --></div
+ ><div class="hourLine hourLine6"><!-- space --></div
+ ><div class="hourLine hourLine7"><!-- space --></div
+ ><div class="hourLine hourLine8"><!-- space --></div
+ ><div class="hourLine hourLine9"><!-- space --></div
+ ><div class="hourLine hourLine10"><!-- space --></div
+ ><div class="hourLine hourLine11"><!-- space --></div
+ ><div class="hourLine hourLine12"><!-- space --></div
+ ><div class="hourLine hourLine13"><!-- space --></div
+ ><div class="hourLine hourLine14"><!-- space --></div
+ ><div class="hourLine hourLine15"><!-- space --></div
+ ><div class="hourLine hourLine16"><!-- space --></div
+ ><div class="hourLine hourLine17"><!-- space --></div
+ ><div class="hourLine hourLine18"><!-- space --></div
+ ><div class="hourLine hourLine19"><!-- space --></div
+ ><div class="hourLine hourLine20"><!-- space --></div
+ ><div class="hourLine hourLine21"><!-- space --></div
+ ><div class="hourLine hourLine22"><!-- space --></div
+ ><div class="hourLine hourLine23"><!-- space --></div>
</div>
- </container>
+ </div>
+</container>
<?xml version="1.0" standalone="yes"?>
- <container
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:var="http://www.skyrix.com/od/binding"
- xmlns:const="http://www.skyrix.com/od/constant"
- xmlns:rsrc="OGo:url"
- xmlns:label="OGo:label">
- <a href="#"
- class="leftNavigationArrow"
- var:date="prevDayQueryParameters.day"
- onclick="return onCalendarGotoDay(this);"
- ><img rsrc:src="arrow-lft-sharp.gif"/></a>
- <span class="daysHeader">
- <span class="day2"><a href="#"
- var:date="dayBeforePrevDayQueryParameters.day"
- onclick="return onCalendarGotoDay(this);"
- ><var:string value="dayBeforeYesterdayName"
- /></a></span
- ><span class="day1"><a href="#"
- var:date="prevDayQueryParameters.day"
- onclick="return onCalendarGotoDay(this);"
- ><var:string value="yesterdayName"
- /></a></span
- ><span class="day0"><var:string value="currentDayName" /></span
- ><span class="day1"><a href="#"
- var:date="nextDayQueryParameters.day"
- onclick="return onCalendarGotoDay(this);"
- ><var:string value="tomorrowName"
- /></a></span
- ><span class="day2"><a href="#"
- var:date="dayAfterNextDayQueryParameters.day"
- onclick="return onCalendarGotoDay(this);"
- ><var:string value="dayAfterTomorrowName"
- /></a></span
- ></span>
- <a href="#"
- class="rightNavigationArrow"
- var:date="nextDayQueryParameters.day"
- onclick="return onCalendarGotoDay(this);"
- ><img rsrc:src="arrow-rit-sharp.gif"/></a>
-
- <div id="calendarContent">
- <var:component
- className="UIxCalDayTable"
- startDate="startDate"
- const:CSSClass="dayOverview"
- const:numberOfDays="1" />
- </div>
- </container>
+<!DOCTYPE container>
+<container
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:var="http://www.skyrix.com/od/binding"
+ xmlns:const="http://www.skyrix.com/od/constant"
+ xmlns:rsrc="OGo:url"
+ xmlns:label="OGo:label">
+ <a href="#"
+ class="leftNavigationArrow"
+ var:date="prevDayQueryParameters.day"
+ onclick="return onCalendarGotoDay(this);"
+ ><img rsrc:src="arrow-lft-sharp.gif"/></a>
+ <span class="daysHeader">
+ <span class="day2"><a href="#"
+ var:date="dayBeforePrevDayQueryParameters.day"
+ onclick="return onCalendarGotoDay(this);"
+ ><var:string value="dayBeforeYesterdayName"
+ /></a></span
+ ><span class="day1"><a href="#"
+ var:date="prevDayQueryParameters.day"
+ onclick="return onCalendarGotoDay(this);"
+ ><var:string value="yesterdayName"
+ /></a></span
+ ><span class="day0"><var:string value="currentDayName" /></span
+ ><span class="day1"><a href="#"
+ var:date="nextDayQueryParameters.day"
+ onclick="return onCalendarGotoDay(this);"
+ ><var:string value="tomorrowName"
+ /></a></span
+ ><span class="day2"><a href="#"
+ var:date="dayAfterNextDayQueryParameters.day"
+ onclick="return onCalendarGotoDay(this);"
+ ><var:string value="dayAfterTomorrowName"
+ /></a></span
+ ></span>
+ <a href="#"
+ class="rightNavigationArrow"
+ var:date="nextDayQueryParameters.day"
+ onclick="return onCalendarGotoDay(this);"
+ ><img rsrc:src="arrow-rit-sharp.gif"/></a>
+ <div id="calendarContent">
+ <var:component
+ className="UIxCalDayTable"
+ startDate="startDate"
+ const:CSSClass="dayOverview"
+ const:numberOfDays="1" />
+ </div>
+</container>
+++ /dev/null
-<?xml version='1.0' standalone='yes'?>
-<!DOCTYPE div>
-<div
- var:class="displayClasses"
- var:aptCName="appointment.c_name"
- var:owner="appointment.owner"
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:var="http://www.skyrix.com/od/binding"
- xmlns:const="http://www.skyrix.com/od/constant"
- xmlns:rsrc="OGo:url">
- <div class="shadow shadow1"><!-- space --></div
- ><div class="shadow shadow2"><!-- space --></div
- ><div class="shadow shadow3"><!-- space --></div
- ><div class="shadow shadow4"><!-- space --></div
- ><div var:class="innerDisplayClasses"
- ><div class="gradient"
- ><img rsrc:src="event-gradient.png" class="gradient"
- /></div
- ><div class="text"
- ><span class="eventHeader"><var:string value="startHour"
- const:escapeHTML="NO"
- /><var:if condition="appointment.iscycle"
- ><img rsrc:src="repeat-16.png" class="gradient"
- /></var:if
- ><var:if condition="appointment.hasalarm"
- ><img rsrc:src="alarm.png" class="gradient"
- /></var:if
- ></span
- ><br/><var:string value="appointment.title" const:escapeHTML="NO" />
- </div>
- </div>
-</div>
+++ /dev/null
-<?xml version='1.0' standalone='yes'?>
-<!DOCTYPE div>
-<div
- var:class="displayClasses"
- var:aptCName="appointment.c_name"
- var:owner="appointment.owner"
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:var="http://www.skyrix.com/od/binding"
- xmlns:const="http://www.skyrix.com/od/constant"
- xmlns:rsrc="OGo:url">
- <div class="shadow shadow1"><!-- space --></div
- ><div class="shadow shadow2"><!-- space --></div
- ><div class="shadow shadow3"><!-- space --></div
- ><div class="shadow shadow4"><!-- space --></div
- ><div var:class="innerDisplayClasses"
- ><div class="gradient"
- ><img rsrc:src="event-gradient.png" class="gradient"
- /></div
- ><div class="text"
- ><span class="eventHeader"><var:string value="startHour"
- const:escapeHTML="NO" />
- <var:string value="appointment.title" const:escapeHTML="NO"
- /></span></div>
- </div>
-</div>
></ul>
</div>
- <div class="menu" id="appointmentsListMenu">
+ <div class="menu" id="eventsListMenu">
<ul>
<li><var:string label:value="New Event..."/></li>
<li><!-- separator --></li>
var:calendarFolders="calendarFolders" /></div>
</div>
- <div id="tasksListView"
- ><var:component className="UIxCalTasksListView"
- /></div>
+ <div id="tasksListView">
+ <label><input id="showHideCompletedTasks"
+ type="checkbox" class="checkBox"
+ /><var:string label:value="Show completed tasks"/></label>
+ <ul id="tasksList"><!-- space --></ul>
+ </div>
</div>
<div id="verticalDragHandle" class="dragHandle"><!-- space --></div>
<div id="rightPanel">
<var:component className="UIxCalFilterPanel" />
- <div id="appointmentsListView"
- oncontextmenu="return onAppointmentContextMenu(event, this);"
- ><var:component className="UIxCalAptListView"
- /></div>
+ <div id="eventsListView">
+ <table id="eventsList">
+ <tr>
+ <td class="headerCell headerTitle"><span class="sortableTableHeader"><var:string label:value="Title"/></span></td>
+ <td class="headerCell headerDateTime"><span class="sortableTableHeader"><var:string label:value="Start"/></span></td>
+ <td class="headerCell headerDateTime"><span class="sortableTableHeader"><var:string label:value="End"/></span></td>
+ <td class="headerCell headerLocation"><span class="sortableTableHeader"><var:string label:value="Location"/></span></td>
+ </tr>
+ </table>
+ </div>
<div id="rightDragHandle" class="dragHandle"><!-- space --></div>
<div id="calendarView"><!-- space --></div>
</div>
><div var:class="headerDayCellClasses"
><var:string value="labelForCurrentDayToDisplay"
/></div></var:foreach>
- <div class="days"
+ <div class="days" const:id="monthDaysView"
><var:foreach list="daysToDisplay" item="currentTableColumn">
<var:foreach list="currentTableColumn" item="currentTableDay">
<div var:class="dayCellClasses"
var:day="currentTableDay.shortDateString">
<div class="dayHeader"><var:string value="dayHeaderNumber"/></div>
- <var:foreach
- list="aptsForCurrentDate"
- item="appointment">
- <var:component className="UIxCalInlineMonthAptView"
- appointment="appointment"
- formatter="monthAptFormatter"
- tooltipFormatter="aptTooltipFormatter"
- url="appointmentViewURL"
- const:style="dayoverview"
- queryDictionary="currentDayQueryParameters"
- referenceDate="currentTableDay"
- canAccess="canAccessApt"
- /></var:foreach>
+ <!-- var:foreach
+ list="aptsForCurrentDate"
+ item="appointment"
+ var:component className="UIxCalInlineMdsadsadsaonthAptView"
+ appointment="appointment"
+ formatter="monthAptFormatter"
+ tooltipFormatter="aptTooltipFormatter"
+ url="appointmentViewURL"
+ const:style="dayoverview"
+ queryDictionary="currentDayQueryParameters"
+ referenceDate="currentTableDay"
+ canAccess="canAccessApt"
+ var:foreach -->
</div>
</var:foreach>
</var:foreach>
</td>
<td class="day" width="90%">
<var:foreach list="allDayApts" item="appointment">
- <var:component className="UIxCalInlineAptView"
+ <var:component className="UIxCaaaaalInlineAptView"
appointment="appointment"
formatter="aptFormatter"
tooltipFormatter="aptTooltipFormatter"
><br /><var:foreach
list="aptsForCurrentDate"
item="appointment"
- ><var:component className="UIxCalInlineAptView"
+ ><var:component className="UIxCalInlineAptxxxxView"
appointment="appointment"
formatter="monthAptFormatter"
tooltipFormatter="aptTooltipFormatter"
+++ /dev/null
-<?xml version="1.0" standalone="yes"?>
- <container
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:var="http://www.skyrix.com/od/binding"
- xmlns:const="http://www.skyrix.com/od/constant"
- xmlns:rsrc="OGo:url"
- xmlns:label="OGo:label">
- <h2><var:string label:value="Tasks" /></h2>
- <label><input class="checkBox"
- var:checked="shouldShowCompletedTasks"
- type="checkbox"
- onclick="return onShowCompletedTasks(this);"
- /><var:string label:value="Show completed tasks"
- /></label>
- <ul id="tasksList" multiselect="yes">
- <var:foreach list="fetchCoreTasksInfos" item="currentTask"
- ><var:if condition="shouldDisplayCurrentTask"
- ><li var:id="currentTask.c_name"
- var:owner="currentTask.owner"
- var:class="currentStatusClass"
- onmousedown="return false;"
- onclick="return onRowClick(event);"
- ondblclick="return editDoubleClickedEvent(this);"
- ><input class="checkBox"
- var:checked="isCurrentTaskCompleted"
- type="checkbox"
- onchange="return updateTaskStatus(this);"
- /><var:string value="currentTask.title" const:escapeHTML="NO"
- /></li></var:if>
- </var:foreach>
- </ul>
- </container>
border-bottom: 2px solid #222;
-moz-border-bottom-colors: #000 #9c9a94 transparent;
-moz-border-right-colors: #000 #9c9a94 transparent;
- background: #DCDAD5;
+ background-color: #DCDAD5;
}
.whitesec_title
padding: 0px;
overflow: hidden; }
-DIV#contactFoldersList > DIV.toolbar
+DIV#contactFoldersList DIV.toolbar
{ width: 100%;
- background: #f00;
padding: 0px;
margin: 0px;
border-top: 1px solid #aaa;
border-left: 1px solid #aaa; }
UL#contactFolders
-{ visibility: hidden;
- list-style-type: none;
+{ list-style-type: none;
list-style-image: none;
clear: both;
cursor: default;
color: #000;
background: #fff;
width: 100%;
- height: 100%;
}
TABLE#contactsList TD
{ text-align: center; }
DIV.contactSelection INPUT.button
-{ margin-top: .25em; }
+{ font-size: 8pt;
+ margin-top: .25em;
+ padding: 0px; }
DIV.contactSelection SPAN#selectionLabel
{ float: left; }
configureSortableTableHeaders();
}
else
- log ("ajax fuckage 1");
+ log ("ajax problem 1");
}
function onContactFoldersContextMenu(event) {
div.innerHTML = content;
}
else
- log ("ajax fuckage 2: " + http.status);
+ log ("ajax problem 2: " + http.status);
}
var rowSelectionCount = 0;
document.contactsListAjaxRequest.aborted = true;
document.contactsListAjaxRequest.abort();
}
- url = URLForFolderID(currentContactFolder) + "/" + this.link;
- if (!this.link.match(/noframe=/))
- url += "&noframe=1";
+ url = URLForFolderID(currentContactFolder);
+// // log("url: " + url);
+// var url = "" + this.href;
+ if (url.indexOf("noframe=", 0) == -1)
+ url += "&noframe=1";
document.contactsListAjaxRequest
- = triggerAjaxRequest(url, contactsListCallback);
+ = triggerAjaxRequest(url, contactsListCallback);
event.preventDefault();
}
document.newAbAjaxRequest
= triggerAjaxRequest(url, newAbCallback, name);
}
- event.preventDefault();
+ preventDefault(event);
}
function appendAddressBook(name, folder) {
var li = document.createElement("li");
+ $("contactFolders").appendChild(li);
li.setAttribute("id", folder);
li.appendChild(document.createTextNode(name));
setEventsOnContactFolder(li);
- $("contactFolders").appendChild(li);
}
function newAbCallback(http) {
appendAddressBook(name, "/" + name);
}
else
- log ("ajax fuckage 4:" + http.status);
+ log ("ajax problem 4:" + http.status);
}
function newUserFolderCallback(folderData) {
document.deletePersonalABAjaxRequest = null;
}
else
- log ("ajax fuckage");
+ log ("ajax problem");
}
function configureDragHandles() {
for (var i = 0; i < list.length; i++) {
var folderID = list[i].getAttribute("id");
var url = URLForFolderID(folderID) + "/canAccessContent";
+
triggerAjaxRequest(url, deniedFoldersLookupCallback, folderID);
}
}
function deniedFoldersLookupCallback(http) {
- if (http.readyState == 4) {
- var denied = (http.status != 204)
+ if (http.readyState == 4) {
+ var denied = ! isHttpStatus204(http.status);
var entry = $(http.callbackData);
if (denied)
entry.addClassName("denied");
function configureContactFolders() {
var contactFolders = $("contactFolders");
if (contactFolders) {
- Event.observe(contactFolders, "selectionchange", onFolderSelectionChange, false);
+ Event.observe(contactFolders, "mousedown", listRowMouseDownHandler);
+ Event.observe(contactFolders, "click", onFolderSelectionChange);
var lis = contactFolders.childNodesWithTag("li");
for (var i = 0; i < lis.length; i++)
setEventsOnContactFolder(lis[i]);
lookupDeniedFolders();
- contactFolders.setStyle({ visibility: 'visible' });
-
+
var personalFolder = $("/personal");
personalFolder.select();
}
function setEventsOnContactFolder(node) {
Event.observe(node, "mousedown", listRowMouseDownHandler, false);
Event.observe(node, "click", onRowClick, false);
- Event.observe(node, "contextmenu", onContactFoldersContextMenu, false);
+ Event.observe(node, "contextmenu", onContactFoldersContextMenu.bindAsEventListener(node), false);
}
function onMenuSharing(event) {
}
}
-var initContacts = {
- handleEvent: function (event) {
- if (!document.body.hasClassName("popup")) {
- configureAbToolbar();
- configureSearchField();
- }
- else
- configureSelectionButtons();
- configureContactFolders();
+function initContacts(event) {
+ if (!document.body.hasClassName("popup")) {
+ configureAbToolbar();
+ configureSearchField();
+ }
+ else
+ configureSelectionButtons();
+ configureContactFolders();
// initDnd();
- }
}
-//window.addEventListener("load", initContacts, false);
-Event.observe(window, "load", initContacts, false);
+addEvent(window, 'load', initContacts);
return matchingNodes;
},
- removeClassName: function(element, className) {
- element = $(element);
- var classStr = '' + element.readAttribute('class');
-
- position = classStr.indexOf(className, 0);
- while (position > -1) {
- classStr1 = classStr.substring(0, position);
- classStr2 = classStr.substring(position + 10, classStr.length);
- classStr = classStr1 + classStr2;
- position = classStr.indexOf(className, 0);
- }
-
- element.setAttribute('class', classStr);
- },
-
getParentWithTagName: function(element, tagName) {
element = $(element);
var currentElement = element;
for (var i = 0; i < element.childNodes.length; i++) {
node = element.childNodes.item(i);
if (node.nodeType == 1
- && isNodeSelected(node))
- selArray.push(node.getAttribute("id"));
+ && isNodeSelected(node)) {
+ selArray.push(node.getAttribute("id")); }
}
return selArray;
for (var i = 0; i < element.childNodes.length; i++) {
var node = element.childNodes.item(i);
if (node.nodeType == 1)
- node.deselect();
+ $(node).deselect();
}
}
if (element.tagName == 'TABLE') {
var tbody = (element.getElementsByTagName('tbody'))[0];
- return tbody.getSelectedNodes();
+ return $(tbody).getSelectedNodes();
}
else if (element.tagName == 'UL') {
return element.getSelectedNodes();
if (element.tagName == 'TABLE') {
var tbody = (element.getElementsByTagName('tbody'))[0];
- return tbody.getSelectedNodesId();
+ return $(tbody).getSelectedNodesId();
}
else if (element.tagName == 'UL') {
return element.getSelectedNodesId();
var nodes = tbody.childNodes;
for (var i = 0; i < nodes.length; i++) {
var node = nodes.item(i);
- if (node instanceof HTMLElement
- && node.hasClassName(className))
+ if (node.tagName && node.hasClassName(className))
node.select();
}
}
newDate = new Date(date[2], date[1] - 1, date[0]);
else {
date = this.split("-");
- newDate = new Date(date[0], date[1] - 1, date[2]);
+ if (date.length == 3)
+ newDate = new Date(date[0], date[1] - 1, date[2]);
+ else {
+ if (this.length == 8) {
+ newDate = new Date(this.substring(0, 4),
+ this.substring(4, 6) - 1,
+ this.substring(6, 8));
+ }
+ }
}
return newDate;
Date.prototype.daysUpTo = function(otherDate) {
var days = new Array();
+
var day1 = this.getTime();
var day2 = otherDate.getTime();
return days;
}
+Date.prototype.getDayString = function() {
+ var newString = this.getYear() + 1900;
+ var month = '' + (this.getMonth() + 1);
+ if (month.length == 1)
+ month = '0' + month;
+ newString += month;
+ var day = '' + this.getDate();
+ if (day.length == 1)
+ day = '0' + day;
+ newString += day;
+
+ return newString;
+}
+
+Date.prototype.getHourString = function() {
+ var newString = this.getHours() + '00';
+ if (newString.length == 3)
+ newString = '0' + newString;
+
+ return newString;
+}
+
+Date.prototype.getDisplayHoursString = function() {
+ var hoursString = this.getHours();
+ if (hoursString.length == 1)
+ hoursString = '0' + hoursString;
+
+ var minutesString = this.getMinutes();
+ if (minutesString.length == 1)
+ minutesString = '0' + minutesString;
+
+
+ return hoursString + ":" + minutesString;
+}
+
Date.prototype.stringWithSeparator = function(separator) {
var month = '' + (this.getMonth() + 1);
var day = '' + this.getDate();
Date.prototype.sogoFreeBusyStringWithSeparator = function(separator) {
return this.sogoDayName() + ", " + this.stringWithSeparator(separator);
}
+
+Date.prototype.addDays = function(nbrDays) {
+ var milliSeconds = this.getTime();
+ milliSeconds += 86400000 * nbrDays;
+ this.setTime(milliSeconds);
+}
+
+Date.prototype.earlierDate = function(otherDate) {
+ var workDate = new Date();
+ workDate.setTime(otherDate.getTime());
+ workDate.setHours(0);
+ return ((this.getTime() < workDate.getTime())
+ ? this : otherDate);
+}
+
+Date.prototype.laterDate = function(otherDate) {
+ var workDate = new Date();
+ workDate.setTime(otherDate.getTime());
+ workDate.setHours(23);
+ workDate.setMinutes(59);
+ workDate.setSeconds(59);
+ workDate.setMilliseconds(999);
+ return ((this.getTime() < workDate.getTime())
+ ? otherDate : this);
+}
+
+Date.prototype.beginOfWeek = function() {
+ var beginNumber;
+ var dayNumber = this.getDay();
+ if (weekStartIsMonday) {
+ beginNumber = 1;
+ if (dayNumber == 0)
+ dayNumber = 7;
+ }
+ else
+ beginNumber = 0;
+
+ var beginOfWeek = new Date();
+ beginOfWeek.setTime(this.getTime());
+ beginOfWeek.addDays(beginNumber - dayNumber);
+ beginOfWeek.setHours(0);
+ beginOfWeek.setMinutes(0);
+ beginOfWeek.setSeconds(0);
+ beginOfWeek.setMilliseconds(0);
+
+ return beginOfWeek;
+}
+
+Date.prototype.endOfWeek = function() {
+ var beginNumber;
+ var dayNumber = this.getDay();
+ if (weekStartIsMonday) {
+ beginNumber = 1;
+ if (dayNumber == 0)
+ dayNumber = 7;
+ }
+ else
+ beginNumber = 0;
+
+ var endOfWeek = new Date();
+ endOfWeek.setTime(this.getTime());
+ endOfWeek.addDays(6 + beginNumber - dayNumber);
+
+ endOfWeek.setHours(23);
+ endOfWeek.setMinutes(59);
+ endOfWeek.setSeconds(59);
+ endOfWeek.setMilliseconds(999);
+
+ return endOfWeek;
+}
}
DIV#mailboxContent
-{ position: absolute;
+{ background-color: #fff;
+ position: absolute;
width: 100%;
height: 18em;
left: 0px;
- top: .5em;
+ top: 2.5em;
right: 0px; }
DIV#messageContent
td.mailer_fieldname
{
white-space: nowrap;
- padding-left: 1em;
+ padding: 0 1em;
text-align: right;
font-weight: bold;
vertical-align: top;
+ width: 6em;
}
td.mailer_fieldvalue
{
- width: 95%;
}
td.mailer_subjectfieldvalue
TABLE#messageList
{ display: block;
position: absolute;
- background: #fff;
- color: #000;
+ background-color: #fff;
+ color: #000;
width: 100%;
left: 0px;
right: 0px;
- top: 2em;
+ top: 0px;
bottom: 0px;
overflow: auto;
overflow-x: hidden;
}
TABLE#messageList TD.tbtv_subject_headercell
-{ width: 30%; }
+{ width: 40%; }
+
+TABLE#messageList TD.tbtv_from_headercell
+{ width: 35%; }
+
+TABLE#messageList TD.tbtv_date_headercell
+{ width: 25%; }
TABLE#messageList TR._selected TD
{
if (!validateEditorInput(sender))
return false;
- document.pageform.action="send";
+ document.pageform.action = "send";
document.pageform.submit();
// if everything is ok, close the window
return true;
}
function clickedEditorSave(sender) {
- document.pageform.action="save";
+ document.pageform.action = "save";
document.pageform.submit();
refreshOpener();
return true;
}
function clickedEditorDelete(sender) {
- document.pageform.action="delete";
+ document.pageform.action = "delete";
document.pageform.submit();
refreshOpener();
window.close();
function onMenuSharing(event) {
var folderID = document.menuTarget.getAttribute("dataname");
var urlstr = URLForFolderID(folderID) + "/acls";
- event.preventDefault();
+ preventDefault(event);
openAclWindow(urlstr);
}
function onMenuDeleteMessage(event) {
uixDeleteSelectedMessages();
- event.preventDefault();
+ preventDefault(event);
}
function onMailboxTreeItemClick(event) {
else
openMailbox(mailbox);
- event.preventDefault();
+ preventDefault(event);
}
function onMailboxMenuMove() {
document.messageListAjaxRequest
= triggerAjaxRequest(url, messageListCallback,
currentMessages[mailbox]);
- if (mailboxContent.style.visibility == "hidden") {
- mailboxContent.style.visibility = "visible;";
- rightDragHandle.style.visibility = "visible;";
- messageContent.style.top = (rightDragHandle.offsetTop
- + rightDragHandle.offsetHeight
- + 'px;');
+ if (mailboxContent.getStyle('visibility') == "hidden") {
+ mailboxContent.setStyle({ visibility: "visible" });
+ rightDragHandle.setStyle({ visibility: "visible" });
+ messageContent.setStyle({ top: (rightDragHandle.offsetTop
+ + rightDragHandle.offsetHeight
+ + 'px') });
}
}
}
document.messageListAjaxRequest
= triggerAjaxRequest(url, messageListCallback);
- event.preventDefault();
+ preventDefault(event);
}
function messageListCallback(http) {
var div = $('mailboxContent');
-
+
if (http.readyState == 4
&& http.status == 200) {
document.messageListAjaxRequest = null;
configureSortableTableHeaders();
}
else
- log("problem during ajax request");
+ log("messageListCallback: problem during ajax request (readyState = " + http.readyState + ", status = " + http.status + ")");
}
function onMessageContextMenu(event) {
topNode.menuSelectedEntry = this;
this.select();
- event.preventDefault();
+ preventDefault(event);
}
function onFolderMenuHide(event) {
function onMessageSelectionChange() {
var rows = this.getSelectedRowsId();
+
if (rows.length == 1) {
var idx = rows[0].substr(4);
var messageDiv = $('messageContent');
var mailContentDiv = document.getElementsByClassName('mailer_mailcontent',
messageDiv)[0];
- Event.observe(mailContentDiv, "contextmenu", onMessageContentMenu);
+ Event.observe(mailContentDiv, "contextmenu", onMessageContentMenu.bindAsEventListener(mailContentDiv));
var anchors = messageDiv.getElementsByTagName('a');
for (var i = 0; i < anchors.length; i++)
if (anchors[i].href.substring(0,7) == "mailto:") {
- Event.observe(anchors[i], "click", onEmailAddressClick);
- Event.observe(anchors[i], "contextmenu", onEmailAddressClick);
+ Event.observe(anchors[i], "click", onEmailAddressClick.bindAsEventListener(anchors[i]));
+ Event.observe(anchors[i], "contextmenu", onEmailAddressClick.bindAsEventListener(anchors[i]));
}
else
Event.observe(anchors[i], "click", onMessageAnchorClick);
function onMessageAnchorClick (event) {
window.open(this.href);
- event.preventDefault();
+ preventDefault(event);
}
function messageCallback(http) {
document.messageAjaxRequest = null;
div.innerHTML = http.responseText;
configureLinksInMessage();
-
+
if (http.callbackData) {
var cachedMessage = new Array();
cachedMessage['idx'] = currentMailbox + '/' + http.callbackData;
}
}
else
- log("problem during ajax request");
+ log("messageCallback: problem during ajax request: " + http.status);
}
function processMailboxMenuAction(mailbox) {
document.messageListAjaxRequest.aborted = true;
document.messageListAjaxRequest.abort();
}
- url = ApplicationBaseURL + currentMailbox + "/" + this.link;
- if (!this.link.match(/noframe=/))
+ var link = this.getAttribute('href');
+ url = ApplicationBaseURL + currentMailbox + "/" + link;
+ if (!link.match(/noframe=/))
url += "&noframe=1";
document.messageListAjaxRequest
= triggerAjaxRequest(url, messageListCallback);
- event.preventDefault();
+ preventDefault(event);
}
function onSearchFormSubmit() {
function configureMessageListEvents() {
var messageList = $("messageList");
if (messageList) {
- Event.observe(messageList, "selectionchange", onMessageSelectionChange);
+ Event.observe(messageList, "mousedown", onMessageSelectionChange.bindAsEventListener(messageList));
var rows = messageList.tBodies[0].rows;
var start = 0;
if (rows.length > 1) {
- if (rows[start].cells[0].hasClassName("tbtv_headercell"))
+ if ($(rows[start].cells[0]).hasClassName("tbtv_headercell"))
start++;
- if (rows[start].cells[0].hasClassName("tbtv_navcell")) {
- log("start:" + start);
+ if ($(rows[start].cells[0]).hasClassName("tbtv_navcell")) {
var anchors = $(rows[start].cells[0]).childNodesWithTag("a");
- log("nr anchors: " + anchors.length);
for (var i = 0; i < anchors.length; i++)
- Event.observe(anchors[i], "click", openMailboxAtIndex);
+ Event.observe(anchors[i], "click", openMailboxAtIndex.bindAsEventListener(anchors[i]));
start++;
}
for (var i = start; i < rows.length; i++) {
Event.observe(rows[i], "mousedown", onRowClick);
- Event.observe(rows[i], "contextmenu", onMessageContextMenu);
+ Event.observe(rows[i], "contextmenu", onMessageContextMenu.bindAsEventListener(rows[i]));
rows[i].dndTypes = function() { return new Array("mailRow"); };
rows[i].dndGhost = messageListGhost;
var cell = rows[i].cells[j];
Event.observe(cell, "mousedown", listRowMouseDownHandler);
if (j == 2 || j == 3 || j == 5)
- Event.observe(cell, "dblclick", onMessageDoubleClick);
+ Event.observe(cell, "dblclick", onMessageDoubleClick.bindAsEventListener(cell));
else if (j == 4) {
var img = cell.childNodesWithTag("img")[0];
Event.observe(img, "click", mailListMarkMessage);
function configureSearchField() {
var searchValue = $("searchValue");
- Event.observe(searchValue, "mousedown", onSearchMouseDown);
- Event.observe(searchValue, "click", popupSearchMenu);
- Event.observe(searchValue, "blur", onSearchBlur);
- Event.observe(searchValue, "focus", onSearchFocus);
- Event.observe(searchValue, "keydown", onSearchKeyDown);
+ Event.observe(searchValue, "mousedown", onSearchMouseDown.bindAsEventListener(searchValue));
+ Event.observe(searchValue, "click", popupSearchMenu.bindAsEventListener(searchValue));
+ Event.observe(searchValue, "blur", onSearchBlur.bindAsEventListener(searchValue));
+ Event.observe(searchValue, "focus", onSearchFocus.bindAsEventListener(searchValue));
+ Event.observe(searchValue, "keydown", onSearchKeyDown.bindAsEventListener(searchValue));
}
function initMailer(event) {
function generateMenuForMailbox(mailbox, prefix, callback) {
var menuDIV = document.createElement("div");
- menuDIV.addClassName("menu");
+ $(menuDIV).addClassName("menu");
menuDIV.setAttribute("id", prefix + "Submenu");
var menu = document.createElement("ul");
menuDIV.appendChild(menu);
var menuDIV = $(menuId);
if (menuDIV)
menuDIV.parentNode.removeChild(menuDIV);
+
menuDIV = document.createElement("div");
- menuDIV.addClassName("menu");
- menuDIV.setAttribute("id", menuId);
+ document.body.appendChild(menuDIV);
+
var menu = document.createElement("ul");
menuDIV.appendChild(menu);
+ $(menuDIV).addClassName("menu");
+ menuDIV.setAttribute("id", menuId);
+
var submenuIds = new Array();
for (var i = 0; i < mailAccounts.length; i++) {
- var menuEntry = mailboxMenuNode("account", mailAccounts[i]);
+ var menuEntry = mailboxMenuNode("account", mailAccounts[i]);
menu.appendChild(menuEntry);
var mailbox = accounts[mailAccounts[i]];
var newSubmenu = generateMenuForMailbox(mailbox,
submenuIds.push(newSubmenu.getAttribute("id"));
}
initMenu(menuDIV, submenuIds);
-
- document.body.appendChild(menuDIV);
}
}
mailboxTree.addMailAccount(newAccount);
mailboxTree.pendingRequests--;
if (!mailboxTree.pendingRequests) {
- updateMailboxTreeInPage();
- updateMailboxMenus();
+ updateMailboxTreeInPage();
+ updateMailboxMenus();
}
}
return menus;
}
-Event.observe(window, "load", initMailer);
+addEvent(window, 'load', initMailer);
function Mailbox(type, name) {
this.type = type;
this.origLeft = this.leftBlock.offsetWidth;
delta = 0;
this.origRight = this.rightBlock.offsetLeft - 5;
- document.body.style.cursor = "e-resize";
+ document.body.setStyle({ cursor: "e-resize" });
} else if (this.dhType == 'vertical') {
this.origY = this.offsetTop;
this.origUpper = this.upperBlock.offsetHeight;
delta = event.clientY - this.offsetTop - 5;
this.origLower = this.lowerBlock.offsetTop - 5;
- document.body.style.cursor = "n-resize";
+ document.body.setStyle({ cursor: "n-resize" });
}
this.stopHandleDraggingBound = this.stopHandleDragging.bindAsEventListener(this);
Event.observe(document.body, "mouseup", this.stopHandleDraggingBound, true);
if (this.dhType == 'horizontal') {
var deltaX
= Math.floor(event.clientX - this.origX - (this.offsetWidth / 2));
- this.rightBlock.style.left = (this.origRight + deltaX) + 'px';
- this.leftBlock.style.width = (this.origLeft + deltaX) + 'px';
+ this.rightBlock.setStyle({ left: (this.origRight + deltaX) + 'px' });
+ this.leftBlock.setStyle({ width: (this.origLeft + deltaX) + 'px' });
} else if (this.dhType == 'vertical') {
var deltaY
= Math.floor(event.clientY - this.origY - (this.offsetHeight / 2));
- this.lowerBlock.style.top = (this.origLower + deltaY - delta) + 'px';
- this.upperBlock.style.height = (this.origUpper + deltaY - delta) + 'px';
+ this.lowerBlock.setStyle({ top: (this.origLower + deltaY - delta) + 'px' });
+ this.upperBlock.setStyle({ height: (this.origUpper + deltaY - delta) + 'px' });
}
Event.stopObserving(document.body, "mouseup", this.stopHandleDraggingBound, true);
var hX = event.clientX;
if (hX > -1) {
var newLeft = Math.floor(hX - (width / 2));
- this.style.left = newLeft + 'px';
+ this.setStyle({ left: newLeft + 'px' });
event.cancelBubble = true;
return false;
var hY = event.clientY;
if (hY > -1) {
var newTop = Math.floor(hY - (height / 2)) - delta;
- this.style.top = newTop + 'px';
+ this.setStyle({ top: newTop + 'px' });
event.cancelBubble = true;
return false;
if (this.offsetLeft > lLeft) {
var leftdelta = this.rightBlock.offsetLeft - this.offsetLeft;
- this.style.left = lLeft + 'px';
- this.leftBlock.style.width = '0px';
- this.rightBlock.style.left = (lLeft + leftdelta) + 'px';
+ this.setStyle({ left: lLeft + 'px' });
+ this.leftBlock.setStyle({ width: '0px' });
+ this.rightBlock.setStyle({ left: (lLeft + leftdelta) + 'px' });
}
} else if (this.dhType == 'vertical') {
var uTop = this.upperBlock.offsetTop;
if (this.offsetTop > uTop) {
var topdelta = this.lowerBlock.offsetTop - this.offsetTop;
- this.style.top = uTop + 'px';
- this.upperBlock.style.width = '0px';
- this.lowerBlock.style.top = (uTop + topdelta) + 'px';
+ this.setStyle({ top: uTop + 'px' });
+ this.upperBlock.setStyle({ width: '0px' });
+ this.lowerBlock.setStyle({ top: (uTop + topdelta) + 'px' });
}
}
}
DIV#leftPanel
-{
- position: absolute;
+{ position: absolute;
top: 5.5em;
left: 0px;
- width: 18.5em;
+ width: 19.25em;
bottom: 0px;
- overflow: hidden;
-}
+ overflow: hidden; }
DIV#schedulerTabs
-{
- position: absolute;
+{ position: absolute;
top: 0.5em;
left: .2em;
right: .2em;
- height: 17em;
-}
+ height: 14em; }
DIV#tasksListView
-{
- position: absolute;
- top: 20em;
+{ position: absolute;
+ top: 17em;
bottom: 0px;
left: .2em;
right: .7em;
- padding: 0px;
-}
+ padding: 0px; }
DIV#tasksListView H2
{ font-size: 10pt;
border-right: 1px solid #fff;
border-top: 2px solid #222;
border-left: 2px solid #222;
- background: #fff;
+ background-color: #fff;
-moz-border-top-colors: #9c9a94 #000 transparent;
-moz-border-left-colors: #9c9a94 #000 transparent;
list-style-type: none;
UL#tasksList
{ position: absolute;
width: 100%;
- top: 3em;
+ top: 2em;
left: .25em;
right: .25em;
bottom: .25em; }
{ color: #999; }
UL#tasksList LI[class~="_selected"].overdue
-{
- color: #fff !important;
- background-color: #f00 !important;
-}
+{ color: #fff !important;
+ background-color: #f00 !important; }
UL#tasksList LI[class~="_selected"].duetoday
-{
- color: #fff !important;
- background-color: #00f !important;
-}
+{ color: #fff !important;
+ background-color: #00f !important; }
UL#tasksList LI[class~="_selected"].duelater
-{
- color: #fff !important;
- background-color: #999 !important;
-}
+{ color: #fff !important;
+ background-color: #999 !important; }
DIV#rightPanel
-{
- position: absolute;
+{ position: absolute;
top: 5.5em;
- left: 18.5em;
+ left: 19.25em;
right: 0px;
bottom: 0px;
margin: 0px;
padding: 0px;
overflow: hidden; }
-DIV#appointmentsListView
+DIV#eventsListView
{ display: block;
+ cursor: default;
position: absolute;
- background: #fff;
+ background-color: #fff;
top: 2.5em;
left: 0px;
right: 0px;
- overflow: auto;
- overflow-x: hidden;
height: 15.5em;
- min-width: 600px; }
+ overflow: hidden;
+ overflow-y: auto; }
DIV#calendarView
-{
- position: absolute;
- background: #fff;
+{ position: absolute;
+ background-color: #fff;
top: 18em;
margin-top: 5px;
bottom: 0px;
width: 100%;
border-top: 1px solid #aaa;
- border-left: 1px solid #aaa;
-}
+ border-left: 1px solid #aaa; }
DIV#calendarView A
-{
- text-decoration: none;
+{ text-decoration: none;
font: inherit;
- color: inherit;
-}
+ color: inherit; }
#verticalDragHandle
-{
- cursor: e-resize;
+{ cursor: e-resize;
top: 7.5em;
- left: 18.5em;
+ left: 19.25em;
width: 5px;
- bottom: 0px;
-}
+ bottom: 0px; }
#rightDragHandle
-{
- cursor: n-resize;
+{ cursor: n-resize;
top: 18em;
left: 0px;
right: 0px;
- height: 5px;
-}
+ height: 5px; }
#filterPanel
-{
- padding-right: .5em;
-}
+{ padding-right: .5em; }
+
+DIV#dateSelectorView
+{ overflow: hidden; }
#dateSelector
-{
- margin: 0px auto;
- background: #fff;
+{ margin: 0px auto;
+ background-color: #fff;
border-top: 1px solid #fff;
border-left: 1px solid #fff;
border-right: 1px solid #aaa;
- border-bottom: 1px solid #aaa;
-}
+ border-bottom: 1px solid #aaa; }
#dateSelector > .header
-{ background: #efefef;
+{ background-color: #efefef;
width: 100%;
white-space: nowrap;
vertical-align: middle;
border: 0px; }
#dateSelector > .header A
-{
- width: 1em;
- padding: .4em .2em;
-}
+{ width: 1em;
+ padding: .4em .2em; }
#dateSelector > .header #leftArrow
-{
- float: left;
-}
+{ float: left; }
#dateSelector > .header #rightArrow
-{
- float: right;
-}
+{ float: right; }
#dateSelector > .header SPAN
{ cursor: default;
#dateSelector .dayOfWeek
{ color: #00f; }
+TABLE#dateSelectorTable
+{ padding: 2px; }
+
#dateSelector TABLE#dateSelectorTable TD
{ width: 14%; }
width: 100%; }
#dateSelector TABLE TABLE TD
-{
- cursor: pointer;
+{ cursor: pointer;
margin: 0px;
padding: 0px;
width: 100%;
- border: 1px solid #fff;
-}
+ border: 1px solid #fff; }
#dateSelector TABLE TABLE TD:hover
{ color: #f00;
border: 1px solid #deebf7; }
+#dateSelector TABLE TABLE TD:hover A
+{ color: #f00; }
+
#dateSelector .inactiveDay
{ color: #dedfde; }
#dateSelector .dayOfToday
-{ background: #deebf7;
+{ background-color: #deebf7;
border: 1px solid #deebf7; }
#dateSelector TD SPAN
display: block; }
#dateSelector TD SPAN A
-{ color: inherit;
+{ color: #000;
background: inherit;
text-decoration: none; }
#dateSelector TD:active
-{ background: #ddd;
+{ background-color: #ddd;
border: 1px solid #deebf7; }
-TABLE#appointmentsList
+TABLE#eventsList
{ display: block;
position: relative;
width: 100%; }
-TABLE#appointmentsList td.tbtv_subject_headercell,
-TABLE#appointmentsList td.headerLocation
+TABLE#eventsList td.tbtv_subject_headercell,
+TABLE#eventsList td.headerLocation
{ width: 35%; }
._unfocused#dateSelector TD._selected,
UL._unfocused > LI._selected,
-TABLE._unfocused#appointmentsList TR._selected TD
+TABLE._unfocused#eventsList TR._selected TD
{
- background: #d4d0c8 !important;;
+ background-color: #d4d0c8 !important;;
color: #fff !important;;
}
SPAN.monthsHeader
{ display: block;
white-space: nowrap;
- background: #d4d0c8;
+ background-color: #d4d0c8;
overflow: hidden;
width: 100%;
margin: 0px;
height: 3em;
padding: 2px 1.5em;
- border: 0px;
- border-bottom: 1px solid #ccc; }
+/* HERE border: 0px;
+ */ border-bottom: 1px solid #ccc; }
SPAN.daysHeader SPAN,
SPAN.weeksHeader SPAN,
border-left: 1px solid #828482 !important;
border-bottom: 1px solid #fff !important;
border-right: 1px solid #fff !important;
- background: #ddd; }
+ background-color: #ddd; }
A.leftNavigationArrow
-{
- position: absolute;
+{ position: absolute;
display: block;
top: .5em;
- left: .5em;
-}
+ left: .5em; }
A.rightNavigationArrow
-{
- position: absolute;
+{ position: absolute;
display: block;
top: .5em;
- right: .5em;
-}
+ right: .5em; }
-DIV#calendarContent
+DIV#calendarHeader,
+DIV#daysView
{ position: absolute;
- top: 3.5em;
+ left: 0px;
+ right: 0px;
padding: 0px;
- margin: 0px;
+ margin: 0px; }
+
+DIV#daysView
+{ top: 11em;
bottom: 0px;
- left: 0px;
+ margin-left: 1px;
+ border-left: 1px solid #397d94;
+ border-bottom: 1px solid #397d94;
+ border-top: 2px solid #397d94;
+ overflow: auto; }
+
+DIV#calendarHeader
+{ top: 3.5em;
+ border: 0px;
+ height: 7.5em; }
+
+DIV#calendarHeader DIV.dayLabels,
+DIV#calendarHeader DIV.days
+{ position: absolute;
+ margin: 0px;
+ padding: 0px;
+/* HERE border: 0px; */
+ border-right: 1px solid #397d94;
+ border-top: 1px solid #397d94;
+ left: 5em;
+ margin-left: 1px;
+ margin-right: 16px;
right: 0px;
- overflow: auto;
+ overflow: hidden; }
+
+DIV#calendarHeader DIV.dayLabels
+{ bottom: 4em;
+ height: 3em; }
+
+DIV#calendarHeader DIV.dayLabels DIV.day
+{ text-align: center;
+ font-weight: bold;
+ color: #77a;
+ background-color: #e7efef; }
+
+DIV#calendarHeader SPAN.dayOfWeek
+{ font-size: medium; }
+
+DIV#calendarHeader DIV.dayLabels
+{ cursor: default; }
+
+DIV#calendarHeader DIV.days
+{ cursor: pointer;
+ bottom: 0px;
+ height: 4em; }
+
+DIV#calendarHeader DIV.day
+{ height: 100%;
+ margin: 0px;
+ padding: 0px;
+ margin-right: 1px; }
+
+DIV#calendarHeader DIV.days DIV.day
+{ overflow: hidden;
+ overflow-y: auto; }
+
+/* DIV#daysView
/* background-position: top center;
background-repeat: no-repeat;
background-image: url("/SOGo.woa/WebServerResources/background.jpg");
- */}
+ } */
.menu LI.currentMonth,
.menu LI.currentYear
-{
- border-top: 1px solid #aaa;
+{ border-top: 1px solid #aaa;
border-left: 1px solid #aaa;
border-bottom: 1px solid #fff;
border-right: 1px solid #fff;
- background: #ccc;
- color: #222;
-}
+ background-color: #ccc;
+ color: #222; }
-DIV.appointmentView
+DIV.eventView
{ display: block;
overflow: hidden;
white-space: nowrap;
/* new draggable presentation */
-DIV.daysView
-{ position: relative;
- margin: 1em;
- height: 100em;
- border-bottom: 1px solid #397d94; }
-
-DIV.daysView DIV.days
+DIV#daysView DIV.days
{ position: absolute;
+ margin: 0px;
+ height: 96em;
top: 0px;
- bottom: 0px;
left: 5em;
- right: 0px; }
+ right: 2px; }
DIV.multicolumnDayView DIV.lastDayUser
{ border-right: 1px solid #397d94; }
DIV.monthView
{ position: absolute;
left: .5em;
- top: .5em;
+ top: 4em;
right: 1em;
bottom: 1em;
- border: 0px;
+/* border: 0px; HERE */
margin: 0px;
padding: 0px;
min-width: 20em;
DIV.monthView > DIV.headerDay
{ text-align: center;
+ cursor: default;
padding-top: .5em;
border-left: 2px solid #397d94 !important;
border-top: 2px solid #397d94 !important;
color: #397d94;
height: 1.5em;
font-weight: bold;
- background: #e7efef; }
+ background-color: #e7efef; }
-DIV.monthView DIV.dayOfToday
-{ border: 0px solid #397d94;
- background-color: #deebf7; }
+DIV.dayOfToday
+{ background-color: #deebf7; }
-DIV.monthView DIV.weekEndDay
+DIV.weekEndDay
{ background-color: #fffbe7; }
-DIV.monthView DIV.dayOfAnotherMonth
+DIV.dayOfAnotherMonth
{ background-color: #e7efef; }
-DIV.monthView DIV.selectedDay
+DIV.selectedDay
{ background-color: #ffe79c; }
DIV.monthView DIV.dayHeader
{ margin-left: 1em;
+ cursor: pointer;
color: #397d94;
font-weight: bold; }
DIV.monthView DIV.days
{ top: 2em;
+ cursor: pointer;
bottom: 0px;
left: 0px;
right: 0px; }
DIV.monthView DIV.week6
{ top: 90%; }
-DIV.daysView DIV.day
+DIV#calendarHeader DIV.day,
+DIV#daysView DIV.day
{ position: absolute;
border-left: 1px solid #397d94;
- left: 0px;
- top: 0px;
- bottom: 0px; }
+ margin: 0px;
+ padding: 0px;
+ top: 0px; }
+
+/* DIV#calendarHeader DIV.day1
+{ border-left: 0px; }
+ */
-DIV.daysView > DIV.days > DIV.day > DIV.header
-{ height: 3.5em;
+/* DIV#daysView > DIV.days > DIV.day > DIV.header
+{ position: fixed;
+ top: ;
+ height: 3.5em;
padding-top: .5em;
border: 0px;
border-top: 1px solid #397d94;
font-weight: bold;
text-align: center;
- background: #e7efef;
- color: #397d94; }
-
-DIV.daysView > DIV.days > DIV.dayOfToday
-{ background-color: #deebf7; }
-
-DIV.daysView > DIV.days > DIV.weekEndDay
-{ background-color: #fffbe7; }
-
-DIV.daysView > DIV.days > DIV.selectedDay
-{ background-color: #ffe79c; }
+ background-color: #e7efef;
+ color: #397d94; } */
DIV.daysViewFor1Days DIV.day
-{ width: 100%;
- border-right: 1px solid #397d94;
- left: 0px; }
+{ border-right: 1px solid #397d94;
+ width: 100%; }
+
+/* DIV#daysView DIV.day
+{ margin-right: 3px; } */
DIV.monthView DIV.headerDay,
DIV.monthView DIV.day,
{ left: 85.7142%;
border-right: 1px solid #397d94; }
-DIV.daysView > DIV.hours
+DIV#daysView > DIV.hours
{ position: absolute;
- border: 0px;
left: 0px;
- top: 4em;
+ top: 0px;
width: 4.5em;
height: 95.5em;
font-weight: bold;
- color: #77a;
margin: 0px;
padding-top: .5em;
padding-right: .5em;
- border-left: 1px solid #397d94;
- background: #e7efef;
+ color: #77a;
+ background-color: #e7efef;
text-align: right; }
-DIV.daysView > DIV.hours > DIV.hour
+DIV#daysView > DIV.hours > DIV.hour
{ height: 4em; }
-DIV.daysView > DIV.hourLines > DIV.hourLine
+DIV#daysView > DIV.hourLines > DIV.hourLine
{ position: absolute;
- z-index: 1;
height: 1px;
left: 0px;
right: 0px;
- border-top: 1px solid #397d94; }
+ padding-left: 1em;
+ margin-right: 2px;
+ border-bottom: 1px solid #397d94; }
DIV.clickableHourCell
-{ width: 100%;
+{ cursor: pointer;
+ width: 100%;
height: 4em; }
DIV.clickableHourCell0
{ top: 0px; }
DIV.clickableHourCell1,
-DIV.daysView > DIV.hourLines > DIV.hourLine0
+DIV#daysView > DIV.hourLines > DIV.hourLine0
{ top: 4em; }
DIV.clickableHourCell2,
-DIV.daysView > DIV.hourLines > DIV.hourLine1
+DIV#daysView > DIV.hourLines > DIV.hourLine1
{ top: 8em; }
DIV.clickableHourCell3,
-DIV.daysView > DIV.hourLines > DIV.hourLine2
+DIV#daysView > DIV.hourLines > DIV.hourLine2
{ top: 12em; }
-DIV.clickableHourCell3,
-DIV.daysView > DIV.hourLines > DIV.hourLine3
+DIV.clickableHourCell4,
+DIV#daysView > DIV.hourLines > DIV.hourLine3
{ top: 16em; }
DIV.clickableHourCell5,
-DIV.daysView > DIV.hourLines > DIV.hourLine4
+DIV#daysView > DIV.hourLines > DIV.hourLine4
{ top: 20em; }
-DIV.clickableHourCell4,
-DIV.daysView > DIV.hourLines > DIV.hourLine5
+DIV.clickableHourCell6,
+DIV#daysView > DIV.hourLines > DIV.hourLine5
{ top: 24em; }
-DIV.clickableHourCell5,
-DIV.daysView > DIV.hourLines > DIV.hourLine6
+DIV.clickableHourCell7,
+DIV#daysView > DIV.hourLines > DIV.hourLine6
{ top: 28em; }
-DIV.clickableHourCell6,
-DIV.daysView > DIV.hourLines > DIV.hourLine7
+DIV.clickableHourCell8,
+DIV#daysView > DIV.hourLines > DIV.hourLine7
{ top: 32em; }
-DIV.clickableHourCell7,
-DIV.daysView > DIV.hourLines > DIV.hourLine8
+DIV.clickableHourCell9,
+DIV#daysView > DIV.hourLines > DIV.hourLine8
{ top: 36em; }
-DIV.clickableHourCell8,
-DIV.daysView > DIV.hourLines > DIV.hourLine9
+DIV.clickableHourCell10,
+DIV#daysView > DIV.hourLines > DIV.hourLine9
{ top: 40em; }
-DIV.clickableHourCell9,
-DIV.daysView > DIV.hourLines > DIV.hourLine10
+DIV.clickableHourCell11,
+DIV#daysView > DIV.hourLines > DIV.hourLine10
{ top: 44em; }
-DIV.clickableHourCell10,
-DIV.daysView > DIV.hourLines > DIV.hourLine11
+DIV.clickableHourCell12,
+DIV#daysView > DIV.hourLines > DIV.hourLine11
{ top: 48em; }
-DIV.clickableHourCell11,
-DIV.daysView > DIV.hourLines > DIV.hourLine12
+DIV.clickableHourCell13,
+DIV#daysView > DIV.hourLines > DIV.hourLine12
{ top: 52em; }
-DIV.clickableHourCell12,
-DIV.daysView > DIV.hourLines > DIV.hourLine13
+DIV.clickableHourCell14,
+DIV#daysView > DIV.hourLines > DIV.hourLine13
{ top: 56em; }
-DIV.clickableHourCell13,
-DIV.daysView > DIV.hourLines > DIV.hourLine14
+DIV.clickableHourCell15,
+DIV#daysView > DIV.hourLines > DIV.hourLine14
{ top: 60em; }
-DIV.clickableHourCell14,
-DIV.daysView > DIV.hourLines > DIV.hourLine15
+DIV.clickableHourCell16,
+DIV#daysView > DIV.hourLines > DIV.hourLine15
{ top: 64em; }
-DIV.clickableHourCell15,
-DIV.daysView > DIV.hourLines > DIV.hourLine16
+DIV.clickableHourCell17,
+DIV#daysView > DIV.hourLines > DIV.hourLine16
{ top: 68em; }
-DIV.clickableHourCell16,
-DIV.daysView > DIV.hourLines > DIV.hourLine17
+DIV.clickableHourCell18,
+DIV#daysView > DIV.hourLines > DIV.hourLine17
{ top: 72em; }
-DIV.clickableHourCell17,
-DIV.daysView > DIV.hourLines > DIV.hourLine18
+DIV.clickableHourCell19,
+DIV#daysView > DIV.hourLines > DIV.hourLine18
{ top: 76em; }
-DIV.clickableHourCell18,
-DIV.daysView > DIV.hourLines > DIV.hourLine19
+DIV.clickableHourCell20,
+DIV#daysView > DIV.hourLines > DIV.hourLine19
{ top: 80em; }
-DIV.clickableHourCell19,
-DIV.daysView > DIV.hourLines > DIV.hourLine20
+DIV.clickableHourCell21,
+DIV#daysView > DIV.hourLines > DIV.hourLine20
{ top: 84em; }
-DIV.clickableHourCell20,
-DIV.daysView > DIV.hourLines > DIV.hourLine21
+DIV.clickableHourCell22,
+DIV#daysView > DIV.hourLines > DIV.hourLine21
{ top: 88em; }
-DIV.clickableHourCell21,
-DIV.daysView > DIV.hourLines > DIV.hourLine22
+DIV.clickableHourCell23,
+DIV#daysView > DIV.hourLines > DIV.hourLine22
{ top: 92em; }
-DIV.clickableHourCell22,
-DIV.daysView > DIV.hourLines > DIV.hourLine23
+DIV#daysView > DIV.hourLines > DIV.hourLine23
{ top: 96em; }
-DIV.daysView DIV.appointments
-{ position: absolute;
- z-index: 2;
- border-top: 1px solid #397d94;
+DIV#daysView DIV.events
+{ z-index: 2;
left: 0px;
right: 0px;
bottom: 0px;
- top: 4em; }
+ top: 0px; }
-DIV.appointments > DIV.appointment
+DIV.events > DIV.event
{ cursor: default;
+ z-index: 1;
position: absolute;
left: 0px;
right: 1px;
+ margin-top: 1px;
padding: 1px; }
-DIV[class~="appointment"]._selected > DIV.appointmentInside
+DIV[class~="event"]._selected > DIV.eventInside
{ -moz-opacity: 0.7;
opacity: 0.7;
filter: alpha(opacity=70); }
-DIV.appointment > DIV.appointmentInside
+DIV.event > DIV.eventInside
{ position: absolute;
overflow: hidden;
top: 1px;
right: 3px;
top: 3px;
bottom: 4px;
- moz-opacity: 0.4;
+ -moz-opacity: 0.4;
opacity: 0.4;
filter: alpha(opacity=40); }
{ height: 100%;
width: 100%; }
-DIV.monthView DIV.appointment
+DIV#calendarHeader DIV.event,
+DIV.monthView DIV.event
{ position: relative;
cursor: default;
white-space: nowrap;
- margin: 2px;
+ margin-top: 1px;
+ margin-left: 1px;
margin-right: 3px;
padding: 1px;
height: 2em; }
-DIV.appointment DIV.text
+DIV.event DIV.text
{ font-size: 92%; }
-DIV.daysView DIV[class~="appointment"].starts0
+DIV#daysView DIV[class~="event"].starts0
{ top: 0.000000%; }
-DIV.daysView DIV[class~="appointment"].starts1
+DIV#daysView DIV[class~="event"].starts1
{ top: 1.041667%; }
-DIV.daysView DIV[class~="appointment"].starts2
+DIV#daysView DIV[class~="event"].starts2
{ top: 2.083333%; }
-DIV.daysView DIV[class~="appointment"].starts3
+DIV#daysView DIV[class~="event"].starts3
{ top: 3.125000%; }
-DIV.daysView DIV[class~="appointment"].starts4
+DIV#daysView DIV[class~="event"].starts4
{ top: 4.166667%; }
-DIV.daysView DIV[class~="appointment"].starts5
+DIV#daysView DIV[class~="event"].starts5
{ top: 5.208333%; }
-DIV.daysView DIV[class~="appointment"].starts6
+DIV#daysView DIV[class~="event"].starts6
{ top: 6.250000%; }
-DIV.daysView DIV[class~="appointment"].starts7
+DIV#daysView DIV[class~="event"].starts7
{ top: 7.291667%; }
-DIV.daysView DIV[class~="appointment"].starts8
+DIV#daysView DIV[class~="event"].starts8
{ top: 8.333333%; }
-DIV.daysView DIV[class~="appointment"].starts9
+DIV#daysView DIV[class~="event"].starts9
{ top: 9.375000%; }
-DIV.daysView DIV[class~="appointment"].starts10
+DIV#daysView DIV[class~="event"].starts10
{ top: 10.416667%; }
-DIV.daysView DIV[class~="appointment"].starts11
+DIV#daysView DIV[class~="event"].starts11
{ top: 11.458333%; }
-DIV.daysView DIV[class~="appointment"].starts12
+DIV#daysView DIV[class~="event"].starts12
{ top: 12.500000%; }
-DIV.daysView DIV[class~="appointment"].starts13
+DIV#daysView DIV[class~="event"].starts13
{ top: 13.541667%; }
-DIV.daysView DIV[class~="appointment"].starts14
+DIV#daysView DIV[class~="event"].starts14
{ top: 14.583333%; }
-DIV.daysView DIV[class~="appointment"].starts15
+DIV#daysView DIV[class~="event"].starts15
{ top: 15.625000%; }
-DIV.daysView DIV[class~="appointment"].starts16
+DIV#daysView DIV[class~="event"].starts16
{ top: 16.666667%; }
-DIV.daysView DIV[class~="appointment"].starts17
+DIV#daysView DIV[class~="event"].starts17
{ top: 17.708333%; }
-DIV.daysView DIV[class~="appointment"].starts18
+DIV#daysView DIV[class~="event"].starts18
{ top: 18.750000%; }
-DIV.daysView DIV[class~="appointment"].starts19
+DIV#daysView DIV[class~="event"].starts19
{ top: 19.791667%; }
-DIV.daysView DIV[class~="appointment"].starts20
+DIV#daysView DIV[class~="event"].starts20
{ top: 20.833333%; }
-DIV.daysView DIV[class~="appointment"].starts21
+DIV#daysView DIV[class~="event"].starts21
{ top: 21.875000%; }
-DIV.daysView DIV[class~="appointment"].starts22
+DIV#daysView DIV[class~="event"].starts22
{ top: 22.916667%; }
-DIV.daysView DIV[class~="appointment"].starts23
+DIV#daysView DIV[class~="event"].starts23
{ top: 23.958333%; }
-DIV.daysView DIV[class~="appointment"].starts24
+DIV#daysView DIV[class~="event"].starts24
{ top: 25.000000%; }
-DIV.daysView DIV[class~="appointment"].starts25
+DIV#daysView DIV[class~="event"].starts25
{ top: 26.041667%; }
-DIV.daysView DIV[class~="appointment"].starts26
+DIV#daysView DIV[class~="event"].starts26
{ top: 27.083333%; }
-DIV.daysView DIV[class~="appointment"].starts27
+DIV#daysView DIV[class~="event"].starts27
{ top: 28.125000%; }
-DIV.daysView DIV[class~="appointment"].starts28
+DIV#daysView DIV[class~="event"].starts28
{ top: 29.166667%; }
-DIV.daysView DIV[class~="appointment"].starts29
+DIV#daysView DIV[class~="event"].starts29
{ top: 30.208333%; }
-DIV.daysView DIV[class~="appointment"].starts30
+DIV#daysView DIV[class~="event"].starts30
{ top: 31.250000%; }
-DIV.daysView DIV[class~="appointment"].starts31
+DIV#daysView DIV[class~="event"].starts31
{ top: 32.291667%; }
-DIV.daysView DIV[class~="appointment"].starts32
+DIV#daysView DIV[class~="event"].starts32
{ top: 33.333333%; }
-DIV.daysView DIV[class~="appointment"].starts33
+DIV#daysView DIV[class~="event"].starts33
{ top: 34.375000%; }
-DIV.daysView DIV[class~="appointment"].starts34
+DIV#daysView DIV[class~="event"].starts34
{ top: 35.416667%; }
-DIV.daysView DIV[class~="appointment"].starts35
+DIV#daysView DIV[class~="event"].starts35
{ top: 36.458333%; }
-DIV.daysView DIV[class~="appointment"].starts36
+DIV#daysView DIV[class~="event"].starts36
{ top: 37.500000%; }
-DIV.daysView DIV[class~="appointment"].starts37
+DIV#daysView DIV[class~="event"].starts37
{ top: 38.541667%; }
-DIV.daysView DIV[class~="appointment"].starts38
+DIV#daysView DIV[class~="event"].starts38
{ top: 39.583333%; }
-DIV.daysView DIV[class~="appointment"].starts39
+DIV#daysView DIV[class~="event"].starts39
{ top: 40.625000%; }
-DIV.daysView DIV[class~="appointment"].starts40
+DIV#daysView DIV[class~="event"].starts40
{ top: 41.666667%; }
-DIV.daysView DIV[class~="appointment"].starts41
+DIV#daysView DIV[class~="event"].starts41
{ top: 42.708333%; }
-DIV.daysView DIV[class~="appointment"].starts42
+DIV#daysView DIV[class~="event"].starts42
{ top: 43.750000%; }
-DIV.daysView DIV[class~="appointment"].starts43
+DIV#daysView DIV[class~="event"].starts43
{ top: 44.791667%; }
-DIV.daysView DIV[class~="appointment"].starts44
+DIV#daysView DIV[class~="event"].starts44
{ top: 45.833333%; }
-DIV.daysView DIV[class~="appointment"].starts45
+DIV#daysView DIV[class~="event"].starts45
{ top: 46.875000%; }
-DIV.daysView DIV[class~="appointment"].starts46
+DIV#daysView DIV[class~="event"].starts46
{ top: 47.916667%; }
-DIV.daysView DIV[class~="appointment"].starts47
+DIV#daysView DIV[class~="event"].starts47
{ top: 48.958333%; }
-DIV.daysView DIV[class~="appointment"].starts48
+DIV#daysView DIV[class~="event"].starts48
{ top: 50.000000%; }
-DIV.daysView DIV[class~="appointment"].starts49
+DIV#daysView DIV[class~="event"].starts49
{ top: 51.041667%; }
-DIV.daysView DIV[class~="appointment"].starts50
+DIV#daysView DIV[class~="event"].starts50
{ top: 52.083333%; }
-DIV.daysView DIV[class~="appointment"].starts51
+DIV#daysView DIV[class~="event"].starts51
{ top: 53.125000%; }
-DIV.daysView DIV[class~="appointment"].starts52
+DIV#daysView DIV[class~="event"].starts52
{ top: 54.166667%; }
-DIV.daysView DIV[class~="appointment"].starts53
+DIV#daysView DIV[class~="event"].starts53
{ top: 55.208333%; }
-DIV.daysView DIV[class~="appointment"].starts54
+DIV#daysView DIV[class~="event"].starts54
{ top: 56.250000%; }
-DIV.daysView DIV[class~="appointment"].starts55
+DIV#daysView DIV[class~="event"].starts55
{ top: 57.291667%; }
-DIV.daysView DIV[class~="appointment"].starts56
+DIV#daysView DIV[class~="event"].starts56
{ top: 58.333333%; }
-DIV.daysView DIV[class~="appointment"].starts57
+DIV#daysView DIV[class~="event"].starts57
{ top: 59.375000%; }
-DIV.daysView DIV[class~="appointment"].starts58
+DIV#daysView DIV[class~="event"].starts58
{ top: 60.416667%; }
-DIV.daysView DIV[class~="appointment"].starts59
+DIV#daysView DIV[class~="event"].starts59
{ top: 61.458333%; }
-DIV.daysView DIV[class~="appointment"].starts60
+DIV#daysView DIV[class~="event"].starts60
{ top: 62.500000%; }
-DIV.daysView DIV[class~="appointment"].starts61
+DIV#daysView DIV[class~="event"].starts61
{ top: 63.541667%; }
-DIV.daysView DIV[class~="appointment"].starts62
+DIV#daysView DIV[class~="event"].starts62
{ top: 64.583333%; }
-DIV.daysView DIV[class~="appointment"].starts63
+DIV#daysView DIV[class~="event"].starts63
{ top: 65.625000%; }
-DIV.daysView DIV[class~="appointment"].starts64
+DIV#daysView DIV[class~="event"].starts64
{ top: 66.666667%; }
-DIV.daysView DIV[class~="appointment"].starts65
+DIV#daysView DIV[class~="event"].starts65
{ top: 67.708333%; }
-DIV.daysView DIV[class~="appointment"].starts66
+DIV#daysView DIV[class~="event"].starts66
{ top: 68.750000%; }
-DIV.daysView DIV[class~="appointment"].starts67
+DIV#daysView DIV[class~="event"].starts67
{ top: 69.791667%; }
-DIV.daysView DIV[class~="appointment"].starts68
+DIV#daysView DIV[class~="event"].starts68
{ top: 70.833333%; }
-DIV.daysView DIV[class~="appointment"].starts69
+DIV#daysView DIV[class~="event"].starts69
{ top: 71.875000%; }
-DIV.daysView DIV[class~="appointment"].starts70
+DIV#daysView DIV[class~="event"].starts70
{ top: 72.916667%; }
-DIV.daysView DIV[class~="appointment"].starts71
+DIV#daysView DIV[class~="event"].starts71
{ top: 73.958333%; }
-DIV.daysView DIV[class~="appointment"].starts72
+DIV#daysView DIV[class~="event"].starts72
{ top: 75.000000%; }
-DIV.daysView DIV[class~="appointment"].starts73
+DIV#daysView DIV[class~="event"].starts73
{ top: 76.041667%; }
-DIV.daysView DIV[class~="appointment"].starts74
+DIV#daysView DIV[class~="event"].starts74
{ top: 77.083333%; }
-DIV.daysView DIV[class~="appointment"].starts75
+DIV#daysView DIV[class~="event"].starts75
{ top: 78.125000%; }
-DIV.daysView DIV[class~="appointment"].starts76
+DIV#daysView DIV[class~="event"].starts76
{ top: 79.166667%; }
-DIV.daysView DIV[class~="appointment"].starts77
+DIV#daysView DIV[class~="event"].starts77
{ top: 80.208333%; }
-DIV.daysView DIV[class~="appointment"].starts78
+DIV#daysView DIV[class~="event"].starts78
{ top: 81.250000%; }
-DIV.daysView DIV[class~="appointment"].starts79
+DIV#daysView DIV[class~="event"].starts79
{ top: 82.291667%; }
-DIV.daysView DIV[class~="appointment"].starts80
+DIV#daysView DIV[class~="event"].starts80
{ top: 83.333333%; }
-DIV.daysView DIV[class~="appointment"].starts81
+DIV#daysView DIV[class~="event"].starts81
{ top: 84.375000%; }
-DIV.daysView DIV[class~="appointment"].starts82
+DIV#daysView DIV[class~="event"].starts82
{ top: 85.416667%; }
-DIV.daysView DIV[class~="appointment"].starts83
+DIV#daysView DIV[class~="event"].starts83
{ top: 86.458333%; }
-DIV.daysView DIV[class~="appointment"].starts84
+DIV#daysView DIV[class~="event"].starts84
{ top: 87.500000%; }
-DIV.daysView DIV[class~="appointment"].starts85
+DIV#daysView DIV[class~="event"].starts85
{ top: 88.541667%; }
-DIV.daysView DIV[class~="appointment"].starts86
+DIV#daysView DIV[class~="event"].starts86
{ top: 89.583333%; }
-DIV.daysView DIV[class~="appointment"].starts87
+DIV#daysView DIV[class~="event"].starts87
{ top: 90.625000%; }
-DIV.daysView DIV[class~="appointment"].starts88
+DIV#daysView DIV[class~="event"].starts88
{ top: 91.666667%; }
-DIV.daysView DIV[class~="appointment"].starts89
+DIV#daysView DIV[class~="event"].starts89
{ top: 92.708333%; }
-DIV.daysView DIV[class~="appointment"].starts90
+DIV#daysView DIV[class~="event"].starts90
{ top: 93.750000%; }
-DIV.daysView DIV[class~="appointment"].starts91
+DIV#daysView DIV[class~="event"].starts91
{ top: 94.791667%; }
-DIV.daysView DIV[class~="appointment"].starts92
+DIV#daysView DIV[class~="event"].starts92
{ top: 95.833333%; }
-DIV.daysView DIV[class~="appointment"].starts93
+DIV#daysView DIV[class~="event"].starts93
{ top: 96.875000%; }
-DIV.daysView DIV[class~="appointment"].starts94
+DIV#daysView DIV[class~="event"].starts94
{ top: 97.916667%; }
-DIV.daysView DIV[class~="appointment"].starts95
+DIV#daysView DIV[class~="event"].starts95
{ top: 98.958333%; }
-DIV.daysView DIV[class~="appointment"].starts96
+DIV#daysView DIV[class~="event"].starts96
{ top: 100.000000%; }
-DIV.daysView DIV[class~="appointment"].lasts0
+DIV#daysView DIV[class~="event"].lasts0
{ height: 0px; }
-DIV.daysView DIV[class~="appointment"].lasts1
+DIV#daysView DIV[class~="event"].lasts1
{ height: 1.041667%; }
-DIV.daysView DIV[class~="appointment"].lasts2
+DIV#daysView DIV[class~="event"].lasts2
{ height: 2.083333%; }
-DIV.daysView DIV[class~="appointment"].lasts3
+DIV#daysView DIV[class~="event"].lasts3
{ height: 3.125000%; }
-DIV.daysView DIV[class~="appointment"].lasts4
+DIV#daysView DIV[class~="event"].lasts4
{ height: 4.166667%; }
-DIV.daysView DIV[class~="appointment"].lasts5
+DIV#daysView DIV[class~="event"].lasts5
{ height: 5.208333%; }
-DIV.daysView DIV[class~="appointment"].lasts6
+DIV#daysView DIV[class~="event"].lasts6
{ height: 6.250000%; }
-DIV.daysView DIV[class~="appointment"].lasts7
+DIV#daysView DIV[class~="event"].lasts7
{ height: 7.291667%; }
-DIV.daysView DIV[class~="appointment"].lasts8
+DIV#daysView DIV[class~="event"].lasts8
{ height: 8.333333%; }
-DIV.daysView DIV[class~="appointment"].lasts9
+DIV#daysView DIV[class~="event"].lasts9
{ height: 9.375000%; }
-DIV.daysView DIV[class~="appointment"].lasts10
+DIV#daysView DIV[class~="event"].lasts10
{ height: 10.416667%; }
-DIV.daysView DIV[class~="appointment"].lasts11
+DIV#daysView DIV[class~="event"].lasts11
{ height: 11.458333%; }
-DIV.daysView DIV[class~="appointment"].lasts12
+DIV#daysView DIV[class~="event"].lasts12
{ height: 12.500000%; }
-DIV.daysView DIV[class~="appointment"].lasts13
+DIV#daysView DIV[class~="event"].lasts13
{ height: 13.541667%; }
-DIV.daysView DIV[class~="appointment"].lasts14
+DIV#daysView DIV[class~="event"].lasts14
{ height: 14.583333%; }
-DIV.daysView DIV[class~="appointment"].lasts15
+DIV#daysView DIV[class~="event"].lasts15
{ height: 15.625000%; }
-DIV.daysView DIV[class~="appointment"].lasts16
+DIV#daysView DIV[class~="event"].lasts16
{ height: 16.666667%; }
-DIV.daysView DIV[class~="appointment"].lasts17
+DIV#daysView DIV[class~="event"].lasts17
{ height: 17.708333%; }
-DIV.daysView DIV[class~="appointment"].lasts18
+DIV#daysView DIV[class~="event"].lasts18
{ height: 18.750000%; }
-DIV.daysView DIV[class~="appointment"].lasts19
+DIV#daysView DIV[class~="event"].lasts19
{ height: 19.791667%; }
-DIV.daysView DIV[class~="appointment"].lasts20
+DIV#daysView DIV[class~="event"].lasts20
{ height: 20.833333%; }
-DIV.daysView DIV[class~="appointment"].lasts21
+DIV#daysView DIV[class~="event"].lasts21
{ height: 21.875000%; }
-DIV.daysView DIV[class~="appointment"].lasts22
+DIV#daysView DIV[class~="event"].lasts22
{ height: 22.916667%; }
-DIV.daysView DIV[class~="appointment"].lasts23
+DIV#daysView DIV[class~="event"].lasts23
{ height: 23.958333%; }
-DIV.daysView DIV[class~="appointment"].lasts24
+DIV#daysView DIV[class~="event"].lasts24
{ height: 25.000000%; }
-DIV.daysView DIV[class~="appointment"].lasts25
+DIV#daysView DIV[class~="event"].lasts25
{ height: 26.041667%; }
-DIV.daysView DIV[class~="appointment"].lasts26
+DIV#daysView DIV[class~="event"].lasts26
{ height: 27.083333%; }
-DIV.daysView DIV[class~="appointment"].lasts27
+DIV#daysView DIV[class~="event"].lasts27
{ height: 28.125000%; }
-DIV.daysView DIV[class~="appointment"].lasts28
+DIV#daysView DIV[class~="event"].lasts28
{ height: 29.166667%; }
-DIV.daysView DIV[class~="appointment"].lasts29
+DIV#daysView DIV[class~="event"].lasts29
{ height: 30.208333%; }
-DIV.daysView DIV[class~="appointment"].lasts30
+DIV#daysView DIV[class~="event"].lasts30
{ height: 31.250000%; }
-DIV.daysView DIV[class~="appointment"].lasts31
+DIV#daysView DIV[class~="event"].lasts31
{ height: 32.291667%; }
-DIV.daysView DIV[class~="appointment"].lasts32
+DIV#daysView DIV[class~="event"].lasts32
{ height: 33.333333%; }
-DIV.daysView DIV[class~="appointment"].lasts33
+DIV#daysView DIV[class~="event"].lasts33
{ height: 34.375000%; }
-DIV.daysView DIV[class~="appointment"].lasts34
+DIV#daysView DIV[class~="event"].lasts34
{ height: 35.416667%; }
-DIV.daysView DIV[class~="appointment"].lasts35
+DIV#daysView DIV[class~="event"].lasts35
{ height: 36.458333%; }
-DIV.daysView DIV[class~="appointment"].lasts36
+DIV#daysView DIV[class~="event"].lasts36
{ height: 37.500000%; }
-DIV.daysView DIV[class~="appointment"].lasts37
+DIV#daysView DIV[class~="event"].lasts37
{ height: 38.541667%; }
-DIV.daysView DIV[class~="appointment"].lasts38
+DIV#daysView DIV[class~="event"].lasts38
{ height: 39.583333%; }
-DIV.daysView DIV[class~="appointment"].lasts39
+DIV#daysView DIV[class~="event"].lasts39
{ height: 40.625000%; }
-DIV.daysView DIV[class~="appointment"].lasts40
+DIV#daysView DIV[class~="event"].lasts40
{ height: 41.666667%; }
-DIV.daysView DIV[class~="appointment"].lasts41
+DIV#daysView DIV[class~="event"].lasts41
{ height: 42.708333%; }
-DIV.daysView DIV[class~="appointment"].lasts42
+DIV#daysView DIV[class~="event"].lasts42
{ height: 43.750000%; }
-DIV.daysView DIV[class~="appointment"].lasts43
+DIV#daysView DIV[class~="event"].lasts43
{ height: 44.791667%; }
-DIV.daysView DIV[class~="appointment"].lasts44
+DIV#daysView DIV[class~="event"].lasts44
{ height: 45.833333%; }
-DIV.daysView DIV[class~="appointment"].lasts45
+DIV#daysView DIV[class~="event"].lasts45
{ height: 46.875000%; }
-DIV.daysView DIV[class~="appointment"].lasts46
+DIV#daysView DIV[class~="event"].lasts46
{ height: 47.916667%; }
-DIV.daysView DIV[class~="appointment"].lasts47
+DIV#daysView DIV[class~="event"].lasts47
{ height: 48.958333%; }
-DIV.daysView DIV[class~="appointment"].lasts48
+DIV#daysView DIV[class~="event"].lasts48
{ height: 50.000000%; }
-DIV.daysView DIV[class~="appointment"].lasts49
+DIV#daysView DIV[class~="event"].lasts49
{ height: 51.041667%; }
-DIV.daysView DIV[class~="appointment"].lasts50
+DIV#daysView DIV[class~="event"].lasts50
{ height: 52.083333%; }
-DIV.daysView DIV[class~="appointment"].lasts51
+DIV#daysView DIV[class~="event"].lasts51
{ height: 53.125000%; }
-DIV.daysView DIV[class~="appointment"].lasts52
+DIV#daysView DIV[class~="event"].lasts52
{ height: 54.166667%; }
-DIV.daysView DIV[class~="appointment"].lasts53
+DIV#daysView DIV[class~="event"].lasts53
{ height: 55.208333%; }
-DIV.daysView DIV[class~="appointment"].lasts54
+DIV#daysView DIV[class~="event"].lasts54
{ height: 56.250000%; }
-DIV.daysView DIV[class~="appointment"].lasts55
+DIV#daysView DIV[class~="event"].lasts55
{ height: 57.291667%; }
-DIV.daysView DIV[class~="appointment"].lasts56
+DIV#daysView DIV[class~="event"].lasts56
{ height: 58.333333%; }
-DIV.daysView DIV[class~="appointment"].lasts57
+DIV#daysView DIV[class~="event"].lasts57
{ height: 59.375000%; }
-DIV.daysView DIV[class~="appointment"].lasts58
+DIV#daysView DIV[class~="event"].lasts58
{ height: 60.416667%; }
-DIV.daysView DIV[class~="appointment"].lasts59
+DIV#daysView DIV[class~="event"].lasts59
{ height: 61.458333%; }
-DIV.daysView DIV[class~="appointment"].lasts60
+DIV#daysView DIV[class~="event"].lasts60
{ height: 62.500000%; }
-DIV.daysView DIV[class~="appointment"].lasts61
+DIV#daysView DIV[class~="event"].lasts61
{ height: 63.541667%; }
-DIV.daysView DIV[class~="appointment"].lasts62
+DIV#daysView DIV[class~="event"].lasts62
{ height: 64.583333%; }
-DIV.daysView DIV[class~="appointment"].lasts63
+DIV#daysView DIV[class~="event"].lasts63
{ height: 65.625000%; }
-DIV.daysView DIV[class~="appointment"].lasts64
+DIV#daysView DIV[class~="event"].lasts64
{ height: 66.666667%; }
-DIV.daysView DIV[class~="appointment"].lasts65
+DIV#daysView DIV[class~="event"].lasts65
{ height: 67.708333%; }
-DIV.daysView DIV[class~="appointment"].lasts66
+DIV#daysView DIV[class~="event"].lasts66
{ height: 68.750000%; }
-DIV.daysView DIV[class~="appointment"].lasts67
+DIV#daysView DIV[class~="event"].lasts67
{ height: 69.791667%; }
-DIV.daysView DIV[class~="appointment"].lasts68
+DIV#daysView DIV[class~="event"].lasts68
{ height: 70.833333%; }
-DIV.daysView DIV[class~="appointment"].lasts69
+DIV#daysView DIV[class~="event"].lasts69
{ height: 71.875000%; }
-DIV.daysView DIV[class~="appointment"].lasts70
+DIV#daysView DIV[class~="event"].lasts70
{ height: 72.916667%; }
-DIV.daysView DIV[class~="appointment"].lasts71
+DIV#daysView DIV[class~="event"].lasts71
{ height: 73.958333%; }
-DIV.daysView DIV[class~="appointment"].lasts72
+DIV#daysView DIV[class~="event"].lasts72
{ height: 75.000000%; }
-DIV.daysView DIV[class~="appointment"].lasts73
+DIV#daysView DIV[class~="event"].lasts73
{ height: 76.041667%; }
-DIV.daysView DIV[class~="appointment"].lasts74
+DIV#daysView DIV[class~="event"].lasts74
{ height: 77.083333%; }
-DIV.daysView DIV[class~="appointment"].lasts75
+DIV#daysView DIV[class~="event"].lasts75
{ height: 78.125000%; }
-DIV.daysView DIV[class~="appointment"].lasts76
+DIV#daysView DIV[class~="event"].lasts76
{ height: 79.166667%; }
-DIV.daysView DIV[class~="appointment"].lasts77
+DIV#daysView DIV[class~="event"].lasts77
{ height: 80.208333%; }
-DIV.daysView DIV[class~="appointment"].lasts78
+DIV#daysView DIV[class~="event"].lasts78
{ height: 81.250000%; }
-DIV.daysView DIV[class~="appointment"].lasts79
+DIV#daysView DIV[class~="event"].lasts79
{ height: 82.291667%; }
-DIV.daysView DIV[class~="appointment"].lasts80
+DIV#daysView DIV[class~="event"].lasts80
{ height: 83.333333%; }
-DIV.daysView DIV[class~="appointment"].lasts81
+DIV#daysView DIV[class~="event"].lasts81
{ height: 84.375000%; }
-DIV.daysView DIV[class~="appointment"].lasts82
+DIV#daysView DIV[class~="event"].lasts82
{ height: 85.416667%; }
-DIV.daysView DIV[class~="appointment"].lasts83
+DIV#daysView DIV[class~="event"].lasts83
{ height: 86.458333%; }
-DIV.daysView DIV[class~="appointment"].lasts84
+DIV#daysView DIV[class~="event"].lasts84
{ height: 87.500000%; }
-DIV.daysView DIV[class~="appointment"].lasts85
+DIV#daysView DIV[class~="event"].lasts85
{ height: 88.541667%; }
-DIV.daysView DIV[class~="appointment"].lasts86
+DIV#daysView DIV[class~="event"].lasts86
{ height: 89.583333%; }
-DIV.daysView DIV[class~="appointment"].lasts87
+DIV#daysView DIV[class~="event"].lasts87
{ height: 90.625000%; }
-DIV.daysView DIV[class~="appointment"].lasts88
+DIV#daysView DIV[class~="event"].lasts88
{ height: 91.666667%; }
-DIV.daysView DIV[class~="appointment"].lasts89
+DIV#daysView DIV[class~="event"].lasts89
{ height: 92.708333%; }
-DIV.daysView DIV[class~="appointment"].lasts90
+DIV#daysView DIV[class~="event"].lasts90
{ height: 93.750000%; }
-DIV.daysView DIV[class~="appointment"].lasts91
+DIV#daysView DIV[class~="event"].lasts91
{ height: 94.791667%; }
-DIV.daysView DIV[class~="appointment"].lasts92
+DIV#daysView DIV[class~="event"].lasts92
{ height: 95.833333%; }
-DIV.daysView DIV[class~="appointment"].lasts93
+DIV#daysView DIV[class~="event"].lasts93
{ height: 96.875000%; }
-DIV.daysView DIV[class~="appointment"].lasts94
+DIV#daysView DIV[class~="event"].lasts94
{ height: 97.916667%; }
-DIV.daysView DIV[class~="appointment"].lasts95
+DIV#daysView DIV[class~="event"].lasts95
{ height: 98.958333%; }
-DIV.daysView DIV[class~="appointment"].lasts96
+DIV#daysView DIV[class~="event"].lasts96
{ height: 100.000000%; }
var usersRightsWindowWidth = 502;
function newEvent(sender, type) {
- var day = sender.getAttribute("day");
+ var day = sender.day;
if (!day)
day = currentDay;
&& currentView == "multicolumndayview" && type == "event")
user = sender.parentNode.parentNode.getAttribute("user");
- var hour = sender.getAttribute("hour");
+ var hour = sender.hour;
+ if (!hour)
+ hour = sender.getAttribute("hour");
var urlstr = UserFolderURL + "../" + user + "/Calendar/new" + type;
var params = new Array();
if (day)
urlBase += "Calendar/"
var urlstr = urlBase + id + "/edit";
-
- var win = window.open(urlstr, "SOGo_edit_" + id,
+ var targetname = "SOGo_edit_" + id;
+ var win = window.open(urlstr, "_blank",
"width=490,height=470,resizable=0");
win.focus();
}
for (var i = 0; i < nodes.length; i++)
_editEventId(nodes[i].getAttribute("id"),
- nodes[i].getAttribute("owner"));
+ nodes[i].owner);
} else if (selectedCalendarCell) {
- _editEventId(selectedCalendarCell.getAttribute("aptCName"),
- selectedCalendarCell.getAttribute("owner"));
+ _editEventId(selectedCalendarCell[0].cname,
+ selectedCalendarCell[0].owner);
}
return false; /* stop following the link */
if (listOfSelection == $("tasksList"))
label = labels["taskDeleteConfirmation"].decodeEntities();
else
- label = labels["appointmentDeleteConfirmation"].decodeEntities();
+ label = labels["eventDeleteConfirmation"].decodeEntities();
if (confirm(label)) {
if (document.deleteEventAjaxRequest) {
var owners = new Array();
for (var i = 0; i < nodes.length; i++) {
- var owner = nodes[i].getAttribute("owner");
+ var owner = nodes[i].owner;
if (!sortedNodes[owner]) {
sortedNodes[owner] = new Array();
owners.push(owner);
}
- sortedNodes[owner].push(nodes[i].getAttribute("id"));
+ sortedNodes[owner].push(nodes[i].cname);
}
for (var i = 0; i < owners.length; i++) {
ownersOfEventsToDelete.push(owners[i]);
}
}
else if (selectedCalendarCell) {
- var label = labels["appointmentDeleteConfirmation"].decodeEntities();
+ var label = labels["eventDeleteConfirmation"].decodeEntities();
if (confirm(label)) {
if (document.deleteEventAjaxRequest) {
document.deleteEventAjaxRequest.aborted = true;
document.deleteEventAjaxRequest.abort();
}
- eventsToDelete.push([selectedCalendarCell.getAttribute("aptCName")]);
- ownersOfEventsToDelete.push(selectedCalendarCell.getAttribute("owner"));
+ eventsToDelete.push([selectedCalendarCell[0].cname]);
+ ownersOfEventsToDelete.push(selectedCalendarCell[0].owner);
_batchDeleteEvents();
}
}
if (queryParameters["mail-invitation"].toLowerCase() == "yes")
closeInvitationWindow();
else {
- window.opener.setTimeout("refreshAppointmentsAndDisplay();", 100);
+ window.opener.setTimeout("refreshEventsAndDisplay();", 100);
window.setTimeout("window.close();", 100);
}
}
else {
- log("showing alert...");
+// log("showing alert...");
window.alert(labels["eventPartStatModificationError"]);
}
document.modifyEventAjaxRequest = null;
_batchDeleteEvents();
else {
document.deleteEventAjaxRequest = null;
- refreshAppointments();
+ refreshEvents();
refreshTasks();
changeCalendarDisplay();
}
}
else
- log ("ajax fuckage");
+ log ("deleteEventCallback Ajax error");
}
-function editDoubleClickedEvent(node) {
- _editEventId(node.getAttribute("id"),
- node.getAttribute("owner"));
-
- return false;
+function editDoubleClickedEvent(event) {
+ _editEventId(this.cname, this.owner);
+
+ preventDefault(event);
+ event.cancelBubble = true;
}
function onSelectAll() {
- var list = $("appointmentsList");
- list.selectRowsMatchingClass("appointmentRow");
+ var list = $("eventsList");
+ list.selectRowsMatchingClass("eventRow");
return false;
}
-function displayAppointment(event) {
- _editEventId(this.getAttribute("aptCName"),
- this.getAttribute("owner"));
-
- preventDefault(event);
- event.stopPropagation();
- event.cancelBubble = true;
- event.returnValue = false;
-}
-
function onDaySelect(node) {
- var day = node.getAttribute("day");
+ var day = node.getAttribute('day');
var needRefresh = (listFilter == 'view_selectedday'
&& day != currentDay);
- var td = node.getParentWithTagName("td");
- var table = td.getParentWithTagName("table");
+ var td = $(node).getParentWithTagName("td");
+ var table = $(td).getParentWithTagName("table");
// log ("table.selected: " + table.selected);
changeCalendarDisplay( { "day": day } );
if (needRefresh)
- refreshAppointments();
+ refreshEvents();
return false;
}
cachedDateSelectors[http.callbackData] = content;
}
else
- log ("ajax fuckage");
+ log ("dateSelectorCallback Ajax error");
}
-function appointmentsListCallback(http) {
- var div = $("appointmentsListView");
-
+function eventsListCallback(http) {
if (http.readyState == 4
&& http.status == 200) {
- document.appointmentsListAjaxRequest = null;
- div.innerHTML = http.responseText;
+ var div = $("eventsListView");
+
+ document.eventsListAjaxRequest = null;
+ var table = $("eventsList").tBodies[0];
var params = parseQueryParameters(http.callbackData);
sortKey = params["sort"];
sortOrder = params["desc"];
- var list = $("appointmentsList");
- Event.observe(list, "selectionchange", onAppointmentsSelectionChange.bindAsEventListener(list), true);
configureSortableTableHeaders();
+
+ var data = http.responseText.evalJSON(true);
+ for (var i = 0; i < data.length; i++) {
+ var row = document.createElement("tr");
+ table.appendChild(row);
+ $(row).addClassName("eventRow");
+ row.setAttribute("id", data[i][0]);
+ row.cname = data[i][0];
+ row.owner = data[i][1];
+
+ var startDate = new Date();
+ startDate.setTime(data[i][4] * 1000);
+ row.day = startDate.getDayString();
+ row.hour = startDate.getHourString();
+ Event.observe(row, "click", onEventClick.bindAsEventListener(row));
+ Event.observe(row, "dblclick", editDoubleClickedEvent.bindAsEventListener(row));
+ Event.observe(row, "contextmenu",
+ onEventContextMenu.bindAsEventListener(row));
+
+ var td = document.createElement("td");
+ row.appendChild(td);
+ Event.observe(td, "mousedown", listRowMouseDownHandler, true);
+ td.appendChild(document.createTextNode(data[i][3]));
+
+ td = document.createElement("td");
+ row.appendChild(td);
+ Event.observe(td, "mousedown", listRowMouseDownHandler, true);
+ td.appendChild(document.createTextNode(data[i][8]));
+
+ td = document.createElement("td");
+ row.appendChild(td);
+ Event.observe(td, "mousedown", listRowMouseDownHandler, true);
+ td.appendChild(document.createTextNode(data[i][9]));
+
+ td = document.createElement("td");
+ row.appendChild(td);
+ Event.observe(td, "mousedown", listRowMouseDownHandler, true);
+ td.appendChild(document.createTextNode(data[i][6]));
+ }
}
else
- log ("ajax fuckage");
+ log ("eventsListCallback Ajax error");
}
function tasksListCallback(http) {
&& http.status == 200) {
document.tasksListAjaxRequest = null;
var list = $("tasksList");
- var scroll = list.scrollTop;
- div.innerHTML = http.responseText;
- list = $("tasksList");
- Event.observe(list, "selectionchange", onTasksSelectionChange.bindAsEventListener(list), true);
- list.scrollTop = scroll;
+ var data = http.responseText.evalJSON(true);
+
+ for (var i = 0; i < data.length; i++) {
+ //log(i + " = " + data[i][3]);
+ var listItem = document.createElement("li");
+ list.appendChild(listItem);
+ Event.observe(listItem, "mousedown", listRowMouseDownHandler); // causes problem with Safari
+ Event.observe(listItem, "click", onRowClick);
+ Event.observe(listItem, "dblclick", editDoubleClickedEvent.bindAsEventListener(listItem));
+ listItem.setAttribute("id", data[i][0]);
+ $(listItem).addClassName(data[i][5]);
+ var owner = data[i][1];
+ listItem.owner = owner;
+ $(listItem).addClassName("ownerIs" + owner);
+ listItem.cname = data[i][0];
+ var input = document.createElement("input");
+ input.setAttribute("type", "checkbox");
+ listItem.appendChild(input);
+ Event.observe(input, "click", updateTaskStatus.bindAsEventListener(input), true);
+ input.setAttribute("value", "1");
+ if (data[i][2] == 1)
+ input.setAttribute("checked", "checked");
+ $(input).addClassName("checkBox");
+ listItem.appendChild(document.createTextNode(data[i][3]));
+ }
+
+ list.scrollTop = list.previousScroll;
+
if (http.callbackData) {
var selectedNodesId = http.callbackData;
- for (var i = 0; i < selectedNodesId.length; i++)
+ for (var i = 0; i < selectedNodesId.length; i++) {
+// log(selectedNodesId[i] + " (" + i + ") is selected");
$(selectedNodesId[i]).select();
+ }
}
+ else
+ log ("tasksListCallback: no data");
}
else
- log ("ajax fuckage");
+ log ("tasksListCallback Ajax error");
}
function restoreCurrentDaySelection(div) {
var i = 9;
while (!day && i < elements.length)
{
- day = elements[i].getAttribute("day");
+ day = elements[i].day;
i++;
}
if (day
&& day.substr(0, 6) == currentDay.substr(0, 6)) {
for (i = 0; i < elements.length; i++) {
- day = elements[i].getAttribute("day");
+ day = elements[i].day;
if (day && day == currentDay) {
var td = elements[i].getParentWithTagName("td");
if (document.selectedDate)
document.dayDisplayAjaxRequest.aborted = true;
document.dayDisplayAjaxRequest.abort();
}
- document.dayDisplayAjaxRequest = triggerAjaxRequest(url,
- calendarDisplayCallback,
- { "view": newView,
- "day": day,
- "hour": hour });
+ document.dayDisplayAjaxRequest
+ = triggerAjaxRequest(url, calendarDisplayCallback,
+ { "view": newView, "day": day, "hour": hour });
return false;
}
rowNumber = 8;
var daysView = $("daysView");
- var hours = $(daysView.childNodesWithTag("div")[0]).childNodesWithTag("div");
+ var hours =
+ $(daysView.childNodesWithTag("div")[0]).childNodesWithTag("div");
if (hours.length > 0)
- daysView.parentNode.scrollTop = hours[rowNumber + 1].offsetTop;
+ daysView.scrollTop = hours[rowNumber].offsetTop;
}
function onClickableCellsDblClick(event) {
event.returnValue = false;
}
+function refreshCalendarEvents() {
+ var todayDate = new Date();
+ var sd;
+ var ed;
+ if (currentView == "dayview") {
+ if (currentDay)
+ sd = currentDay;
+ else
+ sd = todayDate.getDayString();
+ ed = sd;
+ }
+ else if (currentView == "weekview") {
+ var startDate;
+ if (currentDay)
+ startDate = currentDay.asDate();
+ else
+ startDate = todayDate;
+ startDate = startDate.beginOfWeek();
+ sd = startDate.getDayString();
+ var endDate = new Date();
+ endDate.setTime(startDate.getTime());
+ endDate.addDays(6);
+ ed = endDate.getDayString();
+ }
+ else {
+ var monthDate;
+ if (currentDay)
+ monthDate = currentDay.asDate();
+ else
+ monthDate = todayDate;
+ monthDate.setDate(1);
+ sd = monthDate.beginOfWeek().getDayString();
+
+ var lastMonthDate = new Date();
+ lastMonthDate.setTime(monthDate.getTime());
+ lastMonthDate.setMonth(monthDate.getMonth() + 1);
+ lastMonthDate.addDays(-1);
+ ed = lastMonthDate.endOfWeek().getDayString();
+ }
+ if (document.refreshCalendarEventsAjaxRequest) {
+ document.refreshCalendarEventsAjaxRequest.aborted = true;
+ document.refreshCalendarEventsAjaxRequest.abort();
+ }
+ var url = ApplicationBaseURL + "eventslist?sd=" + sd + "&ed=" + ed;
+ document.refreshCalendarEventsAjaxRequest
+ = triggerAjaxRequest(url, refreshCalendarEventsCallback,
+ {"startDate": sd, "endDate": ed});
+}
+
+function refreshCalendarEventsCallback(http) {
+ if (http.readyState == 4
+ && http.status == 200) {
+ var data = http.responseText.evalJSON(true);
+// log("refresh calendar events: " + data.length);
+ for (var i = 0; i < data.length; i++)
+ drawCalendarEvent(data[i],
+ http.callbackData["startDate"],
+ http.callbackData["endDate"]);
+ }
+ else
+ log("AJAX error when refreshing calendar events");
+}
+
+function drawCalendarEvent(eventData, sd, ed) {
+ var viewStartDate = sd.asDate();
+ var viewEndDate = ed.asDate();
+
+ var startDate = new Date();
+ startDate.setTime(eventData[4] * 1000);
+ var endDate = new Date();
+ endDate.setTime(eventData[5] * 1000);
+
+ var days = startDate.daysUpTo(endDate);
+
+ var divs = new Array();
+
+ var title = eventData[3];
+// log("title: " + title);
+// log("viewS: " + viewStartDate);
+ var startHour = null;
+ var endHour = null;
+
+ var siblings = new Array();
+ for (var i = 0; i < days.length; i++)
+ if (days[i].earlierDate(viewStartDate) == viewStartDate
+ && days[i].laterDate(viewEndDate) == viewEndDate) {
+ var starts;
+
+// log("day: " + days[i]);
+ if (i == 0) {
+ var quarters = (startDate.getHours() * 4
+ + Math.floor(startDate.getMinutes() / 15));
+ starts = quarters;
+ startHour = startDate.getDisplayHoursString();
+ endHour = endDate.getDisplayHoursString();
+ }
+ else
+ starts = 0;
+
+ var ends;
+ var lasts;
+ if (i == days.length - 1) {
+ var quarters = (endDate.getHours() * 4
+ + Math.ceil(endDate.getMinutes() / 15));
+ ends = quarters;
+ }
+ else
+ ends = 96;
+ lasts = ends - starts;
+ if (!lasts)
+ lasts = 1;
+
+ var eventDiv = newEventDIV(eventData[0], eventData[1], starts, lasts,
+ null, null, title);
+ siblings.push(eventDiv);
+ eventDiv.siblings = siblings;
+ var dayString = days[i].getDayString();
+// log("day: " + dayString);
+ var parentDiv = null;
+ if (currentView == "monthview") {
+ var dayDivs = $("monthDaysView").childNodesWithTag("div");
+ var j = 0;
+ while (!parentDiv && j < dayDivs.length) {
+ if (dayDivs[j].getAttribute("day") == dayString)
+ parentDiv = dayDivs[j];
+ else
+ j++;
+ }
+ }
+ else {
+ if (eventData[7] == 0) {
+ var daysView = $("daysView");
+ var eventsDiv = $(daysView).childNodesWithTag("div")[1];
+ var dayDivs = $(eventsDiv).childNodesWithTag("div");
+ var j = 0;
+ while (!parentDiv && j < dayDivs.length) {
+ if (dayDivs[j].getAttribute("day") == dayString)
+ parentDiv = dayDivs[j].childNodesWithTag("div")[0];
+ else
+ j++;
+ }
+ }
+ else {
+ var header = $("calendarHeader");
+ var daysDiv = $(header).childNodesWithTag("div")[1];
+ var dayDivs = $(daysDiv).childNodesWithTag("div");
+ var j = 0;
+ while (!parentDiv && j < dayDivs.length) {
+ if (dayDivs[j].getAttribute("day") == dayString)
+ parentDiv = dayDivs[j];
+ else
+ j++;
+ }
+ }
+ }
+ if (parentDiv)
+ parentDiv.appendChild(eventDiv);
+ }
+}
+
+function newEventDIV(cname, owner, starts, lasts,
+ startHour, endHour, title) {
+ var eventDiv = document.createElement("div");
+ eventDiv.cname = cname;
+ eventDiv.owner = owner;
+ eventDiv.addClassName("event");
+ eventDiv.addClassName("starts" + starts);
+ eventDiv.addClassName("lasts" + lasts);
+ for (var i = 1; i < 5; i++) {
+ var shadowDiv = document.createElement("div");
+ eventDiv.appendChild(shadowDiv);
+ shadowDiv.addClassName("shadow");
+ shadowDiv.addClassName("shadow" + i);
+ }
+ var innerDiv = document.createElement("div");
+ eventDiv.appendChild(innerDiv);
+ innerDiv.addClassName("eventInside");
+ innerDiv.addClassName("ownerIs" + owner);
+
+ var gradientDiv = document.createElement("div");
+ innerDiv.appendChild(gradientDiv);
+ gradientDiv.addClassName("gradient");
+ var gradientImg = document.createElement("img");
+ gradientDiv.appendChild(gradientImg);
+ gradientImg.src = ResourcesURL + "/event-gradient.png";
+
+ var textDiv = document.createElement("div");
+ innerDiv.appendChild(textDiv);
+ textDiv.addClassName("text");
+ if (startHour) {
+ var headerSpan = document.createElement("span");
+ textDiv.appendChild(headerSpan);
+ headerSpan.addClassName("eventHeader");
+ headerSpan.appendChild(document.createTextNode(startHour + " - "
+ + endHour));
+ textDiv.appendChild(document.createElement("br"));
+ }
+ textDiv.appendChild(document.createTextNode(title));
+
+ Event.observe(eventDiv, "mousedown", listRowMouseDownHandler);
+ Event.observe(eventDiv, "click",
+ onCalendarSelectEvent.bindAsEventListener(eventDiv));
+ Event.observe(eventDiv, "dblclick",
+ editDoubleClickedEvent.bindAsEventListener(eventDiv));
+
+ return eventDiv;
+}
+
function calendarDisplayCallback(http) {
var div = $("calendarView");
- //log ("calendarDisplayCallback: " + div);
if (http.readyState == 4
&& http.status == 200) {
document.dayDisplayAjaxRequest = null;
scrollDayView(hour);
contentView = $("daysView");
}
- var appointments = document.getElementsByClassName("appointment", contentView);
- for (var i = 0; i < appointments.length; i++) {
- Event.observe(appointments[i], "mousedown", listRowMouseDownHandler);
- Event.observe(appointments[i], "click", onCalendarSelectAppointment.bindAsEventListener(appointments[i]));
- Event.observe(appointments[i], "dblclick", displayAppointment.bindAsEventListener(appointments[i]));
- }
+ refreshCalendarEvents();
var days = document.getElementsByClassName("day", contentView);
if (currentView == "monthview")
for (var i = 0; i < days.length; i++) {
Event.observe(days[i], "click", onCalendarSelectDay.bindAsEventListener(days[i]));
Event.observe(days[i], "dblclick", onClickableCellsDblClick.bindAsEventListener(days[i]));
}
- else
- for (var i = 0; i < days.length; i++) {
- Event.observe(days[i], "click", onCalendarSelectDay.bindAsEventListener(days[i]));
- var clickableCells = document.getElementsByClassName("clickableHourCell",
- days[i]);
- for (var j = 0; j < clickableCells.length; j++)
- Event.observe(clickableCells[j], "dblclick", onClickableCellsDblClick.bindAsEventListener(clickableCells[j]));
- }
-// log("cbtest1");
+ else {
+ var headerDivs = $("calendarHeader").childNodesWithTag("div");
+ var headerDaysLabels = document.getElementsByClassName("day", headerDivs[0]);
+ var headerDays = document.getElementsByClassName("day", headerDivs[1]);
+ for (var i = 0; i < days.length; i++) {
+ headerDays[i].hour = "allday";
+ Event.observe(headerDaysLabels[i], "mousedown", listRowMouseDownHandler);
+ Event.observe(headerDays[i], "click",
+ onCalendarSelectDay.bindAsEventListener(days[i]));
+ Event.observe(headerDays[i], "dblclick",
+ onClickableCellsDblClick.bindAsEventListener(headerDays[i]));
+ Event.observe(days[i], "click",
+ onCalendarSelectDay.bindAsEventListener(days[i]));
+ var clickableCells = document.getElementsByClassName("clickableHourCell",
+ days[i]);
+ for (var j = 0; j < clickableCells.length; j++)
+ Event.observe(clickableCells[j], "dblclick",
+ onClickableCellsDblClick.bindAsEventListener(clickableCells[j]));
+ }
+ }
}
else
- log ("ajax fuckage");
+ log ("calendarDisplayCallback Ajax error (" + http.readyState + "/" + http.status + ")");
}
function assignCalendar(name) {
return false;
}
-function onAppointmentContextMenu(event, element) {
- var topNode = $("appointmentsList");
+function onEventContextMenu(event) {
+ var topNode = $("eventsList");
// log(topNode);
- var menu = $("appointmentsListMenu");
+ var menu = $("eventsListMenu");
- Event.observe(menu, "hideMenu", onAppointmentContextMenuHide);
- popupMenu(event, "appointmentsListMenu", element);
+ Event.observe(menu, "hideMenu", onEventContextMenuHide);
+ popupMenu(event, "eventsListMenu", this);
- var topNode = $("appointmentsList");
+ var topNode = $("eventsList");
var selectedNodes = topNode.getSelectedRows();
topNode.menuSelectedRows = selectedNodes;
for (var i = 0; i < selectedNodes.length; i++)
selectedNodes[i].deselect();
- topNode.menuSelectedEntry = element;
- element.select();
+ topNode.menuSelectedEntry = this;
+ this.select();
}
-function onAppointmentContextMenuHide(event) {
- var topNode = $("appointmentsList");
+function onEventContextMenuHide(event) {
+ var topNode = $("eventsList");
if (topNode.menuSelectedEntry) {
topNode.menuSelectedEntry.deselect();
}
}
-function onAppointmentsSelectionChange() {
+function onEventsSelectionChange() {
listOfSelection = this;
this.removeClassName("_unfocused");
$("tasksList").addClassName("_unfocused");
function onTasksSelectionChange() {
listOfSelection = this;
this.removeClassName("_unfocused");
- $("appointmentsList").addClassName("_unfocused");
+ $("eventsList").addClassName("_unfocused");
}
-function _loadAppointmentHref(href) {
- if (document.appointmentsListAjaxRequest) {
- document.appointmentsListAjaxRequest.aborted = true;
- document.appointmentsListAjaxRequest.abort();
+function _loadEventHref(href) {
+ if (document.eventsListAjaxRequest) {
+ document.eventsListAjaxRequest.aborted = true;
+ document.eventsListAjaxRequest.abort();
}
var url = ApplicationBaseURL + href;
- document.appointmentsListAjaxRequest
- = triggerAjaxRequest(url, appointmentsListCallback, href);
+ document.eventsListAjaxRequest
+ = triggerAjaxRequest(url, eventsListCallback, href);
+
+ var table = $("eventsList").tBodies[0];
+ while (table.rows.length > 1)
+ table.removeChild(table.rows[1]);
return false;
}
}
url = ApplicationBaseURL + href;
- var selectedIds = $("tasksList").getSelectedNodesId();
+ var tasksList = $("tasksList");
+ var selectedIds;
+ if (tasksList)
+ selectedIds = tasksList.getSelectedNodesId();
+ else
+ selectedIds = null;
document.tasksListAjaxRequest
= triggerAjaxRequest(url, tasksListCallback, selectedIds);
- return false;
+ tasksList.previousScroll = tasksList.scrollTop;
+ while (tasksList.childNodes.length)
+ tasksList.removeChild(tasksList.childNodes[0]);
+
+ return true;
}
function onHeaderClick(event) {
// log("onHeaderClick: " + this.link);
- _loadAppointmentHref(this.link);
+ _loadEventHref(this.link);
preventDefault(event);
}
-function refreshAppointments() {
- return _loadAppointmentHref("aptlist?desc=" + sortOrder
- + "&sort=" + sortKey
- + "&day=" + currentDay
- + "&filterpopup=" + listFilter);
+function refreshEvents() {
+ return _loadEventHref("eventslist?desc=" + sortOrder
+ + "&sort=" + sortKey
+ + "&day=" + currentDay
+ + "&filterpopup=" + listFilter);
}
function refreshTasks() {
return _loadTasksHref("taskslist?show-completed=" + showCompletedTasks);
}
-function refreshAppointmentsAndDisplay() {
- refreshAppointments();
+function refreshEventsAndDisplay() {
+ refreshEvents();
changeCalendarDisplay();
}
listFilter = node.value;
// log ("listFilter = " + listFilter);
- return refreshAppointments();
+ return refreshEvents();
}
-function onAppointmentClick(event) {
+function onEventClick(event) {
var target = getTarget(event);
var node = target.getParentWithTagName("tr");
- var day = node.getAttribute("day");
- var hour = node.getAttribute("hour");
+ var day = node.day;
+ var hour = node.hour;
changeCalendarDisplay( { "day": day, "hour": hour} );
changeDateSelectorDisplay(day);
var year = '' + $("yearLabel").innerHTML;
changeDateSelectorDisplay(year + month + "01", true);
-
-// event.cancelBubble();
}
function onYearMenuItemClick(event) {
return false;
}
-function onCalendarSelectAppointment() {
- var list = $("appointmentsList");
+function onCalendarSelectEvent() {
+ var list = $("eventsList");
list.deselectAll();
- var aptCName = this.getAttribute("aptCName");
if (selectedCalendarCell)
- selectedCalendarCell.deselect();
- this.select();
- selectedCalendarCell = this;
- var row = $(aptCName);
+ for (var i = 0; i < selectedCalendarCell.length; i++)
+ selectedCalendarCell[i].deselect();
+
+ for (var i = 0; i < this.siblings.length; i++)
+ this.siblings[i].select();
+ selectedCalendarCell = this.siblings;
+ var row = $(this.cname);
if (row) {
var div = row.parentNode.parentNode.parentNode;
div.scrollTop = row.offsetTop - (div.offsetHeight / 2);
function onCalendarSelectDay(event) {
var day;
if (currentView == "multicolumndayview")
- day = this.parentNode.getAttribute("day");
+ day = this.getAttribute("day");
else
day = this.getAttribute("day");
var needRefresh = (listFilter == 'view_selectedday'
}
if (needRefresh)
- refreshAppointments();
+ refreshEvents();
}
function changeWeekCalendarDisplayOfSelectedDay(node) {
var days = document.getElementsByClassName("day", node.parentNode);
+ var headerDiv = $("calendarHeader").childNodesWithTag("div")[1];
+ var headerDays = document.getElementsByClassName("day", headerDiv);
+// log ("days: " + days.length + "; headerDays: " + headerDays.length);
for (var i = 0; i < days.length; i++)
- if (days[i] != node)
- days[i].removeClassName("selectedDay");
-
- node.addClassName("selectedDay");
+ if (days[i] != node) {
+// log("unselect day : " + i);
+ headerDays[i].removeClassName("selectedDay");
+ days[i].removeClassName("selectedDay");
+ }
+ else {
+// log("selected day : " + i);
+ headerDays[i].addClassName("selectedDay");
+ days[i].addClassName("selectedDay");
+ }
}
function findMonthCalendarSelectedCell(daysContainer) {
node.addClassName("selectedDay");
}
-function onShowCompletedTasks(node) {
- showCompletedTasks = (node.checked ? 1 : 0);
+function onShowCompletedTasks(event) {
+ showCompletedTasks = (this.checked ? 1 : 0);
- return refreshTasks();
+ return refreshTasks();
}
-function updateTaskStatus(node) {
- var taskId = node.parentNode.getAttribute("id");
- var taskOwner = node.parentNode.getAttribute("owner");
- var newStatus = (node.checked ? 1 : 0);
-// log ("update task status: " + taskId);
-
+function updateTaskStatus(event) {
+ var taskId = this.parentNode.getAttribute("id");
+ var taskOwner = this.parentNode.owner;
+ var newStatus = (this.checked ? 1 : 0);
var http = createHTTPClient();
-
- url = (UserFolderURL + "../" + taskOwner + "/Calendar/"
- + taskId + "/changeStatus?status=" + newStatus);
+
+// log("update task status: " + taskId + " to " + this.checked);
+ event.cancelBubble = true;
+
+ url = (UserFolderURL + "../" + taskOwner
+ + "/Calendar/" + taskId
+ + "/changeStatus?status=" + newStatus);
if (http) {
// log ("url: " + url);
// TODO: add parameter to signal that we are only interested in OK
+ http.open("POST", url, false /* not async */);
http.url = url;
- http.open("GET", url, false /* not async */);
http.send("");
if (http.status == 200)
refreshTasks();
var folderID = this.parentNode.getAttribute("id");
var urlstr = URLForFolderID(folderID);
if (this.checked)
- urlstr += "/activateFolder";
+ urlstr += "/activateFolder";
else
- urlstr += "/deactivateFolder";
+ urlstr += "/deactivateFolder";
+ //log("updateCalendarStatus: ajax request = " + urlstr + ", folderID = " + folderID);
triggerAjaxRequest(urlstr, calendarStatusCallback, folderID);
}
else {
updateCalendarsList();
- refreshAppointments();
+ refreshEvents();
refreshTasks();
changeCalendarDisplay();
}
}
function calendarStatusCallback(http) {
- if (http.readyState == 4) {
- if (http.status == 204) {
- refreshAppointments();
+ if (http.readyState == 4) {
+ if (isHttpStatus204(http.status)) {
+ refreshEvents();
refreshTasks();
changeCalendarDisplay();
}
else {
- var folder = $(http.callbackData);
+ var folder = $(http.callbackData);
var input = folder.childNodesWithTag("input")[0];
- input.checked = (!input.checked);
+ input.checked = (!input.checked);
}
}
+ else
+ log("calendarStatusCallback Ajax error");
}
function calendarEntryCallback(http) {
dateMenu.push(onYearMenuItemClick);
menus["yearListMenu"] = dateMenu;
- menus["appointmentsListMenu"] = new Array(onMenuNewEventClick, "-",
+ menus["eventsListMenu"] = new Array(onMenuNewEventClick, "-",
onMenuNewTaskClick,
editEvent, deleteEvent, "-",
onSelectAll, "-",
handle = $("rightDragHandle");
if (handle) {
handle.addInterface(SOGoDragHandlesInterface);
- handle.upperBlock=$("appointmentsListView");
+ handle.upperBlock=$("eventsListView");
handle.lowerBlock=$("calendarView");
}
}
var list = $("calendarList").childNodesWithTag("li");
for (var i = 0; i < list.length; i++) {
var input = list[i].childNodesWithTag("input")[0];
- Event.observe(input, "change", updateCalendarStatus.bindAsEventListener(input));
- Event.observe(list[i], "mousedown", listRowMouseDownHandler);
+ Event.observe(input, "click", updateCalendarStatus.bindAsEventListener(input)); // not registered in IE?
+ //Event.observe(list[i], "mousedown", listRowMouseDownHandler, true); // problem with Safari
Event.observe(list[i], "click", onRowClick);
}
var lis = calendarList.childNodesWithTag("li");
var color = indexColor(lis.length);
log ("color: " + color);
+
var li = document.createElement("li");
- li.setAttribute("id", folder);
- Event.observe(li, "mousedown", listRowMouseDownHandler);
- Event.observe(li, "click", onRowClick);
+ calendarList.appendChild(li);
+
var checkBox = document.createElement("input");
- checkBox.addClassName("checkBox");
- checkBox.type = "checkbox";
- Event.observe(checkBox, "change", updateCalendarStatus);
li.appendChild(checkBox);
+
li.appendChild(document.createTextNode(" "));
+
var colorBox = document.createElement("div");
+ li.appendChild(colorBox);
+ li.appendChild(document.createTextNode(" " + folderName));
colorBox.appendChild(document.createTextNode("OO"));
+
+ li.setAttribute("id", folder);
+ Event.observe(li, "mousedown", listRowMouseDownHandler);
+ Event.observe(li, "click", onRowClick);
+ checkBox.addClassName("checkBox");
+ checkBox.type = "checkbox";
+ Event.observe(checkBox, "click", updateCalendarStatus.bindAsEventListener(checkBox));
+
colorBox.addClassName("colorBox");
if (color) {
colorBox.setStyle({ color: color,
backgroundColor: color });
}
- li.appendChild(colorBox);
- li.appendChild(document.createTextNode(" " + folderName));
-
- calendarList.appendChild(li);
var contactId = folder.split(":")[0];
var styles = document.getElementsByTagName("style");
Event.observe(searchValue, "keydown", onSearchKeyDown.bindAsEventListener(searchValue));
}
+function configureLists() {
+ var list = $("tasksList");
+ list.multiselect = true;
+ Event.observe(list, "mousedown",
+ onTasksSelectionChange.bindAsEventListener(list));
+
+ var input = $("showHideCompletedTasks");
+ Event.observe(input, "click",
+ onShowCompletedTasks.bindAsEventListener(input));
+
+ list = $("eventsList");
+ list.multiselect = true;
+ Event.observe(list, "mousedown",
+ onEventsSelectionChange.bindAsEventListener(list));
+ var div = list.parentNode;
+ Event.observe(div, "contextmenu",
+ onEventContextMenu.bindAsEventListener(div));
+}
+
function initCalendars() {
if (!document.body.hasClassName("popup")) {
initCalendarSelector();
configureSearchField();
+ configureLists();
var selector = $("calendarSelector");
if (selector)
selector.attachMenu("calendarsMenu");
return $('endTime_date').valueAsShortDateString();
}
-this._getDate = function(which) {
+function _getDate(which) {
var date = window.timeWidgets[which]['date'].valueAsDate();
date.setHours( window.timeWidgets[which]['hour'].value );
date.setMinutes( window.timeWidgets[which]['minute'].value );
return date;
}
-this._getShadowDate = function(which) {
+function _getShadowDate(which) {
var date = window.timeWidgets[which]['date'].getAttribute("shadow-value").asDate();
var intValue = parseInt(window.timeWidgets[which]['hour'].getAttribute("shadow-value"));
date.setHours(intValue);
return date;
}
-this.getStartDate = function() {
+function getStartDate() {
return this._getDate('start');
}
-this.getEndDate = function() {
+function getEndDate() {
return this._getDate('end');
}
-this.getShadowStartDate = function() {
+function getShadowStartDate() {
return this._getShadowDate('start');
}
-this.getShadowEndDate = function() {
+function getShadowEndDate() {
return this._getShadowDate('end');
}
-this._setDate = function(which, newDate) {
+function _setDate(which, newDate) {
window.timeWidgets[which]['date'].setValueAsDate(newDate);
window.timeWidgets[which]['hour'].value = newDate.getHours();
var minutes = newDate.getMinutes();
window.timeWidgets[which]['minute'].value = minutes;
}
-this.setStartDate = function(newStartDate) {
+function setStartDate(newStartDate) {
this._setDate('start', newStartDate);
}
-this.setEndDate = function(newEndDate) {
+function setEndDate(newEndDate) {
// window.alert(newEndDate);
this._setDate('end', newEndDate);
}
-this.onAdjustEndTime = function(event) {
+function onAdjustEndTime(event) {
var dateDelta = (window.getStartDate().valueOf()
- window.getShadowStartDate().valueOf());
// window.alert(window.getEndDate().valueOf() + ' ' + dateDelta);
window.timeWidgets['start']['minute'].updateShadowValue();
}
-this.initTimeWidgets = function (widgets) {
+function onAllDayChanged(event) {
+ for (var type in window.timeWidgets) {
+ window.timeWidgets[type]['hour'].disabled = this.checked;
+ window.timeWidgets[type]['minute'].disabled = this.checked;
+ }
+}
+
+function initTimeWidgets(widgets) {
this.timeWidgets = widgets;
Event.observe(widgets['start']['date'], "change", this.onAdjustEndTime, false);
Event.observe(widgets['start']['hour'], "change", this.onAdjustEndTime, false);
Event.observe(widgets['start']['minute'], "change", this.onAdjustEndTime, false);
+
+ var allDayLabel = $("allDay");
+ var input = $(allDayLabel).childNodesWithTag("input")[0];
+ Event.observe(input, "change", onAllDayChanged.bindAsEventListener(input));
+ if (input.checked) {
+ for (var type in widgets) {
+ widgets[type]['hour'].disabled = true;
+ widgets[type]['minute'].disabled = true;
+ }
+ }
}
+
+function onAppointmentEditorLoad() {
+ var widgets = {'start': {'date': $("startTime_date"),
+ 'hour': $("startTime_time_hour"),
+ 'minute': $("startTime_time_minute")},
+ 'end': {'date': $("endTime_date"),
+ 'hour': $("endTime_time_hour"),
+ 'minute': $("endTime_time_minute")}};
+ initTimeWidgets(widgets);
+}
+
+addEvent(window, 'load', onAppointmentEditorLoad);
function onPopupAttendeesWindow(event) {
if (event)
- event.preventDefault();
+ preventDefault(event);
window.open(ApplicationBaseURL + "editAttendees", null,
"width=803,height=573");
function onPopupUrlWindow(event) {
if (event)
- event.preventDefault();
+ preventDefault(event);
var urlInput = document.getElementById("url");
var newUrl = window.prompt(labels["Target:"].decodeEntities(), urlInput.value);
var attendeesLabel = $("attendeesLabel");
var attendeesNames = $("attendeesNames");
- attendeesHref.addEventListener("click", onPopupAttendeesWindow, false);
+ Event.observe(attendeesHref, "click", onPopupAttendeesWindow, false);
if (attendeesNames.value.length > 0) {
attendeesHref.setStyle({ textDecoration: "underline", color: "#00f" });
attendeesHref.appendChild(document.createTextNode(attendeesNames.value));
var documentLabel = $("documentLabel");
var documentUrl = $("url");
- documentHref.addEventListener("click", onPopupDocumentWindow, false);
+ Event.observe(documentHref, "click", onPopupDocumentWindow, false);
documentHref.setStyle({ textDecoration: "underline", color: "#00f" });
if (documentUrl.value.length > 0) {
documentHref.appendChild(document.createTextNode(documentUrl.value));
}
var changeUrlButton = $("changeUrlButton");
- changeUrlButton.addEventListener("click", onPopupUrlWindow, false);
+ Event.observe(changeUrlButton, "click", onPopupUrlWindow, false);
}
function initializePrivacyMenu() {
initializeDocumentHref();
initializePrivacyMenu();
var list = $("calendarList");
- list.addEventListener("change", onChangeCalendar, false);
- var onSelectionChangeEvent = document.createEvent("Event");
- onSelectionChangeEvent.initEvent("change", false, false);
- list.dispatchEvent(onSelectionChangeEvent);
+ Event.observe(list, "change", onChangeCalendar.bindAsEventListener(list), false);
+ if (document.createEvent) {
+ var onSelectionChangeEvent = document.createEvent("Event");
+ onSelectionChangeEvent.initEvent("change", false, false);
+ list.dispatchEvent(onSelectionChangeEvent);
+ }
+ else {
+ list.fireEvent("onchange"); // IE
+ }
var menuItems = $("itemPrivacyList").childNodesWithTag("li");
for (var i = 0; i < menuItems.length; i++)
- menuItems[i].addEventListener("mouseup", onMenuSetClassification, false);
+ Event.observe(menuItems[i], "mouseup", onMenuSetClassification.bindAsEventListener(menuItems[i]), false);
}
addEvent(window, 'load', onComponentEditorLoad);
}
DIV#addressList
-{
- height: 8em;
+{ height: 8em;
margin-bottom: .25em;
overflow-y: auto;
overflow-x: hidden;
DIV.addressListElement
{ margin: 0px;
- margin-right: 8em;
padding: 0px; }
SPAN.headerField
-{ display: block;
- float: left;
- line-height: 1.8em;
+{ line-height: 1.8em;
width: 5em;
text-align: right; }
-SPAN.headerInput > INPUT
+SPAN.headerInput INPUT
{ width: 100%;
padding-left: 24px;
background-image: url('/SOGo.woa/WebServerResources/abcard.gif');
background-repeat: no-repeat;
background-position: 2px center;
- margin-right: -9em; }
+ margin-right: -12em; }
DIV#subjectRow INPUT
{ background-image: none;
-moz-border-left-colors: #9c9a94 #000 transparent;
}
-TEXTAREA
+DIV.pageContent TEXTAREA
{ position: absolute;
left: 0em;
right: 0em;
bottom: 0em;
top: 17em; }
+
TABLE
{ display: block;
table-layout: fixed;
- border-spacing: 0px;
- padding: 0px;
- margin: 0px;
- border: 0px; }
+ border-spacing: 0px; }
+
+TABLE TD
+{ white-space: nowrap;
+ padding-left: .25em;
+ padding-right: .25em; }
a:link
{ color: #0033CC; }
border-bottom: 1px solid #848284;
margin: 0px;
padding: 0px;
- background-color: #d4d0c8;
white-space: nowrap;
overflow: auto; }
overflow: auto;
display: none;
z-index: 1000;
- -moz-opacity: 0.7;
- opacity: 0.7;
- filter: alpha(opacity=70);
border-top: 2px solid #fff;
border-left: 2px solid #fff;
border-right: 2px solid #999;
-moz-border-top-colors: #000 #9c9a94 transparent;
-moz-border-left-colors: #000 #9c9a94 transparent;
font-family: monospace;
- font-weight: bold;
- background-color: #000;
- color: #ddd;
+ font-size: 12pt;
+ padding: .25em;
+ background-color: #fff;
+ overflow-y: scroll;
+ color: #222;
top: 1em;
left: 0px;
right: 0px;
height: 15em; }
-DIV#logConsole > DIV.highlighted
-{ background-color: #333; }
-
+/* DIV#logConsole > DIV.highlighted
+{ background-color: #ddf; }
+ */
/* content lists */
td.tbtv_actcell
{ border-width: 1px;
padding-left: 4px;
padding-right: 4px; }
+TD.headerCell,
TD.tbtv_headercell,
TD.tbtv_navcell
{ background-color: #d4d0c8;
-moz-border-bottom-colors: #000 #9c9a94 transparent;
-moz-border-right-colors: #000 #9c9a94 transparent; }
+TD.headerCell:active,
TD.tbtv_headercell:active
{ background-color: #DCDAD5;
border: 1px solid #9c9a94;
-moz-border-bottom-colors: #9c9a94;
-moz-border-right-colors: #9c9a94; }
+TD.headerCell SPAN,
td.tbtv_headercell SPAN
{ float: left;
width: 100%; }
/* background-color: #C4C0B8; */
}
+TD.headerCell IMG.tbtv_sortcell,
td.tbtv_headercell img.tbtv_sortcell
{ float: right;
text-align: right;
padding-left: .3em;
padding-right: .3em; }
-TR.tableview TD.headerDateTime
-{ width: 18em; }
+TD.headerDateTime
+{ width: 30em;
+ min-width: 30em; }
+
+TD.headerTitle
+{ width: 30%; }
-TR.tableview TD.headerLocation
-{ width: 10em; }
+TD.headerLocation
+{ min-width: 20em; }
td img.tbtv_sortcell
{ float: right;
bottom: .5em;
display: none; }
+DIV.tabsContainer DIV.active
+{ display: block; }
+
DIV.tabsContainer > DIV[class~="active"].tab
{ display: block !important; }
INPUT.checkBox
-{ border: 2px solid #000;
- vertical-align: middle;
+{ vertical-align: middle;
-moz-border-top-colors: #000 #fff;
-moz-border-left-colors: #000 #fff;
-moz-border-bottom-colors: #000 #fff;
var activeAjaxRequests = 0;
var menus = new Array();
+var weekStartIsMonday = true;
+
// logArea = null;
var allDocumentElements = null;
return null;
}
+function appendDifferentiator(url) {
+ var url_nocache = url;
+ var position = url.indexOf('?', 0);
+ if (position < 0)
+ url_nocache += '?';
+ else
+ url_nocache += '&';
+ url_nocache += 'differentiator=' + Math.floor(Math.random()*50000);
+
+ return url_nocache;
+}
+
function triggerAjaxRequest(url, callback, userdata) {
var http = createHTTPClient();
activeAjaxRequests += 1;
document.animTimer = setTimeout("checkAjaxRequestsState();", 200);
+ //url = appendDifferentiator(url);
if (http) {
+ http.open("POST", url, true);
+ http.url = url;
http.onreadystatechange
= function() {
-// log ("state changed (" + http.readyState + "): " + url);
+ //log ("state changed (" + http.readyState + "): " + url);
try {
if (http.readyState == 4
&& activeAjaxRequests > 0) {
log(backtrace());
}
};
- http.url = url;
- http.open("GET", url, true);
- http.send("");
+ http.send(null);
+ }
+ else {
+ log("triggerAjaxRequest: error creating HTTP Client!");
}
return http;
}
}
+function isSafari() {
+ //var agt = navigator.userAgent.toLowerCase();
+ //var is_safari = ((agt.indexOf('safari')!=-1)&&(agt.indexOf('mac')!=-1))?true:false;
+
+ return (navigator.vendor == "Apple Computer, Inc.");
+}
+
+function isHttpStatus204(status) {
+ return (status == 204 || // Firefox
+ (isSafari() && typeof(status) == 'undefined') || // Safari
+ status == 1223); // IE
+}
+
function getTarget(event) {
event = event || window.event;
if (event.target)
function preventDefault(event) {
if (event.preventDefault)
event.preventDefault(); // W3C DOM
- else
- event.returnValue = false; // IE
+
+ event.returnValue = false; // IE
}
function resetSelection(win) {
for (var i = 0; i < parent.childNodes.length; i++) {
var node = parent.childNodes.item(i);
if (node.nodeType == 1)
- node.deselect();
+ $(node).deselect();
}
}
function isNodeSelected(node) {
- var classStr = '' + node.getAttribute('class');
- var position = classStr.indexOf('_selected', 0);
-
- return (position > -1);
+ return $(node).hasClassName('_selected');
}
function acceptMultiSelect(node) {
- var accept = ('' + node.getAttribute('multiselect')).toLowerCase();
+ var response = false;
+ var attribute = node.getAttribute('multiselect');
+ if (attribute) {
+ log("node '" + node.getAttribute("id")
+ + "' is still using old-stylemultiselect!");
+ response = (attribute.toLowerCase() == 'yes');
+ }
+ else
+ response = node.multiselect;
- return (accept == 'yes');
+ return response;
}
function onRowClick(event) {
if (node.tagName == 'TD')
node = node.parentNode;
-
- var startSelection = node.parentNode.getSelectedNodes();
+ var startSelection = $(node.parentNode).getSelectedNodes();
if (event.shiftKey == 1
&& (acceptMultiSelect(node.parentNode)
|| acceptMultiSelect(node.parentNode.parentNode))) {
if (isNodeSelected(node) == true) {
- node.deselect();
+ $(node).deselect();
} else {
- node.select();
+ $(node).select();
}
} else {
- deselectAll(node.parentNode);
- node.select();
+ $(node.parentNode).deselectAll();
+ $(node).select();
}
- if (startSelection != node.parentNode.getSelectedNodes()) {
+ if (startSelection != $(node.parentNode).getSelectedNodes()) {
var parentNode = node.parentNode;
if (parentNode.tagName == 'TBODY')
parentNode = parentNode.parentNode;
- log("onRowClick: parentNode = " + parentNode.tagName);
+ //log("onRowClick: parentNode = " + parentNode.tagName);
+ // parentNode is UL or TABLE
if (document.createEvent) {
- var onSelectionChangeEvent = document.createEvent("UIEvents");
- onSelectionChangeEvent.initEvent("selectionchange", true, true);
+ var onSelectionChangeEvent;
+ if (isSafari())
+ onSelectionChangeEvent = document.createEvent("UIEvents");
+ else
+ onSelectionChangeEvent = document.createEvent("Events");
+ onSelectionChangeEvent.initEvent("mousedown", true, true);
parentNode.dispatchEvent(onSelectionChangeEvent);
}
else if (document.createEventObject) {
- // TODO: add support for IE
- //parentNode.fireEvent("change");
- //parentNode is UL or TABLE
+ parentNode.fireEvent("onmousedown");
}
}
+
+ return true;
}
/* popup menus */
/* toolbar buttons */
function popupToolbarMenu(event, menuId) {
var toolbar = $("toolbar");
- var node = event.target;
+ var node = getTarget(event);
if (node.tagName != 'A')
node = node.getParentWithTagName("a");
node = node.childNodesWithTag("span")[0];
function listRowMouseDownHandler(event) {
preventDefault(event);
- return false;
}
/* tabs */
if (!firstTab)
firstTab = i;
Event.observe(currentNode, "mousedown",
- onTabMouseDown.bindAsEventListener(currentNode));
+ onTabMouseDown.bindAsEventListener(currentNode));
Event.observe(currentNode, "click",
onTabClick.bindAsEventListener(currentNode));
+ //$(currentNode.getAttribute("target")).hide();
}
}
var target = $(nodes[firstTab].getAttribute("target"));
target.addClassName("active");
+ //target.show();
}
}
}
function onTabClick(event) {
- var node = getTarget(event);
+ var node = getTarget(event); // LI element
var target = node.getAttribute("target");
var oldContent = $(oldTarget);
oldContent.removeClassName("active");
- container.activeTab.removeClassName("active");
+ container.activeTab.removeClassName("active"); // previous LI
container.activeTab = node;
- container.activeTab.addClassName("active");
+ container.activeTab.addClassName("active"); // current LI
content.addClassName("active");
+
+ // Prototype alternative
+
+ //oldContent.removeClassName("active");
+ //container.activeTab.removeClassName("active"); // previous LI
+ //container.activeTab = node;
+ //container.activeTab.addClassName("active"); // current LI
+
+ //container.activeTab.hide();
+ //oldContent.hide();
+ //content.show();
+
+ //container.activeTab = node;
+ //container.activeTab.show();
return false;
}
function configureSortableTableHeaders() {
var headers = document.getElementsByClassName("sortableTableHeader");
for (var i = 0; i < headers.length; i++) {
- var anchor = $(headers[i]).childNodesWithTag("a")[0];
- if (!anchor.link) {
- anchor.link = anchor.getAttribute("href");
- anchor.href = "#";
- Event.observe(anchor, "click", onHeaderClick.bindAsEventListener(anchor), true);
- }
+ var header = headers[i];
+ var anchor = $(header).childNodesWithTag("a")[0];
+ if (anchor)
+ Event.observe(anchor, "click",
+ onHeaderClick.bindAsEventListener(anchor));
}
}