change sort algorithm for events stacking
This commit is contained in:
parent
453f226b18
commit
3d7607b78a
3 changed files with 14 additions and 4 deletions
|
|
@ -169,8 +169,8 @@ Calendar
|
|||
//background: -webkit-linear-gradient(top, rgba(255, 0, 64, 0.9), rgba(224, 0, 32, 0.9));
|
||||
}
|
||||
.OxCalendar .OxLine > .OxEvent.OxPerson {
|
||||
//background: -moz-linear-gradient(top, rgba(255, 96, 0, 0.9), rgba(224, 80, 0, 0.9));
|
||||
//background: -webkit-linear-gradient(top, rgba(255, 96, 0, 0.9), rgba(224, 80, 0, 0.9));
|
||||
background: -moz-linear-gradient(top, rgba(255, 96, 0, 0.9), rgba(224, 80, 0, 0.9));
|
||||
background: -webkit-linear-gradient(top, rgba(255, 96, 0, 0.9), rgba(224, 80, 0, 0.9));
|
||||
}
|
||||
.OxCalendar .OxLine > .OxEvent.OxSelected {
|
||||
background: -moz-linear-gradient(top, rgba(128, 128, 255, 0.9), rgba(96, 96, 224, 0.9));
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue