зеркало из https://github.com/mozilla/pjs.git
bug 325103 fixes list of possible properties in calIItemBase. patch by rrankin, r=jminta
This commit is contained in:
Родитель
a0e335dc40
Коммит
b108172fe7
|
@ -91,6 +91,12 @@ interface calIAttendee : nsISupports
|
|||
attribute AUTF8String userType;
|
||||
|
||||
readonly attribute nsISimpleEnumerator propertyEnumerator;
|
||||
|
||||
// If you use the has/get/getUnproxied/set/deleteProperty
|
||||
// methods, property names are case-insensitive.
|
||||
//
|
||||
// For purposes of ICS serialization, all property names in
|
||||
// the hashbag are in uppercase.
|
||||
AUTF8String getProperty(in AString name);
|
||||
void setProperty(in AString name, in AUTF8String value);
|
||||
void deleteProperty(in AString name);
|
||||
|
|
|
@ -178,6 +178,12 @@ interface calIItemBase : nsISupports
|
|||
// accessor attributes. For example, "SUMMARY" is
|
||||
// promoted to the top-level "title" attribute.
|
||||
//
|
||||
// If you use the has/get/getUnproxied/set/deleteProperty
|
||||
// methods, property names are case-insensitive.
|
||||
//
|
||||
// For purposes of ICS serialization, all property names in
|
||||
// the hashbag are in uppercase.
|
||||
//
|
||||
// The isPropertyPromoted() attribute can will indicate
|
||||
// if a particular property is promoted or not, for
|
||||
// serialization purposes.
|
||||
|
|
|
@ -169,21 +169,23 @@ calAttendee.prototype = {
|
|||
},
|
||||
|
||||
get propertyEnumerator() { return this.mProperties.enumerator; },
|
||||
|
||||
// The has/get/getUnproxied/set/deleteProperty methods are case-insensitive.
|
||||
getProperty: function (aName) {
|
||||
try {
|
||||
return this.mProperties.getProperty(aName);
|
||||
return this.mProperties.getProperty(aName.toUpperCase());
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
setProperty: function (aName, aValue) {
|
||||
this.modify();
|
||||
this.mProperties.setProperty(aName, aValue);
|
||||
this.mProperties.setProperty(aName.toUpperCase(), aValue);
|
||||
},
|
||||
deleteProperty: function (aName) {
|
||||
this.modify();
|
||||
try {
|
||||
this.mProperties.deleteProperty(aName);
|
||||
this.mProperties.deleteProperty(aName.toUpperCase());
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -341,7 +341,9 @@ calItemBase.prototype = {
|
|||
}
|
||||
},
|
||||
|
||||
// The has/get/getUnproxied/set/deleteProperty methods are case-insensitive.
|
||||
getProperty: function (aName) {
|
||||
aName = aName.toUpperCase();
|
||||
try {
|
||||
return this.mProperties.getProperty(aName);
|
||||
} catch (e) {
|
||||
|
@ -357,24 +359,24 @@ calItemBase.prototype = {
|
|||
|
||||
getUnproxiedProperty: function (aName) {
|
||||
try {
|
||||
return this.mProperties.getProperty(aName);
|
||||
return this.mProperties.getProperty(aName.toUpperCase());
|
||||
} catch (e) { }
|
||||
return null;
|
||||
},
|
||||
|
||||
hasProperty: function (aName) {
|
||||
return (this.getProperty(aName) != null);
|
||||
return (this.getProperty(aName.toUpperCase()) != null);
|
||||
},
|
||||
|
||||
setProperty: function (aName, aValue) {
|
||||
this.modify();
|
||||
this.mProperties.setProperty(aName, aValue);
|
||||
this.mProperties.setProperty(aName.toUpperCase(), aValue);
|
||||
},
|
||||
|
||||
deleteProperty: function (aName) {
|
||||
this.modify();
|
||||
try {
|
||||
this.mProperties.deleteProperty(aName);
|
||||
this.mProperties.deleteProperty(aName.toUpperCase());
|
||||
} catch (e) { }
|
||||
},
|
||||
|
||||
|
@ -445,6 +447,9 @@ calItemBase.prototype = {
|
|||
throw Components.results.NS_NOT_IMPLEMENTED;
|
||||
},
|
||||
|
||||
// All of these property names must be in upper case for isPropertyPromoted to
|
||||
// function correctly. The has/get/getUnproxied/set/deleteProperty interfaces
|
||||
// are case-insensitive, but these are not.
|
||||
itemBasePromotedProps: {
|
||||
"CREATED": true,
|
||||
"UID": true,
|
||||
|
@ -595,8 +600,9 @@ calItemBase.prototype = {
|
|||
}
|
||||
},
|
||||
|
||||
// This method is case-insensitive.
|
||||
isPropertyPromoted: function (name) {
|
||||
return (this.itemBasePromotedProps[name]);
|
||||
return (this.itemBasePromotedProps[name.toUpperCase()]);
|
||||
},
|
||||
|
||||
get icalComponent() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче