| Issue 221: | bug immediately removing event source after adding, leaves events | |
| 1 person starred this issue and may be notified of changes. | Back to list |
[also posted on JQuery google group, couldn't find one for this specifically]
I am trying to reference the event source that I have added via a
function. I have the following function, when I addEventSource the
new events are added to the calendar. But i can't seem to get the
correct reference to removeEventSource. As you see i create a var
source3 (which executes successfully), then I add to the event object
and it appears on calendar, but it does not get removed.
I figure I must not be using the correct reference. Any ideas?
source3 = function(start, end, callback) {
$.ajax({
type: 'POST',
url: newUrl,
data: str,
success: function(respData){
eventArray = respData;
callback(eventArray);
}
});
};
$('#calendar').fullCalendar('addEventSource', source3);
$('#calendar').fullCalendar('removeEventSource', source3);
Dec 4, 2009
Project Member
#1
adamrs...@gmail.com
Dec 4, 2009
Well yes the ajax wasn't working so i switched to getJSON ajax method, which works.
[Sorry that was an unfinished method that i happened to copy/paste. The current one
is below]. However, I still can't remove the source.
Anyway, is this the correct reference to add then remove source? If not, could you
provide an example that uses a function. Thank you! I appreciate the reply.
source3 = function(start, end, callback)
{
//alert(" data fetched from "+start+" till "+end);
$.getJSON("/msasProject/portlet/MSCalendar/loadEvents.do",
{
start: start.getTime(),
end: end.getTime()
},
function(calevents)
{
eventJSON = calevents;
callback(eventJSON);
}
);
}
$('#calendar').fullCalendar('addEventSource', source3);
$('#calendar').fullCalendar('removeEventSource', source3);
Dec 4, 2009
btw - in the example above, just to confirm, the addEventSource is adding events successfully to the calendar. It just isn't removing.
Dec 9, 2009
hi kozefx, you are right, i have reproduced this situation, it is a bug. it is happening b/c the removeEventSource is so soon after the addEventSource. if you have the removeEventSource triggered by something that is not immediately after (like a user's click), you wont have a problem. this is a legit bug and i will get it fixed in the next minor release. thanks for the report!
Summary:
bug immediately removing event source after adding, leaves events
Status: Accepted
Dec 22, 2009
ok, this should be fixed in 1.4.3 (just released) thanks a lot for your help
Status:
Fixed
Aug 13, 2013
(No comment was entered for this change.)
Status:
Implemented
Aug 13, 2013
(No comment was entered for this change.)
Status:
Released
|
|
| ► Sign in to add a comment |