mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
Calendar: Fix infolog displayed on calendar did not properly convert to timesheet entry
This commit is contained in:
parent
64c8ac9970
commit
aed4b78dda
@ -1570,9 +1570,19 @@ var CalendarApp = /** @class */ (function (_super) {
|
|||||||
* @param {egwActionObject[]} _events
|
* @param {egwActionObject[]} _events
|
||||||
*/
|
*/
|
||||||
CalendarApp.prototype.action_open = function (_action, _events) {
|
CalendarApp.prototype.action_open = function (_action, _events) {
|
||||||
var id = _events[0].id.split('::');
|
var app, id, app_id;
|
||||||
var app = id[0];
|
// Try to get better by going straight for the data
|
||||||
var app_id = id[1];
|
var data = egw.dataGetUIDdata(_events[0].id);
|
||||||
|
if (data && data.data) {
|
||||||
|
app = data.data.app;
|
||||||
|
app_id = data.data.app_id;
|
||||||
|
id = data.data.id;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Try to set some reasonable values from the ID
|
||||||
|
id = _events[0].id.split('::');
|
||||||
|
app = id[0];
|
||||||
|
app_id = id[1];
|
||||||
if (app_id && app_id.indexOf(':')) {
|
if (app_id && app_id.indexOf(':')) {
|
||||||
var split = id[1].split(':');
|
var split = id[1].split(':');
|
||||||
id = split[0];
|
id = split[0];
|
||||||
@ -1580,6 +1590,7 @@ var CalendarApp = /** @class */ (function (_super) {
|
|||||||
else {
|
else {
|
||||||
id = app_id;
|
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 || '';
|
||||||
|
@ -1696,18 +1696,32 @@ class CalendarApp extends EgwApp
|
|||||||
*/
|
*/
|
||||||
action_open(_action, _events)
|
action_open(_action, _events)
|
||||||
{
|
{
|
||||||
var id = _events[0].id.split('::');
|
let app, id, app_id;
|
||||||
var app = id[0];
|
// Try to get better by going straight for the data
|
||||||
var app_id = id[1];
|
let data = egw.dataGetUIDdata(_events[0].id);
|
||||||
|
if(data && data.data)
|
||||||
|
{
|
||||||
|
app = data.data.app;
|
||||||
|
app_id = data.data.app_id;
|
||||||
|
id = data.data.id;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Try to set some reasonable values from the ID
|
||||||
|
id = _events[0].id.split('::');
|
||||||
|
app = id[0];
|
||||||
|
app_id = id[1];
|
||||||
if(app_id && app_id.indexOf(':'))
|
if(app_id && app_id.indexOf(':'))
|
||||||
{
|
{
|
||||||
var split = id[1].split(':');
|
let split = id[1].split(':');
|
||||||
id = split[0];
|
id = split[0];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
id = app_id;
|
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) || {};
|
||||||
|
Loading…
Reference in New Issue
Block a user