mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-05 05:29:13 +01:00
Add some missed cases for adding new events:
- click on day in month view - context menu with no specific time (month view) - fix all day non-blocking in header no longer created a new event
This commit is contained in:
parent
d105b8c751
commit
3ea15bf95c
@ -1322,7 +1322,7 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
|
|||||||
// Get a little smarter with the context
|
// Get a little smarter with the context
|
||||||
if(!extra)
|
if(!extra)
|
||||||
{
|
{
|
||||||
var context = {}
|
var context = {};
|
||||||
if(egw.dataGetUIDdata(_events[0].id) && egw.dataGetUIDdata(_events[0].id).data)
|
if(egw.dataGetUIDdata(_events[0].id) && egw.dataGetUIDdata(_events[0].id).data)
|
||||||
{
|
{
|
||||||
// Found data in global cache
|
// Found data in global cache
|
||||||
@ -1337,6 +1337,17 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
|
|||||||
_events[0].iface.getWidget().options.value || {}
|
_events[0].iface.getWidget().options.value || {}
|
||||||
extra = {};
|
extra = {};
|
||||||
}
|
}
|
||||||
|
// Try to pull whatever we can from the event
|
||||||
|
else if (jQuery.isEmptyObject(context) && _action.menu_context && (_action.menu_context.event.target))
|
||||||
|
{
|
||||||
|
var target = _action.menu_context.event.target;
|
||||||
|
while(target != null && target.parentNode && jQuery.isEmptyObject(target.dataset))
|
||||||
|
{
|
||||||
|
target = target.parentNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
context = extra = target.dataset;
|
||||||
|
}
|
||||||
if(context.date) extra.date = context.date;
|
if(context.date) extra.date = context.date;
|
||||||
if(context.app) extra.app = context.app;
|
if(context.app) extra.app = context.app;
|
||||||
if(context.app_id) extra.app_id = context.app_id;
|
if(context.app_id) extra.app_id = context.app_id;
|
||||||
|
@ -1012,7 +1012,7 @@ var et2_calendar_daycol = (function(){ "use strict"; return et2_valueWidget.exte
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Header, but not the hidden event indicators that are in there
|
// Header, but not the hidden event indicators that are in there
|
||||||
else if (this.header.has(_ev.target).length && !$j('.hiddenEventBefore',this.header).has(_ev.target) ||
|
else if (this.header.has(_ev.target).length && !$j('.hiddenEventBefore',this.header).has(_ev.target).length ||
|
||||||
this.header.is(_ev.target)
|
this.header.is(_ev.target)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -1643,6 +1643,25 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// No time grid, click on a day
|
||||||
|
else if (this.options.granularity === 0 &&
|
||||||
|
($j(_ev.target).hasClass('event_wrapper') || $j(_ev.target).hasClass('.calendar_calDayCol'))
|
||||||
|
)
|
||||||
|
{
|
||||||
|
// Default handler to open a new event at the selected time
|
||||||
|
var target = $j(_ev.target).hasClass('event_wrapper') ? _ev.target.parentNode : _ev.target;
|
||||||
|
var options = {
|
||||||
|
date: target.dataset.date || this.options.date,
|
||||||
|
hour: target.dataset.hour || this._parent.options.day_start,
|
||||||
|
minute: target.dataset.minute || 0
|
||||||
|
};
|
||||||
|
if (this.options.owner != app.calendar.state.owner)
|
||||||
|
{
|
||||||
|
options.owner = this.options.owner;
|
||||||
|
}
|
||||||
|
this.egw().open(null, 'calendar', 'add', options, '_blank');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user