/* Event-rendering methods for the TimeGrid class ----------------------------------------------------------------------------------------------------------------------*/ $.extend(TimeGrid.prototype, { segs: null, // segment objects rendered in the component. null of events haven't been rendered yet eventSkeletonEl: null, // has cells with event-containers, which contain absolutely positioned event elements // Renders the events onto the grid and returns an array of segments that have been rendered renderEvents: function(events) { var res = this.renderEventTable(events); this.eventSkeletonEl = $('
').append(res.tableEl); this.el.append(this.eventSkeletonEl); this.segs = res.segs; }, // Retrieves rendered segment objects getSegs: function() { return this.segs || []; }, // Removes all event segment elements from the view destroyEvents: function() { Grid.prototype.destroyEvents.call(this); // call the super-method if (this.eventSkeletonEl) { this.eventSkeletonEl.remove(); this.eventSkeletonEl = null; } this.segs = null; }, // Renders and returns the