update
This commit is contained in:
67
inc/popupevent_script.php
Normal file
67
inc/popupevent_script.php
Normal file
@ -0,0 +1,67 @@
|
||||
|
||||
|
||||
|
||||
$('.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')
|
||||
var section_type = $(this).data('section_type')
|
||||
var details_id = $(this).data('details_id')
|
||||
$.ajax({
|
||||
url: '<?=base_url()?>index.php/projets/form_tache/'+id+'/'+section+'/'+section_id+'/<?php echo $page;?>/'+section_type+'/'+details_id ,
|
||||
type: 'get',
|
||||
dataType: 'json',
|
||||
success: function(responseData){
|
||||
|
||||
|
||||
$('#tacheform').html(responseData) ;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$('#myModal').modal('show');
|
||||
var section = $(this).data('section');
|
||||
var id = $(this).data('id');
|
||||
var section_type = $(this).data('section_type');
|
||||
|
||||
var details_id = $(this).data('details_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');
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user