From 449d20640bb5d8706715bdb3b76b3977040166bd Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 14 Jul 2009 14:34:55 +0000 Subject: [PATCH 1/4] Monotone-Parent: 7d7fda1fe8fdf96d8a846378379c8a49661b7e7b Monotone-Revision: a891c51c800c8bcf46a3cc4342794d975147ddb5 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-07-14T14:34:55 Monotone-Branch: ca.inverse.sogo --- UI/WebServerResources/SchedulerUI.js | 12 +++++++++--- UI/WebServerResources/generic.js | 7 ++++--- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/UI/WebServerResources/SchedulerUI.js b/UI/WebServerResources/SchedulerUI.js index e73500f5b..a218455f3 100644 --- a/UI/WebServerResources/SchedulerUI.js +++ b/UI/WebServerResources/SchedulerUI.js @@ -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 diff --git a/UI/WebServerResources/generic.js b/UI/WebServerResources/generic.js index 1caf9f477..d9809ad85 100644 --- a/UI/WebServerResources/generic.js +++ b/UI/WebServerResources/generic.js @@ -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; From b1d6a77cb59fa0d608e03b721b9ca91ce03f2ec0 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 14 Jul 2009 14:35:35 +0000 Subject: [PATCH 2/4] Monotone-Parent: a891c51c800c8bcf46a3cc4342794d975147ddb5 Monotone-Revision: 26b4af664f5a42a3f2629266129ea4e4a9bbcd2b Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-07-14T14:35:35 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 6 ++++ .../Appointments/SOGoAppointmentFolders.m | 34 ++++++++++++++++++- 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index fdc71f777..97f33dfba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-07-14 Wolfgang Sourdeau + + * SoObjects/Appointments/SOGoAppointmentFolders.m + (-davCalendarComponentSet): new method, copied from + SOGoAppointmentFolder. + 2009-07-10 Wolfgang Sourdeau * SoObjects/SOGo/SOGoContentObject.m (-davResourceType): new diff --git a/SoObjects/Appointments/SOGoAppointmentFolders.m b/SoObjects/Appointments/SOGoAppointmentFolders.m index c64afa030..4917c6abd 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolders.m +++ b/SoObjects/Appointments/SOGoAppointmentFolders.m @@ -1,3 +1,4 @@ + /* SOGoAppointmentFolders.m - this file is part of SOGo * * Copyright (C) 2007 Inverse inc. @@ -21,14 +22,17 @@ */ #import +#import #import #import #import #import #import - +#import #import +#import +#import #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: @"" + attributes: nil]]; + [components addObject: [SOGoWebDAVValue + valueForObject: @"" + attributes: nil]]; + componentSet + = [davElementWithContent (@"supported-calendar-component-set", + XMLNS_CALDAV, + components) + asWebDAVValue]; + [componentSet retain]; + } + + return componentSet; +} + @end From 06ce3515971e44d78a0f66ffc870b46d4c98f0a9 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 14 Jul 2009 14:36:15 +0000 Subject: [PATCH 3/4] Monotone-Parent: 26b4af664f5a42a3f2629266129ea4e4a9bbcd2b Monotone-Revision: efa28487d89dfe9286942c7a7ce155b70e1a383f Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-07-14T14:36:15 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 4 ++++ SoObjects/Appointments/SOGoUserFolder+Appointments.m | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 97f33dfba..e398df6a0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2009-07-14 Wolfgang Sourdeau + * 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. diff --git a/SoObjects/Appointments/SOGoUserFolder+Appointments.m b/SoObjects/Appointments/SOGoUserFolder+Appointments.m index 211c72460..46a5b5eaf 100644 --- a/SoObjects/Appointments/SOGoUserFolder+Appointments.m +++ b/SoObjects/Appointments/SOGoUserFolder+Appointments.m @@ -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]; } From 14b3ca11a1d59bff8a9ede24640ee4790163454a Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 14 Jul 2009 14:36:24 +0000 Subject: [PATCH 4/4] Monotone-Parent: efa28487d89dfe9286942c7a7ce155b70e1a383f Monotone-Revision: 3e90781b75df157db7681cf0321f96486a923247 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-07-14T14:36:24 Monotone-Branch: ca.inverse.sogo --- SoObjects/SOGo/SOGoGCSFolder.m | 1 + 1 file changed, 1 insertion(+) diff --git a/SoObjects/SOGo/SOGoGCSFolder.m b/SoObjects/SOGo/SOGoGCSFolder.m index 0aa9e451d..5150dc6ef 100644 --- a/SoObjects/SOGo/SOGoGCSFolder.m +++ b/SoObjects/SOGo/SOGoGCSFolder.m @@ -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;