See ChangeLogs.

Monotone-Parent: 4ada003303186187c511ea7faea08604da6b3db4
Monotone-Revision: 1e456d9a08ec90bd4e7fad4909eecfaa354aed5a

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2011-07-08T15:48:55
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Francis Lachapelle 2011-07-08 15:48:55 +00:00
parent 6e0dc80c1f
commit 3f6bca5d1e
9 changed files with 58 additions and 12 deletions

View File

@ -1,3 +1,20 @@
2011-07-12 Francis Lachapelle <flachapelle@inverse.ca>
* SoObjects/SOGo/SOGoFolder.m (-compare:): handle the case when
the display name is not defined.
* UI/Scheduler/UIxCalListingActions.m
(-_fetchFields:forComponentOfType:): test the calendar name and
set it to an empty string if it's not defined.
* UI/Scheduler/UIxCalendarSelector.m (-calendars): idem.
* UI/WebServerResources/UIxCalendarProperties.js (onOKClick):
refuses to save the properties if the calendar name is empty.
* UI/WebServerResources/SchedulerUI.js (updateCalendarProperties):
Create a new text node in case the calendar has no name.
2011-07-12 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* OpenChange/MAPIStoreTable.m

View File

@ -1,3 +1,8 @@
2011-07-12 Francis Lachapelle <flachapelle@inverse.ca>
* iCalCalendar.m (-addTimeZone:): now returns true if the timezone
was already defined in the calendar.
2011-07-11 Francis Lachapelle <flachapelle@inverse.ca>
* iCalDailyRecurrenceCalculator.m

View File

@ -74,7 +74,7 @@
- (NSArray *) freeBusys;
- (NSArray *) timezones;
- (void) addTimeZone: (iCalTimeZone *) iTZ;
- (BOOL) addTimeZone: (iCalTimeZone *) iTZ;
- (iCalTimeZone *) timeZoneWithId: (NSString *) tzId;
/* collection */

View File

@ -160,13 +160,15 @@
return [self childrenWithTag: @"vfreebusy"];
}
- (void) addTimeZone: (iCalTimeZone *) iTZ
- (BOOL) addTimeZone: (iCalTimeZone *) iTZ
{
iCalTimeZone *possibleTz;
possibleTz = [self timeZoneWithId: [iTZ tzId]];
if (!possibleTz)
[self addChild: iTZ];
return (!possibleTz);
}
- (iCalTimeZone *) timeZoneWithId: (NSString *) tzId

View File

@ -232,9 +232,14 @@
{
comparison = [self _compareByNameInContainer: otherFolder];
if (comparison == NSOrderedSame)
comparison
= [[self displayName]
localizedCaseInsensitiveCompare: [otherFolder displayName]];
if ([self displayName] == nil)
comparison = NSOrderedAscending;
else if ([otherFolder displayName] == nil)
comparison = NSOrderedDescending;
else
comparison
= [[self displayName]
localizedCaseInsensitiveCompare: [otherFolder displayName]];
}
return comparison;

View File

@ -312,7 +312,7 @@ static NSArray *tasksFields = nil;
NSNull *marker;
SOGoAppointmentFolders *clientObject;
SOGoUser *ownerUser;
NSString *owner, *role;
NSString *owner, *role, *calendarName;
BOOL isErasable, folderIsRemote;
infos = [NSMutableArray array];
@ -381,7 +381,10 @@ static NSArray *tasksFields = nil;
forKey: @"c_folder"];
[newInfo setObject: [currentFolder ownerInContext: context]
forKey: @"c_owner"];
[newInfo setObject: [currentFolder displayName]
calendarName = [currentFolder displayName];
if (calendarName == nil)
calendarName = @"";
[newInfo setObject: calendarName
forKey: @"calendarName"];
if (![[newInfo objectForKey: @"c_title"] length])
[self _fixComponentTitle: newInfo withType: component];

View File

@ -1,6 +1,6 @@
/* UIxCalendarSelector.m - this file is part of SOGo
*
* Copyright (C) 2007, 2008 Inverse inc.
* Copyright (C) 2007-2011 Inverse inc.
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
*
@ -107,6 +107,8 @@ _intValueFromHex (NSString *hexString)
calendar = [NSMutableDictionary dictionary];
folderName = [folder nameInContainer];
fDisplayName = [folder displayName];
if (fDisplayName == nil)
fDisplayName = @"";
if ([fDisplayName isEqualToString: [co defaultFolderName]])
fDisplayName = [self labelForKey: fDisplayName];
[calendar setObject: [NSString stringWithFormat: @"/%@", folderName]

View File

@ -2542,7 +2542,11 @@ function updateCalendarProperties(calendarID, calendarName, calendarColor) {
// log("nodeID: " + nodeID);
var calendarNode = $(nodeID);
var childNodes = calendarNode.childNodes;
childNodes[childNodes.length-1].nodeValue = calendarName;
var textNode = childNodes[childNodes.length-1];
if (textNode.tagName == 'DIV')
calendarNode.appendChild(document.createTextNode(calendarName));
else
childNodes[childNodes.length-1].nodeValue = calendarName;
appendStyleElement(nodeID, calendarColor);
}

View File

@ -30,10 +30,17 @@ function onOKClick(event) {
var originalTag = $("originalCalendarSyncTag");
var allTags = $("allCalendarSyncTags");
if (allTags)
if (calendarName.value.blank()) {
alert(_("Please specify a calendar name."));
save = false;
}
if (save
&& allTags)
allTags = allTags.value.split(",");
if (tag
if (save
&& tag
&& $("synchronizeCalendar").checked) {
if (tag.value.blank()) {
alert(_("tagNotDefined"));
@ -52,7 +59,8 @@ function onOKClick(event) {
else
save = confirm(_("tagWasAdded"));
}
else if (originalTag
else if (save
&& originalTag
&& !originalTag.value.blank())
save = confirm(_("tagWasRemoved"));