My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 1062: Only fetch event source once (even if it has been added twice)
3 people starred this issue and may be notified of changes. Back to list
Status:  WontFix
Owner:  ----
Closed:  Aug 2013


Sign in to add a comment
 
Reported by atom...@gmail.com, Aug 1, 2011
Okay, so I wanted to change the data thats sent in the POST of the AJAX request, that fetches the json data... so I did this:

var events_source = {
	url: "ajax.php?file=calendar_events_json",
	type: "GET",
	data: {
		variable_data: 'blah blah foo bar lol'
	}
};


$('#calendar').fullCalendar({..., events: events_source, ...});


When I want to change variable_data, the only way I could manage it was by doing this:


function do_something() {
  events_source.data.variable_data = 'something';
  $('#calendar').fullCalendar('removeEventSource', events_source);
  $('#calendar').fullCalendar('addEventSource', events_source);
}


The problem is when do_something() is called twice within about 1 second. It seems that the addEventSource is getting the data via AJAX twice, and showing duplicate data. Not sure how I can fix this.
Aug 21, 2011
Project Member #1 adamrs...@gmail.com
got it, thanks.

btw, i might come up with an easier way of having dynamic parameters.

(changed the issue's name b/c it is related to underlying event-fetching mechanisms)
Summary: Only fetch event source once (even if it has been added twice)
Status: Maybe
Sep 8, 2011
#2 atom...@gmail.com
Okay thanks! Hopefully you fully understand what I was doing.
The real world example of this, is that I had a "Filter by Event Type" dropdown. When dropdown is changed, tell fullCalendar to refetch that month's events via JSON.
Oct 9, 2011
#3 dangdi...@gmail.com
yea...I need to post to server by eventsource,however the param is static after initialed.I tried long... well,it's really a big issue!hope could be fixed for it's really enhancable func!
Aug 13, 2013
Project Member #4 adamrs...@gmail.com
(No comment was entered for this change.)
Status: Discussing
Labels: -Type-Defect Type-BehaviorMod
Aug 14, 2013
Project Member #5 adamrs...@gmail.com
I think a better solution is to solve the issue presented in  issue 878 , rather than make some special case for this removeEventSource/addEventSource
Status: WontFix
Labels: -Type-BehaviorMod Type-Behavior
Sign in to add a comment

Powered by Google Project Hosting