From f89e82da68bbbfe246ca67af0e2a3559d34ddaa2 Mon Sep 17 00:00:00 2001 From: Adam Shaw Date: Mon, 25 Jan 2010 23:05:57 -0800 Subject: [PATCH] tweaks, opera bugfix, optimized clearEvents --- src/agenda.js | 7 +++---- src/grid.js | 2 +- src/jquery/jquery-uncompressed.js | 17 ++--------------- src/util.js | 16 +++++++++------- 4 files changed, 15 insertions(+), 27 deletions(-) diff --git a/src/agenda.js b/src/agenda.js index f2d380b..6a4986c 100644 --- a/src/agenda.js +++ b/src/agenda.js @@ -371,9 +371,8 @@ function Agenda(element, options, methods) { function clearEvents() { - $.each(view.eventElements, function() { // TODO: move away from this, empty a container instead - this.remove(); - }); + daySegmentContainer.empty(); + slotSegmentContainer.empty(); view._clearEvents(); // only clears the hashes } @@ -892,7 +891,7 @@ function Agenda(element, options, methods) { td = tr.find('td'), innerDiv = td.find('div'); return Math.max(0, Math.round( - innerDiv.position().top + topCorrect(tr, td) - 1 + slotHeight * ((minutes % slotMinutes) / slotMinutes) + innerDiv.position().top + topCorrect(td) - 1 + slotHeight * ((minutes % slotMinutes) / slotMinutes) )); } diff --git a/src/grid.js b/src/grid.js index 1ef4d71..f5edf15 100644 --- a/src/grid.js +++ b/src/grid.js @@ -604,7 +604,7 @@ function _renderDaySegs(segRows, view, minLeft, maxLeft, getTr, dayContentLeft, innerDiv = td.find('div.fc-day-content div') .css('position', 'relative') .height(''); // this is needed for IE7 to get an accurate position - top = innerDiv.position().top + topCorrect(tr, td); + top = innerDiv.position().top + topCorrect(td); rowContentHeight = 0; for (j=0; j