Fix videoconference actions

This commit is contained in:
Hadi Nategh 2020-04-08 20:42:57 +02:00
parent 12759d7852
commit ed4884655f
2 changed files with 30 additions and 4 deletions

View File

@ -3364,8 +3364,19 @@ var CalendarApp = /** @class */ (function (_super) {
} }
}; };
CalendarApp.prototype.isVideoConference = function (_action, _selected) { CalendarApp.prototype.isVideoConference = function (_action, _selected) {
var data = egw.dataGetUIDdata(_selected[0].id)['data']; var data = egw.dataGetUIDdata(_selected[0].id);
return data['##videoconference']; return data && data.data ? data.data['##videoconference'] : false;
};
CalendarApp.prototype.joinVideoConference = function (_action, _sender) {
var data = egw.dataGetUIDdata(_sender[0].id)['data'];
egw.json("EGroupware\\Status\\Videoconference\\Call::ajax_genMeetingUrl", [data['##videoconference'],
{
name: egw.user('account_fullname'),
account_id: egw.user('account_id'),
email: egw.user('account_email')
}], function (_url) {
app.status.openCall(_url);
}).sendRequest();
}; };
/** /**
* These are the keys we keep to set & remember the status, others are discarded * These are the keys we keep to set & remember the status, others are discarded

View File

@ -4164,8 +4164,23 @@ class CalendarApp extends EgwApp
public isVideoConference(_action, _selected) public isVideoConference(_action, _selected)
{ {
let data = egw.dataGetUIDdata(_selected[0].id)['data']; let data = egw.dataGetUIDdata(_selected[0].id);
return data['##videoconference']; return data && data.data ? data.data['##videoconference'] : false;
}
public joinVideoConference(_action, _sender)
{
let data = egw.dataGetUIDdata(_sender[0].id)['data'];
egw.json(
"EGroupware\\Status\\Videoconference\\Call::ajax_genMeetingUrl",
[data['##videoconference'],
{
name:egw.user('account_fullname'),
account_id:egw.user('account_id'),
email:egw.user('account_email')
}], function(_url){
app.status.openCall(_url);
}).sendRequest();
} }
} }