Add join videoconference action

This commit is contained in:
Hadi Nategh 2020-04-08 19:54:26 +02:00
parent 0fb4176067
commit c755f005c0
3 changed files with 31 additions and 0 deletions

View File

@ -941,6 +941,27 @@ class calendar_uilist extends calendar_ui
'group' => ++$group,
);
++$group; // integration with other apps: infolog, calendar, filemanager
if ($GLOBALS['egw_info']['user']['apps']['status'])
{
$actions['videoconference'] = [
'icon' => 'status/videoconference',
'caption' => 'Video conference',
'group' => $group,
'allowOnMultiple' => false,
'disableClass' => 'rowNoView',
'enabled' => 'javaScript:app.calendar.isVideoConference',
'children' => [
'join' => [
'caption' => 'Join',
'icon' => 'status/videoconference_join',
'onExecute' => 'javaScript:app.calendar.joinVideoConference',
'allowOnMultiple' => false,
]
]
];
}
if ($GLOBALS['egw_info']['user']['apps']['filemanager'])
{
$actions['filemanager'] = array(

View File

@ -3363,6 +3363,10 @@ var CalendarApp = /** @class */ (function (_super) {
this.et2.getWidgetById('button[add_alarm]').click();
}
};
CalendarApp.prototype.isVideoConference = function (_action, _selected) {
var data = egw.dataGetUIDdata(_selected[0].id)['data'];
return data['##videoconference'];
};
/**
* These are the keys we keep to set & remember the status, others are discarded
*/

View File

@ -4161,6 +4161,12 @@ class CalendarApp extends EgwApp
this.et2.getWidgetById('button[add_alarm]').click();
}
}
public isVideoConference(_action, _selected)
{
let data = egw.dataGetUIDdata(_selected[0].id)['data'];
return data['##videoconference'];
}
}
app.classes.calendar = CalendarApp;