Calendar & Events

Download 2018-2019 School Year Calendar

 

NUSD_SY = {
// nusd school year
googleCalendarId: ‘[email protected]le.com’,
color: ‘#616dcd’,
calName: ‘Academic’,
textColor: ‘white’
};
DO = {
// district events
googleCalendarId: ‘[email protected]le.com’,
color: ‘#bb7154’,
calName: ‘NUSD’,
textColor: ‘white’,
borderColor: ‘black’
};
LINC = {
// lincoln
googleCalendarId: ‘[email protected]le.com’,
color: ‘#4dad91’,
calName: ‘Lincoln’,
textColor: ‘white’,
borderColor: ‘black’
};
jQuery(function($) {
$(document).ready(function() {
$(‘#fullcalendar_div’).fullCalendar({
defaultView: ‘month’,
aspectRatio: 1.605,
googleCalendarApiKey: ‘AIzaSyA9IXXOImrt9u4ZOKWLKACIrsiiljTatRY’,
eventSources: [
NUSD_SY,
DO,
LINC
],
eventRender: function(event, element) {
if(event.source.calName)
{
if(!event.title.startsWith(event.source.calName))
{
newTitle = “” + event.source.calName + “ – ” + event.title;
element[0].innerHTML = element[0].innerHTML.replace(event.title,newTitle);
}
else {
newTitle = “” + event.source.calName + “ – ” + event.title.replace(event.source.calName,”);
element[0].innerHTML = element[0].innerHTML.replace(event.title,newTitle);
}
}
else {
newTitle = event.title;
}
// build qtip content
var qtipContent = ‘‘ + newTitle + ‘‘;
event.description ? qtipContent += ”
” + event.description : false;
element.qtip({
content: qtipContent
});
}
});
});
$(“.toggle_calendar”).change(function() {
if(this.checked) {
// add event source
console.log(‘adding ‘ + this.id);
$(‘#fullcalendar_div’).fullCalendar(‘addEventSource’, eval(this.id));
$(‘#fullcalendar_div’).fullCalendar(‘refetchEvents’);
}
else {
// remove event source
console.log(‘removing ‘ + this.id);
$(‘#fullcalendar_div’).fullCalendar(‘removeEventSource’, eval(this.id));
$(‘#fullcalendar_div’).fullCalendar(‘refetchEvents’);
}
});
});