You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.1 KiB
JavaScript
37 lines
1.1 KiB
JavaScript
$(document).ready(function() {
|
|
$('#calendar').fullCalendar({
|
|
header: {
|
|
left: 'prev,next today',
|
|
center: 'title',
|
|
right: 'month,agendaWeek,agendaDay'
|
|
},
|
|
editable: true,
|
|
eventLimit: true,
|
|
events: function(start, end, timezone, callback) {
|
|
console.log('in events');
|
|
$.ajax({
|
|
url: getHelpdeskUrl() + '/internal-api/admin/calendar/?start=' + start + '&end=' + end,
|
|
method: 'GET',
|
|
dataType: 'json',
|
|
success: function(data) {
|
|
console.info(data);
|
|
//callback w/events here!
|
|
},
|
|
error: function(data) {
|
|
console.error(data);
|
|
}
|
|
});
|
|
},
|
|
dayClick: function(date, jsEvent, view) {
|
|
displayCreateModal(date);
|
|
$('#create-event-modal').modal('show');
|
|
console.log(date);
|
|
console.info(jsEvent);
|
|
console.warn(view);
|
|
}
|
|
});
|
|
});
|
|
|
|
function displayCreateModal(date) {
|
|
$('#create-event-modal')
|
|
} |