raw/ace/mustache/app/views/assets/scripts/calendar.js
function(date, allDay) { // this function is called when something is dropped
		
			// retrieve the dropped element's stored Event Object
			var originalEventObject = $(this).data('eventObject');
			var $extraEventClass = $(this).attr('data-class');
			
			
			// we need to copy it, so that multiple events don't have a reference to the same object
			var copiedEventObject = $.extend({}, originalEventObject);
			
			// assign it the date that was reported
			copiedEventObject.start = date;
			copiedEventObject.allDay = allDay;
			if($extraEventClass) copiedEventObject['className'] = [$extraEventClass];
			
			// render the event on the calendar
			// the last `true` argument determines if the event "sticks" (http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/)
			$('#calendar').fullCalendar('renderEvent', copiedEventObject, true);
			
			// is the "remove after drop" checkbox checked?
			if ($('#drop-remove').is(':checked')) {
				// if so, remove the element from the "Draggable Events" list
				$(this).remove();
			}
			
		}
function(date, allDay) { // this function is called when something is dropped
		
			// retrieve the dropped element's stored Event Object
			var originalEventObject = $(this).data('eventObject');
			var $extraEventClass = $(this).attr('data-class');
			
			
			// we need to copy it, so that multiple events don't have a reference to the same object
			var copiedEventObject = $.extend({}, originalEventObject);
			
			// assign it the date that was reported
			copiedEventObject.start = date;
			copiedEventObject.allDay = allDay;
			if($extraEventClass) copiedEventObject['className'] = [$extraEventClass];
			
			// render the event on the calendar
			// the last `true` argument determines if the event "sticks" (http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/)
			$('#calendar').fullCalendar('renderEvent', copiedEventObject, true);
			
			// is the "remove after drop" checkbox checked?
			if ($('#drop-remove').is(':checked')) {
				// if so, remove the element from the "Draggable Events" list
				$(this).remove();
			}
			
		}
function ( date , allDay ) { // this function is called when something is dropped // retrieve the dropped element's stored Event Object var originalEventObject = $ ( this ) . data ( 'eventObject' ) ; var $extraEventClass = $ ( this ) . attr ( 'data-class' ) ; // we need to copy it, so that multiple events don't have a reference to the same object var copiedEventObject = $ . extend ( { } , originalEventObject ) ; // assign it the date that was reported copiedEventObject . start = date ; copiedEventObject . allDay = allDay ; if ( $extraEventClass ) copiedEventObject [ 'className' ] = [ $extraEventClass ] ; // render the event on the calendar // the last `true` argument determines if the event "sticks" (http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/) $ ( '#calendar' ) . fullCalendar ( 'renderEvent' , copiedEventObject , true ) ; // is the "remove after drop" checkbox checked? if ( $ ( '#drop-remove' ) . is ( ':checked' ) ) { // if so, remove the element from the "Draggable Events" list $ ( this ) . remove ( ) ; } }
this allows things to be dropped onto the calendar !!!
this allows things to be dropped onto the calendar !!!