зеркало из https://github.com/mozilla/gecko-dev.git
Don't put rrule and attendee in the property bag, they are handled specially.
bug 277562, r=shaver
This commit is contained in:
Родитель
180a8e40e3
Коммит
55c4b52577
|
@ -280,6 +280,10 @@ calItemBase.prototype = {
|
||||||
"DTALARM": true,
|
"DTALARM": true,
|
||||||
"DTSTAMP": true,
|
"DTSTAMP": true,
|
||||||
"X-MOZILLA-GENERATION": true,
|
"X-MOZILLA-GENERATION": true,
|
||||||
|
"RRULE": true,
|
||||||
|
"EXDATE": true,
|
||||||
|
"RDATE": true,
|
||||||
|
"ATTENDEE": true,
|
||||||
},
|
},
|
||||||
|
|
||||||
mapPropsFromICS: function(icalcomp, propmap) {
|
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());
|
||||||
|
|
Загрузка…
Ссылка в новой задаче