1
0
Fork 0
forked from 0x2620/oxjs

change sort algorithm for events stacking

This commit is contained in:
rolux 2011-05-27 14:20:54 +02:00
commit 3d7607b78a
3 changed files with 14 additions and 4 deletions

View file

@ -831,8 +831,14 @@ Ox.Calendar = function(options, self) {
return -1;
} else if (a.type != 'date' && b.type == 'date') {
return 1;
} else if (a.type == 'person' && b.type != 'person') {
return 1;
} else if (a.type != 'person' && b.type == 'person') {
return -1;
/*
} else if (a.startTime < b.startTime || a.startTime > b.startTime) {
return a.startTime - b.startTime;
*/
} else {
return (b.endTime - b.startTime) - (a.endTime - a.startTime);
}
@ -857,7 +863,7 @@ Ox.Calendar = function(options, self) {
if (line == lineEvents.length) {
lineEvents[line] = [];
}
lineEvents[line].push(event);
lineEvents[line].push(event);
});
self.$content.find('.OxLine').remove();
height = lineEvents.length * 16;