* Calendar: Add print action to event context menu

This commit is contained in:
nathangray 2016-08-01 09:11:29 -06:00
parent 3c246fe494
commit 863242689f
2 changed files with 10 additions and 0 deletions

View File

@ -890,6 +890,14 @@ class calendar_uilist extends calendar_ui
'popup' => Link::get_registry('calendar', 'view_popup'), 'popup' => Link::get_registry('calendar', 'view_popup'),
'allowOnMultiple' => false, 'allowOnMultiple' => false,
), ),
'print' => array(
'caption' => 'Print',
'group' => $group,
'disableClass' => 'rowNoView',
'url' => 'menuaction=calendar.calendar_uiforms.edit&cal_id=$id&print=1',
'popup' => Link::get_registry('calendar', 'view_popup'),
'allowOnMultiple' => false,
),
'select_all' => array( 'select_all' => array(
'caption' => 'Whole query', 'caption' => 'Whole query',
'checkbox' => true, 'checkbox' => true,

View File

@ -914,6 +914,8 @@ class calendar_uiviews extends calendar_ui
$actions['add']['onExecute'] = 'javaScript:app.calendar.action_open'; $actions['add']['onExecute'] = 'javaScript:app.calendar.action_open';
$actions['copy']['open'] = '{"app": "calendar", "type": "add", "extra": "cal_id=$id&action=copy"}'; $actions['copy']['open'] = '{"app": "calendar", "type": "add", "extra": "cal_id=$id&action=copy"}';
$actions['copy']['onExecute'] = 'javaScript:app.calendar.action_open'; $actions['copy']['onExecute'] = 'javaScript:app.calendar.action_open';
$actions['print']['open'] = '{"app": "calendar", "type": "add", "extra": "cal_id=$id&print=1"}';
$actions['print']['onExecute'] = 'javaScript:app.calendar.action_open';
foreach($actions['status']['children'] as $id => &$status) foreach($actions['status']['children'] as $id => &$status)
{ {