Only build the overview once. Still need to add lazy loading onscroll etc...
authorMichael J. Rubinsky <mrubinsk@horde.org>
Fri, 3 Dec 2010 05:41:33 +0000 (00:41 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Fri, 3 Dec 2010 05:48:52 +0000 (00:48 -0500)
kronolith/js/mobile.js

index c91b115..13dc9da 100644 (file)
     date: null,
 
     /**
+     * Temporary fix for pages not firing pagebeforecreate events properly
+     */
+    haveOverview: false,
+
+    /**
      * Load all events between start and end time.
      *
      * @param Date firstDay
         // 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) {