From: Michael J. Rubinsky Date: Sun, 14 Nov 2010 23:46:38 +0000 (-0500) Subject: sill me, use jquery's $.each() method here X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=4cc8044ecdcecb79d881604b426e496053de3865;p=horde.git sill me, use jquery's $.each() method here --- diff --git a/kronolith/js/kronolithmobile.js b/kronolith/js/kronolithmobile.js index f6de9c5c0..d54b436a1 100644 --- a/kronolith/js/kronolithmobile.js +++ b/kronolith/js/kronolithmobile.js @@ -285,14 +285,16 @@ onDocumentReady: function() { + // Build list of calendars we want. KronolithMobile.calendars = []; - for (var key in Kronolith.conf.calendars) { - for (var cal in Kronolith.conf.calendars[key]) { - if (Kronolith.conf.calendars[key][cal].show) { - KronolithMobile.calendars.push([key, cal]); - } - } - } + $.each(Kronolith.conf.calendars, function(key, value) { + $.each(value, function(cal, info) { + if (info.show) { + KronolithMobile.calendars.push([key, cal]); + } + }); + }); + // Global ajax options. $.ajaxSetup({ dataFilter: function(data, type)