Author: nathangray
Date: Wed Apr 27 21:28:31 2016
New Revision: 55903
URL: http://svn.stylite.de/viewvc/egroupware?rev=55903&view=rev
Log:
Implement ical context menu action on single events in non-list views
Modified:
trunk/calendar/inc/class.calendar_uiviews.inc.php
trunk/calendar/js/app.js
Modified: trunk/calendar/inc/class.calendar_uiviews.inc.php
URL: http://svn.stylite.de/viewvc/egroupware/trunk/calendar/inc/class.calendar_uiviews.inc.php?rev=55903&r1=55902&r2=55903&view=diff
==============================================================================
--- trunk/calendar/inc/class.calendar_uiviews.inc.php (original)
+++ trunk/calendar/inc/class.calendar_uiviews.inc.php Wed Apr 27 21:28:31 2016
@@ -2602,6 +2602,7 @@
// 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';
Modified: trunk/calendar/js/app.js
URL: http://svn.stylite.de/viewvc/egroupware/trunk/calendar/js/app.js?rev=55903&r1=55902&r2=55903&view=diff
==============================================================================
--- trunk/calendar/js/app.js (original)
+++ trunk/calendar/js/app.js Wed Apr 27 21:28:31 2016
@@ -1306,6 +1306,26 @@
url = url.replace(/(\$|%24)app/,id[0]).replace(/(\$|%24)id/,id[1]);
this.egw.open_link(url);
}
+ },
+
+ /**
+ * 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);
},
/**
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.