Fullcalendar não dá Refresh na tela após update

0 respostas
php
A

Pessoal, tenho um fullcalendar que quando faço uma alteração ele não dá o refresh na tela. Alguém pode ajudar ?

segue parte do o código:

// Quando der duplo clique vai abrir o modal de alteração (update_cal.php)

eventRender: function (event, element) {

element.bind(‘dblclick’, function () {

$(’#ModalEdit #event_id’).val(<a href="http://event.id">event.id</a>);

$(’#ModalEdit #id’).val(<a href="http://event.id">event.id</a>);

$(’#ModalEdit #title’).val(event.title);

$(’#ModalEdit #start’).val(moment(event.start).format(‘DD/MM/YYYY HH:mm:ss’));

$(’#ModalEdit #end’).val(moment(event.end).format(‘DD/MM/YYYY HH:mm:ss’));

$(’#ModalEdit #color’).val(event.color);

$(’#ModalEdit #obs’).val(event.obs);

$(’#ModalEdit’).modal(‘show’);

});

},

aqui a parte do ajax.

$.ajax({

url: this.action,

type: this.method,

data: array + &SendPostForm=’,

dataType: ‘json’,

success: function (response) {

if (response.status === ‘OK’) {

$(’#ModalEdit’).modal(‘hide’);

$(’#calendar’).fullCalendar(‘removeEvents’, function (event) {

return <a href="http://event.id">event.id</a> === $("#editEvent #event_id").val();

});

$("#calendar").fullCalendar(‘addEventSource’, response.data);

$("#editEvent").trigger(“reset”);

alert(response.text +  ===>  + &SendPostForm=’);

} else if (response.status === ‘Error’) {

alert(response.text +  ==>  + &SendPostForm=’);

} else {

alert(‘Ocorreu um erro, tente novamente.’ +  =>  + &SendPostForm=’);

}

}

});
Criado 9 de março de 2018
Respostas 0
Participantes 1