joshiut / jmonthcalendar

Automatically exported from code.google.com/p/jmonthcalendar
Other
0 stars 0 forks source link

Events should also return the element that raised them? #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
For example, onEventLinkClick should also return the element it's contained
in.  I.e. to put a qTip box right next to the link when you click it, to
show more information about the event.

There might already be a way to do this with jMonthly, but this is what I
had to change and thought it might make a good global change.

All of these events, in my version, now also pass back the element:
            onEventLinkClick: function(element, event) { return true; },
            onEventBlockClick: function(element, event) { return true; },
            onEventBlockOver: function(element, event) { return true; },
            onEventBlockOut: function(element, event) { return true; },

Original issue reported on code.google.com by insolen...@gmail.com on 21 Jul 2009 at 11:42

GoogleCodeExporter commented 9 years ago
Err, I might have been confusing.  I mean, the actual event (not the element!) 
should
be passed to the callback, along with the Calendar Event information.

like...

link.click(function(e) { defaults.onEventLinkClick(e, event); 
e.stopPropagation();    });

The mouse click event info "e" is passed to onEventLinkClick too :)

Original comment by insolen...@gmail.com on 21 Jul 2009 at 11:45

GoogleCodeExporter commented 9 years ago
I have this is a next version, instead of just calling extension methods at the 
right
time I am binding those methods to clicks using jQuery.Bind. This will return an
object that contains the original dom event along with the calendar event 
object in
it's data structure.

Original comment by k.leneau@gmail.com on 23 Jul 2009 at 3:20

GoogleCodeExporter commented 9 years ago
Sounds good, thanks for all the work/quick reply :)

Original comment by insolen...@gmail.com on 24 Jul 2009 at 7:45

GoogleCodeExporter commented 9 years ago

Original comment by k.leneau@gmail.com on 12 Aug 2009 at 7:30