fixing recurrence to set the interval and type and fixing a bug when adding attendeees

This commit is contained in:
pavlov%pavlov.net 2004-12-14 00:19:01 +00:00
Родитель 1f9efea064
Коммит e51243d321
1 изменённых файлов: 14 добавлений и 1 удалений

Просмотреть файл

@ -397,6 +397,8 @@ function onOKCommand()
recurUnits = getFieldValue("repeat-length-units", "value");
recurInterval = getFieldValue("repeat-length-field");
recurrenceInfo.recurStart = event.startDate;
if (getFieldValue("repeat-forever-radio", "selected")) {
recurrenceInfo.recurCount = -1;
}
@ -408,6 +410,17 @@ function onOKCommand()
recurrenceInfo.recurEnd.jsDate = recurEndDate;
}
recurrenceInfo.interval = recurInterval;
var typeMap = { "days" : Components.interfaces.calIAttendee.CAL_RECUR_DAILY,
"weeks" : Components.interfaces.calIAttendee.CAL_RECUR_WEEKLY,
"months" : Components.interfaces.calIAttendee.CAL_RECUR_MONTHLY,
"years" : Components.interfaces.calIAttendee.CAL_RECUR_YEARLY
}
recurrenceInfo.recurType = typeMap[recurUnits];
// XXX need to do extra work for weeks here and for months incase extra things are checked
// Exceptions
var listbox = document.getElementById("exception-dates-listbox");
@ -1578,7 +1591,7 @@ function processComponentType()
function onIniviteAdd()
{
textBox = document.getElementById("invite-email-field");
addAttendee(textBox.email);
addAttendee(textBox.value);
}
function addAttendee(email)