forked from extern/egroupware
Calendar: When videoconference is checked, check for 5 minute alarm for all to avoid adding more than one
This commit is contained in:
parent
c50fd8e6bf
commit
3de7d34844
@ -3358,6 +3358,19 @@ var CalendarApp = /** @class */ (function (_super) {
|
||||
// notify all participants
|
||||
this.et2.getWidgetById('participants[notify_externals]').set_value('yes');
|
||||
// add alarm for all participants 5min before videoconference
|
||||
var start = new Date(widget.getRoot().getWidgetById('start').getValue());
|
||||
var alarms = this.et2.getArrayMgr('content').getEntry('alarm') || {};
|
||||
for (var _i = 0, alarms_1 = alarms; _i < alarms_1.length; _i++) {
|
||||
var alarm = alarms_1[_i];
|
||||
// Check for already existing alarm
|
||||
if (!alarm || typeof alarm != "object" || !alarm.all)
|
||||
continue;
|
||||
var alarm_time = new Date(alarm.time);
|
||||
if (start.getTime() - alarm_time.getTime() == 5 * 60 * 1000) {
|
||||
// Alarm exists
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.et2.getWidgetById('new_alarm[options]').set_value('300');
|
||||
this.et2.getWidgetById('new_alarm[owner]').set_value('0'); // all participants
|
||||
this.et2.getWidgetById('button[add_alarm]').click();
|
||||
|
@ -4160,6 +4160,19 @@ class CalendarApp extends EgwApp
|
||||
this.et2.getWidgetById('participants[notify_externals]').set_value('yes');
|
||||
|
||||
// add alarm for all participants 5min before videoconference
|
||||
let start = new Date(widget.getRoot().getWidgetById('start').getValue());
|
||||
let alarms = this.et2.getArrayMgr('content').getEntry('alarm') || {};
|
||||
for(let alarm of alarms)
|
||||
{
|
||||
// Check for already existing alarm
|
||||
if(!alarm || typeof alarm != "object" || !alarm.all) continue;
|
||||
let alarm_time = new Date(alarm.time);
|
||||
if(start.getTime() - alarm_time.getTime() == 5 * 60 * 1000)
|
||||
{
|
||||
// Alarm exists
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.et2.getWidgetById('new_alarm[options]').set_value('300');
|
||||
this.et2.getWidgetById('new_alarm[owner]').set_value('0'); // all participants
|
||||
this.et2.getWidgetById('button[add_alarm]').click();
|
||||
|
Loading…
Reference in New Issue
Block a user