Bugs from CalDAV Calconnect interop.

- Use uppercase property names until 277978 is fixed.
- Don't set empty-string properties, because some servers don't like them.
This commit is contained in:
shaver%mozilla.org 2005-01-12 01:12:00 +00:00
parent c3eb74669b
commit 1180ed6578
2 changed files with 27 additions and 9 deletions

View File

@ -364,6 +364,7 @@ calItemBase.prototype = {
rec.appendRecurrenceItem(ritem);
}
this.mRecurrenceInfo = rec;
},
importUnpromotedProperties: function (icalcomp, promoted) {
@ -387,19 +388,23 @@ calItemBase.prototype = {
suppressDCE = this.stampTime;
this.mapPropsToICS(icalcomp, this.icsBasePropMap);
icalcomp.icalClass = this.mPrivacy;
for (var i = 0; i < this.mAttendees.length; i++)
icalcomp.addProperty(this.mAttendees[i].icalProperty);
if (this.mGeneration != 0) {
var genprop = icalProp("X-MOZILLA-GENERATION");
genprop.stringValue = String(this.mGeneration);
icalcomp.addProperty(genprop);
}
if (this.mRecurrenceInfo) {
var ritems = this.mRecurrenceInfo.getRecurrenceItems({});
for (i in ritems) {
icalcomp.addProperty(ritems[i].icalProperty);
}
}
},
};

View File

@ -218,9 +218,9 @@ function loadCalendarEventDialog()
// GENERAL -----------------------------------------------------------
setFieldValue("title-field", event.title );
setFieldValue("description-field", event.getProperty("description"));
setFieldValue("location-field", event.getProperty("location"));
setFieldValue("uri-field", event.getProperty("url"));
setFieldValue("description-field", event.getProperty("DESCRIPTION"));
setFieldValue("location-field", event.getProperty("LOCATION"));
setFieldValue("uri-field", event.getProperty("URL"));
// only enable "Go" button if there's a url
processTextboxWithButton( "uri-field", "load-url-button" );
@ -424,7 +424,7 @@ function loadCalendarEventDialog()
var categoriesList = categoriesString.split( "," );
// insert the category already in the task so it doesn't get lost
var categories = event.getProperty("categories");
var categories = event.getProperty("CATEGORIES");
if (categories) {
if (categoriesString.indexOf(categories) == -1)
categoriesList[categoriesList.length] = categories;
@ -513,7 +513,9 @@ function onOKCommand()
event.endDate.jsDate = gEndDate;
event.endDate.timezone = tzid;
event.isAllDay = getFieldValue("all-day-event-checkbox", "checked");
event.status = getFieldValue("event-status-field");
var status = getFieldValue("event-status-field");
if (status)
event.status = status;
} else if (isToDo(event)) {
componentType = "todo";
if (!event.isMutable) // I will cut vlad for making me do this QI
@ -544,10 +546,21 @@ function onOKCommand()
event.priority = getFieldValue("priority-levels");
// other properties
event.setProperty("categories", getFieldValue("categories-field"));
event.setProperty("description", getFieldValue("description-field"));
event.setProperty("location", getFieldValue("location-field"));
event.setProperty("url", getFieldValue("uri-field"));
var cats = getFieldValue("categories-field");
if (cats)
event.setProperty("CATEGORIES", cats);
var desc = getFieldValue("description-field");
if (desc)
event.setProperty("DESCRIPTION", desc);
var location = getFieldValue("location-field");
if (location)
event.setProperty("LOCATION", location);
var url = getFieldValue("uri-field") ;
if (url)
event.setProperty("URL", url);
// PRIVACY -----------------------------------------------------------