30 lines
641 B
JavaScript
Vendored
30 lines
641 B
JavaScript
Vendored
$(document).ready(function() {
|
|
|
|
$('#tab_progetti').DataTable({
|
|
responsive: true
|
|
fields: [
|
|
{
|
|
label:"Data",
|
|
type: "datetime"
|
|
}
|
|
]
|
|
});
|
|
});
|
|
|
|
$(document).on('click', '.open_modal_new', function() {
|
|
// var riga_id = $(this).val();
|
|
console.log('cliccato');
|
|
$('#form').find('input[type="text"], textarea, input[type="number"],input[type="date"]').val("");
|
|
$('#myModal_new').modal('show');
|
|
$('#form_new').attr('action', 'progetti/new');
|
|
});
|
|
|
|
$.getJSON("progetti/coordinatori", {}, function(data) {
|
|
$.each(data, function(i, item) {
|
|
$("select[name='coordinatore']").append(
|
|
new Option(item.name, item.id)
|
|
)
|
|
}
|
|
);
|
|
});
|