resize event to different week (issue 308), necessary event rendering refactoring

This commit is contained in:
Adam Shaw
2010-11-09 22:54:41 -08:00
parent c1a19a24c8
commit 64b84cc385
7 changed files with 315 additions and 108 deletions
+11 -2
View File
@@ -25,6 +25,7 @@ function BasicView(element, calendar, viewName) {
t.colContentLeft = colContentLeft;
t.colContentRight = colContentRight;
t.dayOfWeekCol = dayOfWeekCol;
t.dateCell = dateCell;
t.cellDate = cellDate;
t.cellIsAllDay = function() { return true };
t.allDayTR = allDayTR;
@@ -335,7 +336,7 @@ function BasicView(element, calendar, viewName) {
function renderSelection(startDate, endDate, allDay) {
renderDayOverlay(startDate, addDays(cloneDate(endDate), 1), true);
renderDayOverlay(startDate, addDays(cloneDate(endDate), 1), true); // rebuild every time???
}
@@ -427,7 +428,15 @@ function BasicView(element, calendar, viewName) {
function dayOfWeekCol(dayOfWeek) {
return (dayOfWeek - Math.max(firstDay,nwe)+colCnt) % colCnt;
return (dayOfWeek - Math.max(firstDay, nwe) + colCnt) % colCnt;
}
function dateCell(date) {
return {
row: Math.floor(dayDiff(date, t.visStart) / 7),
col: dayOfWeekCol(date.getDay())*dis + dit
};
}