From: Jan Schneider Date: Fri, 13 Feb 2009 23:43:58 +0000 (+0100) Subject: Attach mouse effects on event bubbles. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=9ed1f058752a2e3cde91ac6429ddf832abba86eb;p=horde.git Attach mouse effects on event bubbles. --- diff --git a/kronolith/js/src/kronolith.js b/kronolith/js/src/kronolith.js index 242c830ee..6d01f350e 100644 --- a/kronolith/js/src/kronolith.js +++ b/kronolith/js/src/kronolith.js @@ -340,13 +340,7 @@ KronolithCore = { if ($('kronolithView' + locCap)) { $('kronolithView' + locCap).appear(); } - this.updateMinical(date, loc); - $('kronolithBody').select('div.kronolithEvent').each(function(s) { - s.observe('mouseover', s.addClassName.curry('kronolithSelected')); - s.observe('mouseout', s.removeClassName.curry('kronolithSelected')); - }); - this.date = date; break; @@ -513,10 +507,15 @@ KronolithCore = { */ _monthCallback: function(r) { + var div; r = r.response; $H(r.events).each(function(date) { $H(date.value).each(function(event) { - $('kronolithMonthDay' + date.key).insert(new Element('DIV', { 'class': 'kronolithEvent', 'style': 'background-color:' + event.value.bg + ';color:' + event.value.fg }).setText(event.value.t)); + div = new Element('DIV', { 'class': 'kronolithEvent', 'style': 'background-color:' + event.value.bg + ';color:' + event.value.fg }); + div.setText(event.value.t) + .observe('mouseover', div.addClassName.curry('kronolithSelected')) + .observe('mouseout', div.removeClassName.curry('kronolithSelected')); + $('kronolithMonthDay' + date.key).insert(div); }); }); },