From 86202d64f03b360a7eddc2af029ab238f5e6d675 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Sat, 7 Nov 2009 12:09:26 -0500 Subject: [PATCH] Revert "Avoid key collisions when a listTimeObjects provider can export the same timeObject category" This reverts commit 202eb693c2a77b366c59528044707adefde92564. --- kronolith/js/kronolith.js | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/kronolith/js/kronolith.js b/kronolith/js/kronolith.js index d9a988f15..d3e093e64 100644 --- a/kronolith/js/kronolith.js +++ b/kronolith/js/kronolith.js @@ -761,10 +761,7 @@ KronolithCore = { if (typeof ext[api[0]] == 'undefined') { ext[api[0]] = {}; } - if (typeof ext[api[0]][api[1]] == 'undefined') { - ext[api[0]][api[1]] = []; - } - ext[api[0]][api[1]].push(cal.value); + ext[api[0]][api[1]] = cal.value; extNames[api[0]] = cal.value.api; }); $H(ext).each(function(api) { @@ -774,16 +771,13 @@ KronolithCore = { .update('+')) .insert({ bottom: extNames[api.key].escapeHTML() })) .insert(new Element('DIV', { 'id': 'kronolithExternalCalendar' + api.key, 'class': 'kronolithCalendars' })); - $H(api.value).each(function(cals) { - for (var i = 0; i < cals.value.length; i++) { - var cal = cals.value[i]; - $('kronolithExternalCalendar' + api.key) - .insert(new Element('DIV', { 'class': cal.show ? 'kronolithCalOn' : 'kronolithCalOff' }) - .store('calendar', api.key + '/' + cal.key) - .store('calendarclass', 'external') - .setStyle({ backgroundColor: cal.bg, color: cal.fg }) - .update(cal.name.escapeHTML())); - } + $H(api.value).each(function(cal) { + $('kronolithExternalCalendar' + api.key) + .insert(new Element('DIV', { 'class': cal.value.show ? 'kronolithCalOn' : 'kronolithCalOff' }) + .store('calendar', api.key + '/' + cal.key) + .store('calendarclass', 'external') + .setStyle({ backgroundColor: cal.value.bg, color: cal.value.fg }) + .update(cal.value.name.escapeHTML())); }); }); -- 2.11.0