src/render.js
function(eventData) {

    var firstEventStart = moment(eventData[0].start)
    var firstEventEnd = moment(eventData[0].end)
    var firstEventDuration = firstEventEnd.diff(firstEventStart, 'minutes')

    if (firstEventDuration <= 90) {
      calendarTarget.fullCalendar('option', 'slotDuration', '00:15:00')
    }

    calendarTarget.fullCalendar('addEventSource', {
      events: eventData
    });

    calendarTarget.removeClass('empty-calendar');

    // Go to first event if enabled
    goToFirstEvent(eventData[0].start);

  }
function(eventData) {

    var firstEventStart = moment(eventData[0].start)
    var firstEventEnd = moment(eventData[0].end)
    var firstEventDuration = firstEventEnd.diff(firstEventStart, 'minutes')

    if (firstEventDuration <= 90) {
      calendarTarget.fullCalendar('option', 'slotDuration', '00:15:00')
    }

    calendarTarget.fullCalendar('addEventSource', {
      events: eventData
    });

    calendarTarget.removeClass('empty-calendar');

    // Go to first event if enabled
    goToFirstEvent(eventData[0].start);

  }
function ( eventData ) { var firstEventStart = moment ( eventData [ 0 ] . start ) var firstEventEnd = moment ( eventData [ 0 ] . end ) var firstEventDuration = firstEventEnd . diff ( firstEventStart , 'minutes' ) if ( firstEventDuration <= 90 ) { calendarTarget . fullCalendar ( 'option' , 'slotDuration' , '00:15:00' ) } calendarTarget . fullCalendar ( 'addEventSource' , { events : eventData } ) ; calendarTarget . removeClass ( 'empty-calendar' ) ; // Go to first event if enabled goToFirstEvent ( eventData [ 0 ] . start ) ; }
Render the supplied calendar events in FullCalendar
Render the supplied calendar events in FullCalendar