mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
Implement ical context menu action on single events in non-list views
This commit is contained in:
parent
7c17f2a4a4
commit
91b8995938
@ -2602,6 +2602,7 @@ class calendar_uiviews extends calendar_ui
|
||||
// TODO: See if we can get this working sensibly
|
||||
$actions['documents']['enabled'] = false;
|
||||
}
|
||||
$actions['ical']['onExecute'] = 'javaScript:app.calendar.ical';
|
||||
|
||||
$actions['delete']['onExecute'] = 'javaScript:app.calendar.delete';
|
||||
|
||||
|
@ -1308,6 +1308,26 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Context menu action (on a single event) in non-listview to generate ical
|
||||
*
|
||||
* Since nextmatch is all ready to handle that, we pass it through
|
||||
*
|
||||
* @param {egwAction} _action
|
||||
* @param {egwActionObject[]} _events
|
||||
*/
|
||||
ical: function(_action, _events)
|
||||
{
|
||||
// Send it through nextmatch
|
||||
_action.data.nextmatch = etemplate2.getById('calendar-list').widgetContainer.getWidgetById('nm');
|
||||
var ids = {ids:[]};
|
||||
for(var i = 0; i < _events.length; i++)
|
||||
{
|
||||
ids.ids.push(_events[i].id);
|
||||
}
|
||||
nm_action(_action, _events, null, ids);
|
||||
},
|
||||
|
||||
/**
|
||||
* Change status (via AJAX)
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user