diff --git a/src/agenda.js b/src/agenda.js index 63d058e..28a5c10 100644 --- a/src/agenda.js +++ b/src/agenda.js @@ -347,7 +347,7 @@ function Agenda(element, options, methods) { /* Event Rendering -----------------------------------------------------------------------------*/ - function renderEvents(events) { + function renderEvents(events, modifiedEventId) { view.reportEvents(cachedEvents = events); var i, len=events.length, dayEvents=[], @@ -359,14 +359,14 @@ function Agenda(element, options, methods) { slotEvents.push(events[i]); } } - renderDaySegs(compileDaySegs(dayEvents)); - renderSlotSegs(compileSlotSegs(slotEvents)); + renderDaySegs(compileDaySegs(dayEvents), modifiedEventId); + renderSlotSegs(compileSlotSegs(slotEvents), modifiedEventId); } - function rerenderEvents() { + function rerenderEvents(modifiedEventId) { clearEvents(); - renderEvents(cachedEvents); + renderEvents(cachedEvents, modifiedEventId); } @@ -427,7 +427,7 @@ function Agenda(element, options, methods) { // renders 'all-day' events at the top - function renderDaySegs(segs) { + function renderDaySegs(segs, modifiedEventId) { if (options.allDaySlot) { _renderDaySegs( segs, @@ -445,7 +445,8 @@ function Agenda(element, options, methods) { return axisWidth + colContentPositions.right(day2col(dayOfWeek)); }, daySegmentContainer, - bootstrapDayEventHandlers + bindDaySegHandlers, + modifiedEventId ); updateSize(viewWidth, viewHeight); // might have pushed the body down, so resize } @@ -455,7 +456,7 @@ function Agenda(element, options, methods) { // renders events in the 'time slots' at the bottom - function renderSlotSegs(segs) { + function renderSlotSegs(segs, modifiedEventId) { var i, segCnt=segs.length, seg, event, @@ -467,7 +468,7 @@ function Agenda(element, options, methods) { outerWidth, left, html='', - _eventElements, + eventElements, eventElement, triggerRes, vsideCache={}, @@ -527,13 +528,13 @@ function Agenda(element, options, methods) { ""; } slotSegmentContainer[0].innerHTML = html; - _eventElements = $.makeArray(slotSegmentContainer[0].childNodes); // TODO: look at .children() again + eventElements = slotSegmentContainer.children(); // retrieve elements, run through eventRender callback, bind event handlers for (i=0; i" + htmlEscape(event.title) + "" + "" + + ((event.editable || event.editable == undefined && options.editable) && !options.disableResizing && $.fn.resizable ? + "
" + : '') + ""; seg.left = left; seg.outerWidth = right - left; } segmentContainer[0].innerHTML = html; - _eventElements = $.makeArray(segmentContainer[0].childNodes); // TODO: look at .children() again + eventElements = segmentContainer.children(); // retrieve elements, run through eventRender callback, bind handlers for (i=0; i