mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
* Calendar - Fix Filemanager, Infolog & Timesheet context menu actions
This commit is contained in:
parent
df577514dd
commit
f7f4f2d07a
@ -1408,18 +1408,39 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
|
|||||||
/**
|
/**
|
||||||
* Application links from non-list events
|
* Application links from non-list events
|
||||||
*
|
*
|
||||||
|
* The ID looks like calendar::<id> or calendar::<id>:<recurrence_date>
|
||||||
|
* For processing the links:
|
||||||
|
* '$app' gets replaced with 'calendar'
|
||||||
|
* '$id' gets replaced with <id>
|
||||||
|
* '$app_id gets replaced with <id>:<recurrence_date>
|
||||||
|
*
|
||||||
|
* Use either $id or $app_id depending on if you want the series [beginning]
|
||||||
|
* or a particular date.
|
||||||
|
*
|
||||||
* @param {egwAction} _action
|
* @param {egwAction} _action
|
||||||
* @param {egwActionObject[]} _events
|
* @param {egwActionObject[]} _events
|
||||||
*/
|
*/
|
||||||
action_open: function(_action, _events)
|
action_open: function(_action, _events)
|
||||||
{
|
{
|
||||||
var id = _events[0].id.split('::');
|
var id = _events[0].id.split('::');
|
||||||
|
var app = id[0];
|
||||||
|
var app_id = id[1];
|
||||||
|
if(app_id.indexOf(':'))
|
||||||
|
{
|
||||||
|
var split = id[1].split(':');
|
||||||
|
id = split[0];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
id = app_id;
|
||||||
|
}
|
||||||
if(_action.data.open)
|
if(_action.data.open)
|
||||||
{
|
{
|
||||||
var open = JSON.parse(_action.data.open) || {};
|
var open = JSON.parse(_action.data.open) || {};
|
||||||
var extra = open.extra || '';
|
var extra = open.extra || '';
|
||||||
|
|
||||||
extra = extra.replace(/(\$|%24)app/,id[0]).replace(/(\$|%24)id/,id[1]);
|
extra = extra.replace(/(\$|%24)app/,app).replace(/(\$|%24)app_id/,app_id)
|
||||||
|
.replace(/(\$|%24)id/,id);
|
||||||
|
|
||||||
// Get a little smarter with the context
|
// Get a little smarter with the context
|
||||||
if(!extra)
|
if(!extra)
|
||||||
@ -1465,7 +1486,8 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
|
|||||||
else if (_action.data.url)
|
else if (_action.data.url)
|
||||||
{
|
{
|
||||||
var url = _action.data.url;
|
var url = _action.data.url;
|
||||||
url = url.replace(/(\$|%24)app/,id[0]).replace(/(\$|%24)id/,id[1]);
|
url = url.replace(/(\$|%24)app/,app).replace(/(\$|%24)app_id/,app_id)
|
||||||
|
.replace(/(\$|%24)id/,id);
|
||||||
this.egw.open_link(url);
|
this.egw.open_link(url);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user