don't output unset attributes to ics. bug 297530, r=vlad

This commit is contained in:
mvl%exedo.nl 2005-06-14 21:03:06 +00:00
Родитель e7bf077817
Коммит e90d1903dd
2 изменённых файлов: 7 добавлений и 5 удалений

Просмотреть файл

@ -549,7 +549,7 @@ calItemBase.prototype = {
for (var i = 0; i < this.mAttendees.length; i++)
icalcomp.addProperty(this.mAttendees[i].icalProperty);
if (this.mGeneration != 0) {
if (this.mGeneration) {
var genprop = icalProp("X-MOZILLA-GENERATION");
genprop.stringValue = String(this.mGeneration);
icalcomp.addProperty(genprop);

Просмотреть файл

@ -104,7 +104,7 @@ calTodo.prototype = {
this.mEntryDate = new CalDateTime();
this.mDueDate = new CalDateTime();
this.mCompletedDate = new CalDateTime();
this.mPercentComplete = 0;
this.mPercentComplete = undefined;
},
cloneShallow: function (aNewParent) {
@ -177,9 +177,11 @@ calTodo.prototype = {
this.fillIcalComponentFromBase(icalcomp);
this.mapPropsToICS(icalcomp, this.icsEventPropMap);
var percentprop = icssvc.createIcalProperty("PERCENT-COMPLETE");
percentprop.stringValue = this.mPercentComplete;
icalcomp.addProperty(percentprop);
if (this.mPercentComplete != undefined) {
var percentprop = icssvc.createIcalProperty("PERCENT-COMPLETE");
percentprop.stringValue = this.mPercentComplete;
icalcomp.addProperty(percentprop);
}
var bagenum = this.mProperties.enumerator;
while (bagenum.hasMoreElements()) {