add join-videoconverence button to mobile calendar edit

This commit is contained in:
ralf 2024-11-23 08:28:34 +01:00
parent b8d8c70119
commit 9524791448
5 changed files with 15 additions and 8 deletions

View File

@ -1962,7 +1962,13 @@ class calendar_uiforms extends calendar_ui
if (!empty($preserved['lock_token'])) $content['lock_token'] = $preserved['lock_token'];
//Disable videoconference if the module is not enabled
$etpl->disableElement('videoconference', calendar_hooks::isVideoconferenceDisabled());
$etpl->disableElement('videoconference', $video_disabled=calendar_hooks::isVideoconferenceDisabled());
// disable mobile Join Videoconference button, if not available or enabled
if ($video_disabled || empty($content['id']) || empty($content['##videoconference']))
{
$readonlys['button[videoconference]'] = true;
}
$content['future_exceptions'] = !empty($content['id']) && !empty($content['recur_type']) &&
$this->bo->search(['start' => Api\DateTime::to('now', 'ts')], 'cal_reference='.(int)$content['id']);

View File

@ -999,7 +999,7 @@ class calendar_uilist extends calendar_ui
{
Api\Translation::add_app('status');
$actions['videoconference'] = [
'icon' => 'status/videoconference',
'icon' => 'camera-video',
'caption' => 'Video Conference',
'group' => $group,
'allowOnMultiple' => false,
@ -1008,14 +1008,14 @@ class calendar_uilist extends calendar_ui
'children' => [
'join' => [
'caption' => 'Join',
'icon' => 'status/videoconference_join',
'icon' => 'camera-video',
'onExecute' => 'javaScript:app.calendar.videoConferenceAction',
'enabled' => !calendar_hooks::isVideoconferenceDisabled(),
'allowOnMultiple' => false,
],
'recordings' => [
'caption' => 'Recordings',
'icon' => 'status/videoconference_recordings',
'icon' => 'record-btn',
'onExecute' => 'javaScript:app.calendar.videoConferenceAction',
'enabled' => !calendar_hooks::isVideoconferenceDisabled()
|| calendar_hooks::isVCRecordingSupported(),

View File

@ -4386,7 +4386,7 @@ export class CalendarApp extends EgwApp
if (_value)
{
if (_value.err) egw.message(_value.err, 'error');
if(_value.url) egw.top.app.status.openCall(_value.url);
if(_value.url) egw.callFunc('app.status.openCall', _value.url);
}
}).sendRequest();
}

View File

@ -195,6 +195,8 @@
<et2-button-icon statustext="Find free timeslots where the selected participants are available for the given timespan"
id="freetime" label="Freetime" onclick="app.calendar.freetime_search" image="clock-history" noSubmit="true"></et2-button-icon>
<et2-button-toggle label="notifications" id="no_notifications" class="notification_check" onIcon="bell-fill" offIcon="bell-slash"/>
<et2-button-icon id="button[videoconference]" image="status/videoconference" noSubmit="true"
onclick="app.calendar.joinVideoConference.call(window, '$cont[##videoconference]', this.getArrayMgr('content').data)"></et2-button-icon>
<et2-textbox type="hidden" id="delete_exceptions"></et2-textbox>
</et2-hbox>
</row>

View File

@ -4,9 +4,8 @@ Egroupware
@license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
@package
@subpackage
@link http://www.egroupware.org
@link https://www.egroupware.org
@author Nathan Gray
@version $Id$
-->
<!DOCTYPE overlay PUBLIC "-//EGroupware GmbH//eTemplate 2.0//EN" "https://www.egroupware.org/etemplate2.0.dtd">
@ -21,7 +20,7 @@ Egroupware
<rows>
<row class="view_row">
<calendar-timegrid id="${row}"
onchange="var state = {}; if(widget.options.start_date == widget.options.end_date) state.view = 'day'; app.calendar.update_state(state);let s = widget.getInstanceManager().app_obj.calendar.state;let d = new Date(s.date);import(egw.link('/api/js/etemplate/lib/date.js')).then((m)=>{widget.getInstanceManager().widgetContainer.getWidgetById('header_dateIndicator').set_value((s.view == 'day'?date('d', d)+'-':'')+egw.lang(date('M',d))+'-'+date('Y',d));});"
onchange="var state = {}; if(widget.options.start_date == widget.options.end_date) state.view = 'day'; app.calendar.update_state(state);let s = widget.getInstanceManager().app_obj.calendar.state;let d = new Date(s.date); import(egw.link('/api/js/etemplate/lib/date.js')).then((m)=>{const date=m.date; widget.getInstanceManager().widgetContainer.getWidgetById('header_dateIndicator').set_value((s.view == 'day'?date('d', d)+'-':'')+egw.lang(date('M',d))+'-'+date('Y',d));});"
onevent_change="app.calendar.event_change"
>
</calendar-timegrid>