merge of '04613672d5bbddb489f5e265a0540411ae9b2fa3'

and '3e90781b75df157db7681cf0321f96486a923247'

Monotone-Parent: 04613672d5bbddb489f5e265a0540411ae9b2fa3
Monotone-Parent: 3e90781b75df157db7681cf0321f96486a923247
Monotone-Revision: 560dcc0f72c18c937a44c51c6710da0835aae555

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2009-07-14T14:58:45
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2009-07-14 14:58:45 +00:00
6 changed files with 58 additions and 8 deletions
+10
View File
@@ -1,3 +1,13 @@
2009-07-14 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/Appointments/SOGoUserFolder+Appointments.m
(-davCalendarUserAddressSet): we return the "MAILTO:" prefix in
lower case instead.
* SoObjects/Appointments/SOGoAppointmentFolders.m
(-davCalendarComponentSet): new method, copied from
SOGoAppointmentFolder.
2009-07-10 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/SOGo/SOGoContentObject.m (-davResourceType): new
@@ -1,3 +1,4 @@
/* SOGoAppointmentFolders.m - this file is part of SOGo
*
* Copyright (C) 2007 Inverse inc.
@@ -21,14 +22,17 @@
*/
#import <Foundation/NSArray.h>
#import <Foundation/NSDictionary.h>
#import <Foundation/NSEnumerator.h>
#import <Foundation/NSString.h>
#import <NGObjWeb/WOContext.h>
#import <NGObjWeb/WORequest+So.h>
#import <NGObjWeb/NSException+HTTP.h>
#import <SaxObjC/XMLNamespaces.h>
#import <SOGo/WORequest+SOGo.h>
#import <SOGo/NSObject+DAV.h>
#import <SOGo/SOGoWebDAVValue.h>
#import "SOGoAppointmentFolder.h"
#import "SOGoAppointmentFolders.h"
@@ -167,4 +171,32 @@
return classes;
}
- (SOGoWebDAVValue *) davCalendarComponentSet
{
static SOGoWebDAVValue *componentSet = nil;
NSMutableArray *components;
if (!componentSet)
{
components = [NSMutableArray array];
/* Totally hackish.... we use the "n1" prefix because we know our
extensions will assign that one to ..:caldav but we really need to
handle element attributes */
[components addObject: [SOGoWebDAVValue
valueForObject: @"<n1:comp name=\"VEVENT\"/>"
attributes: nil]];
[components addObject: [SOGoWebDAVValue
valueForObject: @"<n1:comp name=\"VTODO\"/>"
attributes: nil]];
componentSet
= [davElementWithContent (@"supported-calendar-component-set",
XMLNS_CALDAV,
components)
asWebDAVValue];
[componentSet retain];
}
return componentSet;
}
@end
@@ -60,7 +60,7 @@
while ((currentEmail = [emails nextObject]))
{
tag = [NSArray arrayWithObjects: @"href", @"DAV:", @"D",
[NSString stringWithFormat: @"MAILTO:%@", currentEmail],
[NSString stringWithFormat: @"mailto:%@", currentEmail],
nil];
[addresses addObject: tag];
}
+1
View File
@@ -818,6 +818,7 @@ static NSArray *childRecordFields = nil;
davSQLFieldsTable = [NSMutableDictionary new];
[davSQLFieldsTable setObject: @"c_version" forKey: @"{DAV:}getetag"];
[davSQLFieldsTable setObject: @"" forKey: @"{DAV:}getcontenttype"];
[davSQLFieldsTable setObject: @"" forKey: @"{DAV:}resourcetype"];
}
return davSQLFieldsTable;
+9 -3
View File
@@ -1504,7 +1504,6 @@ function onShowCompletedTasks(event) {
function updateTaskStatus(event) {
var newStatus = (this.checked ? 1 : 0);
var http = createHTTPClient();
if (isSafari() && !isSafari3()) {
newStatus = (newStatus ? 0 : 1);
@@ -1513,12 +1512,19 @@ function updateTaskStatus(event) {
url = (ApplicationBaseURL + this.parentNode.calendar
+ "/" + this.parentNode.cname + "/changeStatus?status=" + newStatus);
var http = createHTTPClient();
if (http) {
// TODO: add parameter to signal that we are only interested in OK
http.open("POST", url, false /* not async */);
http.url = url;
http.send("");
// http.setRequestHeader("Content-Length", 0);
try {
http.send("");
}
catch (e) {
/* IE7 tends to generate "tranaction aborted" errors for synchronous
transactions returning HTTP code 204. */
log("exception during http.send (expected on IE7)");
}
if (isHttpStatus204(http.status))
refreshTasks();
} else
+4 -3
View File
@@ -356,12 +356,13 @@ function getContrastingTextColor(bgColor) {
}
function triggerAjaxRequest(url, callback, userdata, content, headers) {
var http = createHTTPClient();
activeAjaxRequests++;
document.animTimer = setTimeout("checkAjaxRequestsState();", 250);
//url = appendDifferentiator(url);
var http = createHTTPClient();
if (http) {
activeAjaxRequests++;
document.animTimer = setTimeout("checkAjaxRequestsState();", 250);
http.open("POST", url, true);
http.url = url;
http.callback = callback;