зеркало из https://github.com/mozilla/pjs.git
bug 348716 - Fixes setting an alarm on just the first of a recurring event. patch by jminta, r1=lilmatt, r2=dmose
This commit is contained in:
Родитель
252fe4ea97
Коммит
3629ef5fc7
|
@ -80,11 +80,6 @@ function calAlarmService() {
|
|||
onEndBatch: function() { },
|
||||
onLoad: function() { },
|
||||
onAddItem: function(aItem) {
|
||||
if (!aItem.alarmOffset &&
|
||||
!(aItem.parentItem && aItem.parentItem.alarmOffset)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var occs = [];
|
||||
if (aItem.recurrenceInfo) {
|
||||
var start = this.alarmService.mRangeEnd.clone();
|
||||
|
@ -96,6 +91,10 @@ function calAlarmService() {
|
|||
} else {
|
||||
occs = [aItem];
|
||||
}
|
||||
function hasAlarm(a) {
|
||||
return a.alarmOffset || a.parentItem.alarmOffset;
|
||||
}
|
||||
occs = occs.filter(hasAlarm);
|
||||
for each (var occ in occs) {
|
||||
this.alarmService.addAlarm(occ);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче