From 189105eec5f9a98fea17dc266feba1af833cf7c3 Mon Sep 17 00:00:00 2001 From: sean kenny Date: Thu, 24 Jul 2014 14:04:28 +0100 Subject: [PATCH] Fix to all day select dates --- src/resource/ResourceView.js | 62 ++++++++++++++++++++----------- tests/Issue16ClickEventDates.html | 10 +++-- 2 files changed, 48 insertions(+), 24 deletions(-) diff --git a/src/resource/ResourceView.js b/src/resource/ResourceView.js index 4a084fd..879376a 100644 --- a/src/resource/ResourceView.js +++ b/src/resource/ResourceView.js @@ -56,7 +56,7 @@ function ResourceView(element, calendar, viewName) { t.reportDayClick = reportDayClick; // selection mousedown hack t.dragStart = dragStart; t.dragStop = dragStop; - t.getResources = calendar.fetchResources; + t.getResources = calendar.fetchResources; // imports View.call(t, element, calendar, viewName); @@ -69,7 +69,6 @@ function ResourceView(element, calendar, viewName) { var clearOverlays = t.clearOverlays; var reportSelection = t.reportSelection; var unselect = t.unselect; - var daySelectionMousedown = t.daySelectionMousedown; var slotSegHtml = t.slotSegHtml; var cellToDate = t.cellToDate; var dateToCell = t.dateToCell; @@ -549,7 +548,7 @@ function ResourceView(element, calendar, viewName) { var date = cellToDate(0, 0); var rowMatch = this.parentNode.className.match(/fc-slot(\d+)/); // TODO: maybe use data - ev.data = resources()[col]; + ev.data = resources()[col]; if (rowMatch) { var mins = parseInt(rowMatch[1]) * opt('slotMinutes'); @@ -570,25 +569,13 @@ function ResourceView(element, calendar, viewName) { // TODO: should be consolidated with BasicView's methods - function renderDayOverlay(overlayStart, overlayEnd, refreshCoordinateGrid) { // overlayEnd is exclusive - + function renderDayOverlay(overlayStart, overlayEnd, refreshCoordinateGrid, col) { // overlayEnd is exclusive + var allDayRow = 0; if (refreshCoordinateGrid) { coordinateGrid.build(); } - var segments = rangeToSegments(overlayStart, overlayEnd); - - for (var i=0; i