Rahiman / jmonthcalendar

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

Fix for onEventDropped #10

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Set dragableEvents: true
2. Create onEventDropped block
3. Inside this block, do an alert("EventID=" + event.EventID);

What is the expected output? What do you see instead?
Should show event number but get an error "event is undefined"

What version of the product are you using? On what operating system?
1.22 jMonthCalendar, jQuery 1.3.2, WinXP

Please provide any additional information below.
Like with my previous defect report, I am no expert but this is what I did
to fix the issue:

In jMonthCalendar.js, changed:
if (this.EventID == ui.draggable.attr("id")) {

to this
if ("Event_" + this.EventID == ui.draggable.attr("id")) {

Afterwards, alert(event.EventID) gave me the correct value and no error. 
This was the expected result and is consistant with onEventLinkClick

Original issue reported on code.google.com by aiden.so...@gmail.com on 12 Jun 2009 at 12:16

GoogleCodeExporter commented 8 years ago
I changed this in the next release.  Instead of accessing the node's ID I am 
storing
the actual EventID onto the node as an attribute.  The the dropable box can 
reference
the node attribute directly.

Original comment by k.leneau@gmail.com on 15 Jun 2009 at 4:12