mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 08:39:07 +01:00
Fix infinite loop in monthly planner with multi-month events
This commit is contained in:
parent
61d4e1535e
commit
6e924a3700
@ -514,16 +514,16 @@ var et2_calendar_planner = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResize
|
||||
var end = new Date(event.end);
|
||||
end = new Date(end.valueOf() + end.getTimezoneOffset() * 60 * 1000);
|
||||
var end_key = end.getFullYear() +'-'+end.getMonth();
|
||||
var year = start.getFullYear();
|
||||
var month = start.getMonth();
|
||||
while(key !== end_key)
|
||||
{
|
||||
var year = start.getFullYear();
|
||||
var month = start.getMonth();
|
||||
if (++month > 12)
|
||||
if (++month > 11)
|
||||
{
|
||||
++year;
|
||||
month = 1;
|
||||
month = 0;
|
||||
}
|
||||
key = sprintf('%04d-%02d',year,month);
|
||||
key = sprintf('%04d-%d',year,month);
|
||||
for(var i = 0; i < labels.length; i++)
|
||||
{
|
||||
if(labels[i].id == key)
|
||||
@ -764,6 +764,7 @@ var et2_calendar_planner = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResize
|
||||
|
||||
// Group the events
|
||||
var events = {};
|
||||
debugger;
|
||||
for(var i = 0; i < this.value.length; i++)
|
||||
{
|
||||
grouper.group.call(this, labels, events, this.value[i]);
|
||||
|
Loading…
Reference in New Issue
Block a user