Don't put rrule and attendee in the property bag, they are handled specially.
bug 277562, r=shaver
This commit is contained in:
Родитель
5de22a6f27
Коммит
03f5be39b0
|
@ -280,6 +280,10 @@ calItemBase.prototype = {
|
|||
"DTALARM": true,
|
||||
"DTSTAMP": true,
|
||||
"X-MOZILLA-GENERATION": true,
|
||||
"RRULE": true,
|
||||
"EXDATE": true,
|
||||
"RDATE": true,
|
||||
"ATTENDEE": true,
|
||||
},
|
||||
|
||||
mapPropsFromICS: function(icalcomp, propmap) {
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
var str = "BEGIN:VCALENDAR\n";
|
||||
str += "BEGIN:VEVENT\n";
|
||||
str += "CREATED:20050104T211235\n";
|
||||
str += "LAST-MODIFIED:20050108T182742\n";
|
||||
str += "DTSTAMP:20050104T211235\n";
|
||||
str += "UID:uuid:1104873174977\n";
|
||||
str += "SUMMARY:teste\n";
|
||||
str += "DTSTART:20050107T094500\n";
|
||||
str += "DTEND:20050107T104500\n";
|
||||
str += "RRULE:FREQ=DAILY;COUNT=43;INTERVAL=5\n";
|
||||
str += "ATTENDEE:MAILTO:test@example.com\n";
|
||||
str += "END:VEVENT\n";
|
||||
str += "END:VCALENDAR\n";
|
||||
|
||||
var icsServ = Components.classes["@mozilla.org/calendar/ics-service;1"]
|
||||
.getService(Components.interfaces.calIICSService);
|
||||
|
||||
var calComp = icsServ.parseICS(str);
|
||||
var subComp = calComp.getFirstSubcomponent("VEVENT");
|
||||
var event = Components.classes["@mozilla.org/calendar/event;1"]
|
||||
.createInstance(Components.interfaces.calIEvent);
|
||||
event.icalComponent = subComp;
|
||||
|
||||
var newCalComp = event.icalComponent;
|
||||
dump(newCalComp.serializeToICS());
|
||||
|
Загрузка…
Ссылка в новой задаче