Added refresh button
This commit is contained in:
parent
bbcf623c63
commit
3c016c8fa0
|
@ -7,6 +7,7 @@ var calendar;
|
||||||
|
|
||||||
function getTable() {
|
function getTable() {
|
||||||
// Send XHR to totalTable
|
// Send XHR to totalTable
|
||||||
|
resultDiv.innerHTML = '';
|
||||||
loadingDiv.style.display = "";
|
loadingDiv.style.display = "";
|
||||||
errorDiv.style.display = "none";
|
errorDiv.style.display = "none";
|
||||||
|
|
||||||
|
@ -27,7 +28,6 @@ function getTable() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function setData(events) {
|
function setData(events) {
|
||||||
console.log(events);
|
|
||||||
loadingDiv.style.display = "none";
|
loadingDiv.style.display = "none";
|
||||||
errorDiv.style.display = "none";
|
errorDiv.style.display = "none";
|
||||||
calendar = new FullCalendar.Calendar(resultDiv, {
|
calendar = new FullCalendar.Calendar(resultDiv, {
|
||||||
|
@ -41,10 +41,18 @@ function setData(events) {
|
||||||
eventClick: function(info) {
|
eventClick: function(info) {
|
||||||
info.jsEvent.preventDefault();
|
info.jsEvent.preventDefault();
|
||||||
},
|
},
|
||||||
|
customButtons: {
|
||||||
|
refreshCalendar: {
|
||||||
|
text: "Refresh",
|
||||||
|
click: function() {
|
||||||
|
getTable();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
header: {
|
header: {
|
||||||
left: 'title',
|
left: 'title',
|
||||||
center: '',
|
center: '',
|
||||||
right: 'month,agendaWeek,agendaDay prev,next today'
|
right: 'refreshCalendar month,agendaWeek,agendaDay prev,next today'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
calendar.render();
|
calendar.render();
|
||||||
|
|
Loading…
Reference in New Issue