зеркало из https://github.com/mozilla/pjs.git
Bug 358498: fixing cloning, r1=lilmatt, r2=mvl
This commit is contained in:
Родитель
bf2ea44146
Коммит
33bdda6f38
|
@ -102,13 +102,19 @@ calAttendee.prototype = {
|
||||||
"userType"];
|
"userType"];
|
||||||
for (var i in allProps)
|
for (var i in allProps)
|
||||||
a[allProps[i]] = this[allProps[i]];
|
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;
|
return a;
|
||||||
},
|
},
|
||||||
// XXX enforce legal values for our properties;
|
// XXX enforce legal values for our properties;
|
||||||
|
|
||||||
icalAttendeePropMap: [
|
icalAttendeePropMap: [
|
||||||
{ cal: "rsvp", ics: "RSVP" },
|
{ cal: "mRsvp", ics: "RSVP" },
|
||||||
{ cal: "commonName", ics: "CN" },
|
{ cal: "commonName", ics: "CN" },
|
||||||
{ cal: "participationStatus", ics: "PARTSTAT" },
|
{ cal: "participationStatus", ics: "PARTSTAT" },
|
||||||
{ cal: "userType", ics: "CUTYPE" },
|
{ cal: "userType", ics: "CUTYPE" },
|
||||||
|
@ -118,6 +124,9 @@ calAttendee.prototype = {
|
||||||
get isOrganizer() { return this.mIsOrganizer; },
|
get isOrganizer() { return this.mIsOrganizer; },
|
||||||
set isOrganizer(bool) { this.mIsOrganizer = bool; },
|
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
|
// icalatt is a calIcalProperty of type attendee
|
||||||
set icalProperty (icalatt) {
|
set icalProperty (icalatt) {
|
||||||
this.modify();
|
this.modify();
|
||||||
|
@ -195,7 +204,6 @@ var makeMemberAttr;
|
||||||
if (makeMemberAttr) {
|
if (makeMemberAttr) {
|
||||||
makeMemberAttr(calAttendee, "mId", null, "id");
|
makeMemberAttr(calAttendee, "mId", null, "id");
|
||||||
makeMemberAttr(calAttendee, "mCommonName", null, "commonName");
|
makeMemberAttr(calAttendee, "mCommonName", null, "commonName");
|
||||||
makeMemberAttr(calAttendee, "mRsvp", null, "rsvp");
|
|
||||||
makeMemberAttr(calAttendee, "mRole", null, "role");
|
makeMemberAttr(calAttendee, "mRole", null, "role");
|
||||||
makeMemberAttr(calAttendee, "mParticipationStatus", "NEEDS-ACTION",
|
makeMemberAttr(calAttendee, "mParticipationStatus", "NEEDS-ACTION",
|
||||||
"participationStatus");
|
"participationStatus");
|
||||||
|
|
Загрузка…
Ссылка в новой задаче