From: Jan Schneider Date: Mon, 12 Apr 2010 14:28:12 +0000 (+0200) Subject: Only show up to 3 events in all-day row of week view, and link to day view, where... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=9e6d310d9e7859172ab7582bc1591625db524ed0;p=horde.git Only show up to 3 events in all-day row of week view, and link to day view, where the all-day events are floating now. --- diff --git a/kronolith/js/kronolith.js b/kronolith/js/kronolith.js index c75f9d88d..3b56d11f2 100644 --- a/kronolith/js/kronolith.js +++ b/kronolith/js/kronolith.js @@ -1306,7 +1306,7 @@ KronolithCore = { .select('.kronolithEvent') .invoke('remove'); $('kronolithAllDay' + date) - .select('.kronolithEvent') + .childElements() .invoke('remove'); } break; @@ -1516,7 +1516,15 @@ KronolithCore = { if (view == 'day') { $('kronolithViewDay').down('.kronolithAllDayContainer').insert(div.setStyle(style)); } else { - $('kronolithAllDay' + date).insert(div.setStyle(style)); + var existing = $('kronolithAllDay' + date).select('div'); + if (existing.size() == 3) { + if (existing[2].className != 'kronolithMore') { + existing[2].remove(); + $('kronolithAllDay' + date).insert({ bottom: new Element('span', { className: 'kronolithMore' }).store('date', date).insert(Kronolith.text.more) }); + } + } else { + $('kronolithAllDay' + date).insert(div.setStyle(style)); + } } break; } diff --git a/kronolith/themes/screen.css b/kronolith/themes/screen.css index 49aeca93d..22ec40661 100644 --- a/kronolith/themes/screen.css +++ b/kronolith/themes/screen.css @@ -1371,6 +1371,13 @@ div.kronolithEvent { -webkit-border-radius: 4px; border-radius: 4px; } +#kronolithViewDay .kronolithAllDay div.kronolithEvent, +#kronolithViewWeek .kronolithAllDay div.kronolithEvent { + white-space: nowrap; +} +#kronolithViewDay .kronolithAllDay div.kronolithEvent { + float: left; +} div.kronolithEvent .kronolithDragger { position: absolute; visibility: hidden;