function DayEventRenderer() { var t = this; // exports t.renderDaySegs = renderDaySegs; t.resizableDayEvent = resizableDayEvent; // imports var opt = t.opt; var trigger = t.trigger; var reportEventElement = t.reportEventElement; var showEvents = t.showEvents; var hideEvents = t.hideEvents; var eventResize = t.eventResize; var getRowCnt = t.getRowCnt; var getColCnt = t.getColCnt; var getColWidth = t.getColWidth; var allDayTR = t.allDayTR; var allDayBounds = t.allDayBounds; var colContentLeft = t.colContentLeft; var colContentRight = t.colContentRight; var dayOfWeekCol = t.dayOfWeekCol; var getDaySegmentContainer = t.getDaySegmentContainer; var bindDaySeg = t.bindDaySeg; //TODO: streamline this var formatDates = t.calendar.formatDates; /* Rendering -----------------------------------------------------------------------------*/ function renderDaySegs(segs, modifiedEventId) { var rtl=opt('isRTL'), i, segCnt=segs.length, seg, event, className, left, right, html='', eventElements, eventElement, triggerRes, hsideCache={}, vmarginCache={}, key, val, rowI, top, levelI, levelHeight, rowDivs=[], rowDivTops=[], bounds = allDayBounds(), minLeft = bounds.left, maxLeft = bounds.right, rowCnt = getRowCnt(), colCnt = getColCnt(), segmentContainer = getDaySegmentContainer(); // calculate desired position/dimensions, create html for (i=0; i" + "" + (!event.allDay && seg.isStart ? "" + htmlEscape(formatDates(event.start, event.end, opt('timeFormat'))) + "" :'') + "" + htmlEscape(event.title) + "" + "" + ((event.editable || event.editable === undefined && opt('editable')) && !opt('disableResizing') && $.fn.resizable ? "
" : '') + ""; seg.left = left; seg.outerWidth = right - left; } segmentContainer[0].innerHTML = html; // faster than html() eventElements = segmentContainer.children(); // retrieve elements, run through eventRender callback, bind handlers for (i=0; i div') // optimal selector? .height(top + levelHeight); } // calculate row tops for (rowI=0; rowI