From c755f005c0e00045d4729b9f9d3b858b22d6d8ec Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Wed, 8 Apr 2020 19:54:26 +0200 Subject: [PATCH] Add join videoconference action --- calendar/inc/class.calendar_uilist.inc.php | 21 +++++++++++++++++++++ calendar/js/app.js | 4 ++++ calendar/js/app.ts | 6 ++++++ 3 files changed, 31 insertions(+) diff --git a/calendar/inc/class.calendar_uilist.inc.php b/calendar/inc/class.calendar_uilist.inc.php index a7785bb690..491a9b7f0a 100644 --- a/calendar/inc/class.calendar_uilist.inc.php +++ b/calendar/inc/class.calendar_uilist.inc.php @@ -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( diff --git a/calendar/js/app.js b/calendar/js/app.js index 97540a54d0..f10cafaf4a 100644 --- a/calendar/js/app.js +++ b/calendar/js/app.js @@ -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 */ diff --git a/calendar/js/app.ts b/calendar/js/app.ts index 9f04bca7f3..b766bed58a 100644 --- a/calendar/js/app.ts +++ b/calendar/js/app.ts @@ -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; \ No newline at end of file