From 33bdda6f386a6558c234f2eec8201516d16faecd Mon Sep 17 00:00:00 2001 From: "daniel.boelzle%sun.com" Date: Mon, 16 Apr 2007 10:16:41 +0000 Subject: [PATCH] Bug 358498: fixing cloning, r1=lilmatt, r2=mvl --- calendar/base/src/calAttendee.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/calendar/base/src/calAttendee.js b/calendar/base/src/calAttendee.js index fd890c799b3..490bef9f46d 100644 --- a/calendar/base/src/calAttendee.js +++ b/calendar/base/src/calAttendee.js @@ -102,13 +102,19 @@ calAttendee.prototype = { "userType"]; for (var i in allProps) a[allProps[i]] = this[allProps[i]]; - // clone properties! + + var bagenum = this.propertyEnumerator; + while (bagenum.hasMoreElements()) { + var iprop = bagenum.getNext().QueryInterface(Components.interfaces.nsIProperty); + a.setProperty(iprop.name, iprop.value); + } + return a; }, // XXX enforce legal values for our properties; icalAttendeePropMap: [ - { cal: "rsvp", ics: "RSVP" }, + { cal: "mRsvp", ics: "RSVP" }, { cal: "commonName", ics: "CN" }, { cal: "participationStatus", ics: "PARTSTAT" }, { cal: "userType", ics: "CUTYPE" }, @@ -118,6 +124,9 @@ calAttendee.prototype = { get isOrganizer() { return this.mIsOrganizer; }, set isOrganizer(bool) { this.mIsOrganizer = bool; }, + get rsvp() { return this.mRsvp == "TRUE"; }, + set rsvp(aValue) { this.mRsvp = (aValue ? "TRUE" : "FALSE"); }, + // icalatt is a calIcalProperty of type attendee set icalProperty (icalatt) { this.modify(); @@ -195,7 +204,6 @@ var makeMemberAttr; if (makeMemberAttr) { makeMemberAttr(calAttendee, "mId", null, "id"); makeMemberAttr(calAttendee, "mCommonName", null, "commonName"); - makeMemberAttr(calAttendee, "mRsvp", null, "rsvp"); makeMemberAttr(calAttendee, "mRole", null, "role"); makeMemberAttr(calAttendee, "mParticipationStatus", "NEEDS-ACTION", "participationStatus");