mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-09 23:48:28 +01:00
Calendar bugs with multi-day events:
- Fix not properly visible if they span weeks - Fix end date changes when editing if the event spans DST (daylight savings time) change
This commit is contained in:
parent
533ad2cc0e
commit
815b6bc09a
@ -685,7 +685,9 @@ app.classes.calendar = AppJS.extend(
|
|||||||
if (typeof duration != 'undefined' && typeof end != 'undefined')
|
if (typeof duration != 'undefined' && typeof end != 'undefined')
|
||||||
{
|
{
|
||||||
end.set_disabled(duration.get_value()!=='');
|
end.set_disabled(duration.get_value()!=='');
|
||||||
if (!end.disabled )
|
|
||||||
|
// Only set end date if not provided, adding seconds fails with DST
|
||||||
|
if (!end.disabled && !content.end)
|
||||||
{
|
{
|
||||||
end.set_value(start.get_value());
|
end.set_value(start.get_value());
|
||||||
if (typeof content.duration != 'undefined') end.set_value("+"+content.duration);
|
if (typeof content.duration != 'undefined') end.set_value("+"+content.duration);
|
||||||
@ -2025,7 +2027,7 @@ app.classes.calendar = AppJS.extend(
|
|||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
var expanded_date = ''+t.getUTCFullYear() + sprintf('%02d',t.getUTCMonth()+1) + sprintf('%02d',t.getDate());
|
var expanded_date = ''+t.getUTCFullYear() + sprintf('%02d',t.getUTCMonth()+1) + sprintf('%02d',t.getUTCDate());
|
||||||
if(typeof(updated_days[expanded_date]) === 'undefined')
|
if(typeof(updated_days[expanded_date]) === 'undefined')
|
||||||
{
|
{
|
||||||
updated_days[expanded_date] = [];
|
updated_days[expanded_date] = [];
|
||||||
|
@ -237,7 +237,11 @@ var et2_calendar_daycol = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResizea
|
|||||||
for(var i = 0; i < event_ids.length; i++)
|
for(var i = 0; i < event_ids.length; i++)
|
||||||
{
|
{
|
||||||
var event = egw.dataGetUIDdata('calendar::'+event_ids[i]).data;
|
var event = egw.dataGetUIDdata('calendar::'+event_ids[i]).data;
|
||||||
if(event && event.date && event.date === this.options.date)
|
if(event && event.date && (
|
||||||
|
event.date === this.options.date ||
|
||||||
|
// Accept multi-day events
|
||||||
|
new Date(event.start) <= this.date //&& new Date(event.end) >= this.date
|
||||||
|
))
|
||||||
{
|
{
|
||||||
events.push(event);
|
events.push(event);
|
||||||
}
|
}
|
||||||
@ -420,7 +424,10 @@ var et2_calendar_daycol = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResizea
|
|||||||
{
|
{
|
||||||
var event = this._children[i].options.value || false;
|
var event = this._children[i].options.value || false;
|
||||||
if(!event) continue;
|
if(!event) continue;
|
||||||
if(event.date && event.date != this.options.date)
|
if(event.date && event.date != this.options.date &&
|
||||||
|
// Multi-day events date may be different
|
||||||
|
(new Date(event.start) >= this.date || new Date(event.end) <= this.date )
|
||||||
|
)
|
||||||
{
|
{
|
||||||
// Still have a child event that has changed date (DnD)
|
// Still have a child event that has changed date (DnD)
|
||||||
this._children[i].destroy();
|
this._children[i].destroy();
|
||||||
|
Loading…
Reference in New Issue
Block a user