mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-24 15:49:06 +01:00
some fixes around videoconference avatars and adding an automatic alarm 5min before the conference
This commit is contained in:
parent
72116b9587
commit
1c135b2da3
@ -108,8 +108,8 @@ class Photo
|
||||
return 'https://gravatar.com/'.md5(trim(strtolower($this->contact)));
|
||||
}
|
||||
return Api\Framework::getUrl(Api\Egw::link('/api/anon_lavatar.php', [
|
||||
'firstname' => $this->contact['firstname'],
|
||||
'lastname' => $this->contact['lastname'],
|
||||
'firstname' => $this->contact['n_given'],
|
||||
'lastname' => $this->contact['n_family'],
|
||||
'id' => $this->contact['id'],
|
||||
]));
|
||||
}
|
||||
|
@ -253,7 +253,7 @@ class calendar_boupdate extends calendar_bo
|
||||
{
|
||||
$event['##videoconference'] = EGroupware\Status\Videoconference\Call::genUniqueRoomID();
|
||||
}
|
||||
elseif(empty($event['videoconference']))
|
||||
elseif (isset($event['videoconference']) && !$event['videoconference'])
|
||||
{
|
||||
$event['##videoconference'] = '';
|
||||
}
|
||||
@ -967,7 +967,7 @@ class calendar_boupdate extends calendar_bo
|
||||
continue; // dont notify rejected participants or groups
|
||||
}
|
||||
|
||||
if($userid != $GLOBALS['egw_info']['user']['account_id'] ||
|
||||
if ($userid != $GLOBALS['egw_info']['user']['account_id'] ||
|
||||
($userid == $GLOBALS['egw_info']['user']['account_id'] &&
|
||||
$user_prefs['calendar']['receive_own_updates']==1) ||
|
||||
$msg_type == MSG_ALARM)
|
||||
|
@ -241,13 +241,25 @@ class calendar_uiforms extends calendar_ui
|
||||
$offset = 60 * $this->cal_prefs[$alarm_pref];
|
||||
$alarms[1] = array(
|
||||
'default' => 1,
|
||||
'offset' => $offset ,
|
||||
'offset' => $offset,
|
||||
'time' => $start - $offset,
|
||||
'all' => false,
|
||||
'owner' => $owner,
|
||||
'id' => 1,
|
||||
);
|
||||
}
|
||||
// add automatic alarm 5min before videoconference for all participants
|
||||
if (!empty($_GET['videoconference']))
|
||||
{
|
||||
$offset = -5 * 60;
|
||||
$alarms[1+count($alarms)] = array(
|
||||
'offset' => $offset,
|
||||
'time' => $start - $offset,
|
||||
'all' => true,
|
||||
'owner' => $owner,
|
||||
'id' => 2,
|
||||
);
|
||||
}
|
||||
|
||||
return array(
|
||||
'participant_types' => $participant_types,
|
||||
|
@ -3349,6 +3349,20 @@ var CalendarApp = /** @class */ (function (_super) {
|
||||
}
|
||||
return CalendarApp.DAYWISE_CACHE_ID + '::' + date + (_owner ? '-' + _owner : '');
|
||||
};
|
||||
/**
|
||||
* Videoconference checkbox checked
|
||||
*/
|
||||
CalendarApp.prototype.videoconferenceOnChange = function () {
|
||||
var widget = this.et2.getWidgetById('videoconference');
|
||||
if (widget && widget.get_value()) {
|
||||
// notify all participants
|
||||
this.et2.getWidgetById('participants[notify_externals]').set_value('yes');
|
||||
// add alarm for all participants 5min before videoconference
|
||||
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();
|
||||
}
|
||||
};
|
||||
/**
|
||||
* These are the keys we keep to set & remember the status, others are discarded
|
||||
*/
|
||||
|
@ -4142,6 +4142,25 @@ class CalendarApp extends EgwApp
|
||||
}
|
||||
return CalendarApp.DAYWISE_CACHE_ID+'::'+date+(_owner ? '-' + _owner : '');
|
||||
}
|
||||
|
||||
/**
|
||||
* Videoconference checkbox checked
|
||||
*/
|
||||
public videoconferenceOnChange()
|
||||
{
|
||||
let widget = this.et2.getWidgetById('videoconference');
|
||||
|
||||
if (widget && widget.get_value())
|
||||
{
|
||||
// notify all participants
|
||||
this.et2.getWidgetById('participants[notify_externals]').set_value('yes');
|
||||
|
||||
// add alarm for all participants 5min before videoconference
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
app.classes.calendar = CalendarApp;
|
@ -231,7 +231,7 @@
|
||||
<label for="location" value="Location"/>
|
||||
<hbox span="2">
|
||||
<textbox id="location" maxlength="255" class="et2_fullWidth"/>
|
||||
<checkbox label="Videoconference" id="videoconference" onchange="if (this.checked) document.getElementById('calendar-edit_notify_externals').value='yes';"/>
|
||||
<checkbox label="Videoconference" id="videoconference" onchange="app.calendar.videoconferenceOnChange"/>
|
||||
</hbox>
|
||||
<description/>
|
||||
<taglist-cat id="category" height="190" empty_label="Categories" multiple="toggle" class="et2_fullWidth" rows="1" />
|
||||
|
Loading…
Reference in New Issue
Block a user