зеркало из https://github.com/mozilla/pjs.git
don't output unset attributes to ics. bug 297530, r=vlad
This commit is contained in:
Родитель
e7bf077817
Коммит
e90d1903dd
|
@ -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()) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче