Files
crm-ms1/inc/popupevent_script_list.php
2026-05-27 11:44:10 -04:00

65 lines
1.3 KiB
PHP

$('.popup').on('click', function(event, element) {
// Display the modal and set the values to the event values.
var section = $(this).data('section');
var section_id = $(this).data('section_id')
var section = $(this).data('section')
var id = $(this).data('id')
$.ajax({
url: '<?=base_url()?>index.php/projets/form_tache/'+id+'/'+section+'/'+section_id+'/list' ,
type: 'get',
dataType: 'json',
success: function(responseData){
$('#tacheform').html(responseData) ;
}
});
$('#myModal').modal('show');
var section = $(this).data('section');
var id = $(this).data('id');
// $('.modal').find('#title').val(event.title);
// $('.modal').find('#starts-at').val(event.start);
// $('.modal').find('#ends-at').val(event.end);
}
);
// Bind the dates to datetimepicker.
// You should pass the options you need
$("#starts-at, #ends-at").datetimepicker();
// Whenever the user clicks on the "save" button om the dialog
$('#save-event').on('click', function() {
var title = $('#title').val();
if (title) {
var eventData = {
title: title,
start: $('#starts-at').val(),
end: $('#ends-at').val()
};
$('#calendar').fullCalendar('renderEvent', eventData, true); // stick? = true
}
$('#calendar').fullCalendar('unselect');
// Clear modal inputs
$('.modal').find('input').val('');
// hide modal
$('.modal').modal('hide');
});