From fe26f943d21083f012be7f8826a3f1c8151e91bf Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Fri, 3 Dec 2010 00:41:33 -0500 Subject: [PATCH] Only build the overview once. Still need to add lazy loading onscroll etc... --- kronolith/js/mobile.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/kronolith/js/mobile.js b/kronolith/js/mobile.js index c91b11541..13dc9da2a 100644 --- a/kronolith/js/mobile.js +++ b/kronolith/js/mobile.js @@ -42,6 +42,11 @@ date: null, /** + * Temporary fix for pages not firing pagebeforecreate events properly + */ + haveOverview: false, + + /** * Load all events between start and end time. * * @param Date firstDay @@ -755,8 +760,10 @@ // Set up overview $('#overview').bind('pageshow', function(event, ui) { KronolithMobile.view = 'overview'; - KronolithMobile.clearView('overview'); - KronolithMobile.loadEvents(KronolithMobile.date, KronolithMobile.date.clone().addDays(7), 'overview'); + if (!haveOverView) { + KronolithMobile.clearView('overview'); + KronolithMobile.loadEvents(KronolithMobile.date, KronolithMobile.date.clone().addDays(7), 'overview'); + } }); $('td').live('click', function(e) { -- 2.11.0