From: Michael J. Rubinsky Date: Sun, 14 Nov 2010 23:42:44 +0000 (-0500) Subject: First stab at including all selected calendars, still need to sort X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=a3c15b028e98ee1ecc33bacc88248a39c67a3465;p=horde.git First stab at including all selected calendars, still need to sort --- diff --git a/kronolith/js/kronolithmobile.js b/kronolith/js/kronolithmobile.js index 30a1ba3af..f6de9c5c0 100644 --- a/kronolith/js/kronolithmobile.js +++ b/kronolith/js/kronolithmobile.js @@ -10,6 +10,10 @@ */ KronolithMobile = { + calendars: [], + loadedCalendars: [], + events: [], + /** * Perform an Ajax action * @@ -22,6 +26,23 @@ $.post(Kronolith.conf.URI_AJAX + action, params, callback, 'json'); }, + loadEvents: function(start, end) + { + KronolithMobile.loadedCalendars = []; + KronolithMobile.events = []; + for (cal in KronolithMobile.calendars) { + cal = KronolithMobile.calendars[cal]; + KronolithMobile.doAction('listEvents', + { + 'start': start.toString('yyyyMMdd'), + 'end': end.toString("yyyyMMdd"), + 'cal': cal[0] + '|' + cal[1] + }, + KronolithMobile.listEventsCallback + ); + } + }, + /** * Callback for the listEvents AJAX request. */ @@ -30,21 +51,25 @@ var list; data = data.response; - $("#dayview [data-role=content] ul").detach(); - $(".kronolithDayDate").html(KronolithMobile.currentDate.toString(Kronolith.conf.date_format)); - - list = $('