fix not working opening/converting calls to infolog

This commit is contained in:
ralf 2024-08-06 15:32:10 +02:00
parent 0c8f4c4872
commit e583de2bce
3 changed files with 8 additions and 6 deletions

View File

@ -1045,6 +1045,8 @@ class calendar_uilist extends calendar_ui
'group' => $group, 'group' => $group,
'allowOnMultiple' => false, 'allowOnMultiple' => false,
'url' => 'menuaction=infolog.infolog_ui.edit&type=task&action=calendar&action_id=$id', 'url' => 'menuaction=infolog.infolog_ui.edit&type=task&action=calendar&action_id=$id',
'onExecute' => 'javaScript:app.calendar.action_open',
'open' => '{"app": "infolog", "type": "add", "extra": "type=task&action=$app&action_id=$app_id"}',
'popup' => Link::get_registry('infolog', 'add_popup'), 'popup' => Link::get_registry('infolog', 'add_popup'),
// Limit infolog convert to only the apps that support it (some entries may be other apps via integration) // Limit infolog convert to only the apps that support it (some entries may be other apps via integration)
'enabled' => 'javaScript:app.calendar.action_convert_enabled_check', 'enabled' => 'javaScript:app.calendar.action_convert_enabled_check',

View File

@ -961,11 +961,6 @@ class calendar_uiviews extends calendar_ui
$actions['filemanager']['url'] = '/index.php?'. $actions['filemanager']['url']; $actions['filemanager']['url'] = '/index.php?'. $actions['filemanager']['url'];
$actions['filemanager']['onExecute'] = 'javaScript:app.calendar.action_open'; $actions['filemanager']['onExecute'] = 'javaScript:app.calendar.action_open';
} }
if ($actions['infolog_app'])
{
$actions['infolog_app']['open'] = '{"app": "infolog", "type": "add", "extra": "type=task&action=$app&action_id=$id"}';
$actions['infolog_app']['onExecute'] = 'javaScript:app.calendar.action_open';
}
$actions['ical']['onExecute'] = 'javaScript:app.calendar.ical'; $actions['ical']['onExecute'] = 'javaScript:app.calendar.ical';
$actions['delete']['onExecute'] = 'javaScript:app.calendar.delete'; $actions['delete']['onExecute'] = 'javaScript:app.calendar.delete';
@ -1022,4 +1017,4 @@ class calendar_uiviews extends calendar_ui
} }
return $dayEvents; return $dayEvents;
} }
} }

View File

@ -1820,6 +1820,11 @@ export class CalendarApp extends EgwApp
{ {
app = data.data.app; app = data.data.app;
app_id = data.data.app_id; app_id = data.data.app_id;
if (app === 'calendar' && app_id.indexOf(':'))
{
let parts = app_id.split(':');
app_id = parts[0];
}
id = data.data.id; id = data.data.id;
} }
else else