My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 176: I am giving up!
1 person starred this issue and may be notified of changes. Back to list
Status:  Done
Owner:  ----
Closed:  Nov 2009


Sign in to add a comment
 
Reported by krassm...@gmail.com, Nov 10, 2009
Sorry to mess with u guys again, but I have been struggling for almost one 
day now, and my calender is almost there!

I have one more thing to do, and that is to update a "title" that the user 
has clicked on. I have tried to implement:

events: function(start, end, callback) {...} 

but I dont know how to get the calender to execute this function?

Anyone, got a working sample?

Best regards, Joakim
Nov 10, 2009
Project Member #1 adamrs...@gmail.com
what do you mean by a "title that the user has clicked on" ? can you elaborate a bit?
thanks
Nov 10, 2009
#2 krassm...@gmail.com
Sorry, I was a little bit tired.

1. I am picking up the event id with ajax within the "eventClick" function.

2. After that, I display a modalwindow with more information, and saves the data 
back to the database with ajax.

3. I close my modalwindow.

After that I have no reference to the item in the calender. Is there a better 
approach? I attached the script to this post as well.

Thanks, Joakim


javascript.txt
5.8 KB   View   Download
Nov 26, 2009
Project Member #3 adamrs...@gmail.com
hi, sorry about the wait. in the click handler, i would save the reference to the
calevent object into a global variable. something like this:

var currentEvent;

$('#calendar).fullCalendar({
   eventClick: function(calEvent) {
      currentEvent = calEvent;
      // open the dialog...
   }
});

// and when the dialog is closed...
currentEvent.title = "new title";
$('#calendar').fullCalendar('updateEvent', currentEvent);

i'm closing the issue, but please respond to this thread if any more
problems/questions. thanks. good luck
Status: Done
Sign in to add a comment

Powered by Google Project Hosting