Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 

169 righe
6.8 KiB

<?php ?>
<script src="<?= BASE_HTTP ?>assets/js/jquery/jquery-min.js" type="text/javascript"></script>
<script src="<?= BASE_HTTP ?>assets/js/jquery/jquery-ui.min.js" type="text/javascript"></script>
<script src="<?= BASE_HTTP ?>assets/js/risorselocali/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="<?= BASE_HTTP ?>assets/js/risorselocali/dataTables.bootstrap4.min.js" type="text/javascript"></script>
<script src="<?= BASE_HTTP ?>assets/js/risorselocali/popper.min.js" type="text/javascript"></script>
<? if (UNICO_JS_CSS) { ?>
<script src="<?= BASE_HTTP ?>assets/js/SiparsApi.js" type="text/javascript"></script>
<? } ?>
<script type="text/javascript">
<? if (!UNICO_JS_CSS) { ?>
function require(script) {
$.ajax({
url: script,
dataType: "script",
async: false, // <-- This is the key
success: function () {
// all good...
},
error: function () {
throw new Error("Could not load script " + script);
}
});
}
require("<?= BASE_HTTP ?>assets/dist/js/bootstrap.min.js");
require("<?= BASE_HTTP ?>js/sweetalert2.min.js");
require("<?= BASE_HTTP ?>js/utils.js");
require("<?= BASE_HTTP ?>js/jquery.redirect.js");
// DATA TABLES
require("<?= BASE_HTTP ?>assets/js/DataTables/Responsive-2.2.3/js/dataTables.responsive.min.js");
//require("<?= BASE_HTTP ?>assets/js/DataTables/Buttons-1.6.0/js/dataTables.buttons.min.js");
//require("<?= BASE_HTTP ?>assets/js/DataTables/Buttons-1.6.0/js/buttons.print.min.js");
//require("<?= BASE_HTTP ?>assets/js/DataTables/Buttons-1.6.0/js/buttons.colVis.min.js");
//require("<?= BASE_HTTP ?>assets/js/DataTables/Buttons-1.6.0/js/buttons.html5.min.js");
//require("<?= BASE_HTTP ?>assets/js/DataTables/pdfmake-0.1.36/pdfmake.min.js");
//require("<?= BASE_HTTP ?>assets/js/DataTables/pdfmake-0.1.36/pdfmake.js");
//require("<?= BASE_HTTP ?>assets/js/DataTables/pdfmake-0.1.36/vfs_fonts.js");
//require("<?= BASE_HTTP ?>assets/js/DataTables/JSZip-2.5.0/jszip.min.js");
require("<?= BASE_HTTP ?>assets/js/jquery/jquery.mask.min.js");
// DATA TABLES
<? } ?>
$(document).ready(function () {
$(function () {
$('[data-toggle="tooltip"]').tooltip();
});
});
var ROOT_URL = window.location.protocol + "//" + window.location.host;
$.extend($.fn.dataTable.defaults, {
"language": {
"url": BASE_HTTP + "/assets/js/DataTables/plug-ins/i18n/it_it.json"
},
"drawCallback": function (settings) {
$('.tooltipped').tooltip();
},
"fnPreDrawCallback":function(dt){
$('.dataTables_processing').attr('class', 'customloadingDt');
},
dom: 'lBfrtip',
"aLengthMenu": [[10, 20, 40, 80, 160, 999999], ["10", "20", "40", "80", "160", "All"]],
"oClasses": {
"sLengthSelect": 'selectForPages'
},
//"responsive": true,
responsive: {
details: {
display: $.fn.dataTable.Responsive.display.childRowImmediate,
type: ''
}
},
buttons: [
// {
// extend: 'copy',
// text: '<i class="fas fa-copy material-icons dp48 tooltipped" data-position="top" data-tooltip="COPIA"></i>',
// className: 'sipars',
// exportOptions: {
// columns: ':visible'
// }
// },
/*{
extend: 'csv',
text: '<i class="fas fa-file-csv material-icons dp48 tooltipped" data-position="top" data-tooltip="ESPORTA CSV"></i>',
className: 'sipars',
exportOptions: {
columns: ':visible'
}
}/*,{
extend: 'excelHtml5',
text: 'Excel',
footer: true,
className: 'sipars',
exportOptions: {
columns: ':visible'
}
//"exportOptions": _tableExportOptions,
//"customize": _customizeExcelOptions
},
{
extend: 'excel',
text: '<i class="fas fa-file-excel material-icons dp48 tooltipped" data-position="top" data-tooltip="ESPORTA XLS"></i>',
className: 'sipars',
exportOptions: {
columns: ':visible'
}
},*/
// // {
// // extend: 'pdf',
// // text: '<i class="fas fa-file-pdf material-icons dp48 tooltipped" data-position="top" data-tooltip="ESPORTA PDF"></i>',
// // className: 'sipars',
// // exportOptions: {
// // columns: ':visible',
// // modifier: {
// // page: 'all',
// // length: 0,
// // search: 'none'
// // }
// // }
// // },
// {
// extend: 'print',
// text: '<i class="fas fa-print material-icons dp48 tooltipped" data-position="top" data-tooltip="STAMPA"></i>',
// className: 'sipars',
// exportOptions: {
// columns: ':visible'
// }
// },
// {
// extend: 'colvis',
// className: 'sipars',
// text: '<i class="fas fa-table material-icons dp48 tooltipped" data-position="top" data-tooltip="COLONNE DA VISUALIZZARE"></i>'
// },
{
text: '<i class="fas fa-sync-alt material-icons dp48 tooltipped" data-position="top" data-tooltip="AGGIORNA I DATI"></i>',
className: "buttonAgg",
action: function (e, dt, node, config) {
dt.ajax.reload();
}
}
]
});
(function() {
'use strict';
window.addEventListener('load', function() {
// Fetch all the forms we want to apply custom Bootstrap validation styles to
var forms = document.getElementsByClassName('needs-validation');
// Loop over them and prevent submission
var validation = Array.prototype.filter.call(forms, function(form) {
form.addEventListener('submit', function(event) {
if (form.checkValidity() === false) {
event.preventDefault();
event.stopPropagation();
}
form.classList.add('was-validated');
//form.className.add('was-validated');
}, false);
});
}, false);
})();
</script>