I want to use jQuery.contextMenu:
http://abeautifulsite.net/blog/2008/09/jquery-context-menu-plugin
In jQuery.fullcalendar
when I right-click on an
I used the Fullcalendar Loading callback: http://arshaw.com/fullcalendar/docs/event_data/loading/
loading: function (bool, view) {
if (bool){
jQuery('#com_jc_msg_saving').fadeIn();
} else {
jQuery('#com_jc_msg_saving').fadeOut();
jQuery.contextMenu({
selector: '.fc-event',//note the selector this will apply context to all events
trigger: 'right',
callback: function(key, options) {
//this is the element that was rightclicked
console.log(options.$trigger.context);
switch(key)
{
case 'edit_event':
break;
case 'del_event':
break;
case 'add_event':
break;
}
},
items: {
'edit_event': {name: 'Edit'},
'del_event': {name: 'Delete'},
'add_event': {name: 'Create'},
}
});
}
},
The thing is that you will need to get the event id from that element - what I did was use the className in the events json data. The just a bit of a string replace and you will have your id.
'className' => 'jc_event_' . $event->id,