School Calendar
Homework Set
')
}
} else if (event.homework_type === "due") {
element.find('.fc-content').append('Date Set: ' + moment(event.setDate).format("DD/MM/YYYY") + '
')
if (element.siblings('fc-hwtitle-due').length === 0) {
element.before('Homework Due
');
}
}
}
}
};
var calRender = function (view) {
calTransitions( false );
// Set the mini calendar to the same date as the full calendar.
if ( $calMini !== false ) { $calMini.fullCalendar( 'gotoDate', view.calendar.getDate() ); }
// Hide the list while the events are loading and being filters.
if ( view.name == 'listMonth' || view.name == 'listWeek' ) {
view.el.hide();
view.el.parent('.fc-view-container').removeClass('ui_card ui_card--void');
$('.content__calendar').addClass('content__calendar--list');
if ( $calMini !== false ) {
$calMini.fullCalendar('render');
}
} else {
view.el.parent('.fc-view-container').addClass('ui_card ui_card--void');
$('.content__calendar').removeClass('content__calendar--list');
}
currentDate = new Date();
viewDate = new Date(view.start);
if (new Date(viewDate.getFullYear(), viewDate.getMonth() + 1).getTime() = new Date(currentDate.getFullYear() + 3, currentDate.getMonth()).getTime()){
$('.fc-next-button').prop('disabled', true);
$('.fc-next-button').css('opacity', 0.5);
} else {
$('.fc-next-button').prop('disabled', false);
$('.fc-next-button').css('opacity', 1);
}
};
var calSwitch = function(cell) {
$calFull.fullCalendar('changeView', 'listMonth');
if ($calMini !== false) $calMini.fullCalendar('gotoDate', cell.date);
objCalSwitchInterval = setInterval(function() {
calSwitchScroll(cell.date);
}, 250);
};
var calSwitchScroll = function (cellDate) {
if (intCalSwitchScrollCount 0) {
clearInterval(objCalSwitchInterval);
calScroll(cellDate);
}
} else {
clearInterval(objCalSwitchInterval);
}
intCalSwitchScrollCount++;
}
var calScroll = function(date) {
var $dateAnchor = $('a[name="' + date.format() + '"]');
if ( $dateAnchor.length > 0 ) {
var intScroll = $dateAnchor.offset().top,
intSpeed;
intSpeed = intScroll - $(document).scrollTop();
if (intSpeed Calendars