From b2da44b479809521587948c8d44704bef1853f54 Mon Sep 17 00:00:00 2001 From: sean kenny Date: Thu, 24 Jul 2014 11:41:25 +0100 Subject: [PATCH] Issue 17 - Fix to overlay issue - was overlaying on incorrect column when highlighting --- src/resource/ResourceView.js | 34 ++-- tests/Issue16ClickEventDates.html | 266 ++++++++++++------------------ 2 files changed, 124 insertions(+), 176 deletions(-) diff --git a/src/resource/ResourceView.js b/src/resource/ResourceView.js index e5f9838..4a084fd 100644 --- a/src/resource/ResourceView.js +++ b/src/resource/ResourceView.js @@ -598,22 +598,20 @@ function ResourceView(element, calendar, viewName) { } - function renderSlotOverlay(overlayStart, overlayEnd) { - for (var i=0; i - - - + + + + + - - + +

Calendar demo

+ +
- -

Calendar demo

-
- -
- -
- - - - - - - + + + @@ -62,142 +40,114 @@ - + - - + - + $("#study-selector").change(function(a, b, c) { + var office = $(this).val(); + + // TAC + if (office == 2){ + events = [{ + title: 'TAC Appointment', + start: new Date(y, m, d, 08, 30), + end: new Date(y, m, d, 09, 00), + allDay: false, + resources: ['3'] + }]; + resources = [{'id':'3','name':'Tac Office'}]; + } else if (office == 3){ + events = [{ + title: 'RMN Appointment', + start: new Date(y, m, d, 09, 15), + end: new Date(y, m, d, 10, 00), + allDay: false, + resources: ['4'] + }]; + resources = [{'id':'4','name':'RMS Office'}]; + } else { + events = ecoEvents; + resources = ecoResources; + } + + cal = $('#calendar'); + cal.fullCalendar('setResources', resources) + cal.fullCalendar('removeEvents') + cal.fullCalendar('render') + cal.fullCalendar('addEventSource', events) + }); + + \ No newline at end of file