From: Michael J. Rubinsky Date: Tue, 16 Nov 2010 14:34:08 +0000 (-0500) Subject: Keep poking away at some phpdoc X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=fc20daf3a76d1270f4d7271b0b22978dff2f7356;p=horde.git Keep poking away at some phpdoc --- diff --git a/kronolith/js/mobile.js b/kronolith/js/mobile.js index e2f1c11e9..edf8d3698 100644 --- a/kronolith/js/mobile.js +++ b/kronolith/js/mobile.js @@ -17,7 +17,7 @@ calendars: [], loadedCalendars: [], events: [], - + /** * Perform an Ajax action * @@ -30,6 +30,13 @@ $.post(Kronolith.conf.URI_AJAX + action, params, callback, 'json'); }, + /** + * Load all events between start and end time. Returns short version of + * event info. + * + * @param Date start + * @param Date end + */ loadEvents: function(start, end) { KronolithMobile.loadedCalendars = []; @@ -47,6 +54,9 @@ } }, + /** + * Used as sorting funtion to Array.sort for sorting events by start time + */ sortEvents: function(events) { return events.sort(function(a, b) { @@ -57,7 +67,11 @@ }, /** - * Callback for the listEvents AJAX request. + * Callback for the listEvents AJAX request. For now, assume we are in + * day view, wait for all calendar responses to be received and then build + * the event elements in the listview. + * + * @param object data The ajax response. */ listEventsCallback: function(data) { @@ -72,6 +86,7 @@ }); }); } + if (KronolithMobile.loadedCalendars.length == KronolithMobile.calendars.length) { var events = KronolithMobile.sortEvents(KronolithMobile.events); list = $('