From 4cc8044ecdcecb79d881604b426e496053de3865 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Sun, 14 Nov 2010 18:46:38 -0500 Subject: [PATCH] sill me, use jquery's $.each() method here --- kronolith/js/kronolithmobile.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) 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) -- 2.11.0