芝麻web文件管理V1.00
编辑当前文件:/home/sditechnicalteam/socialsolargreens.pk/wwwroot/assets/js/custom.js
//Required datatable js document.writeln(""); document.writeln(""); //Buttons examples document.writeln(""); document.writeln(""); document.writeln(""); document.writeln(""); document.writeln(""); document.writeln(""); document.writeln(""); document.writeln(""); //Responsive examples document.writeln(""); document.writeln(""); $(document).ready(function () { //var cssFile = document.createElement('link'); //cssFile.rel = 'stylesheet'; //cssFile.href = "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"; // or path for file {themes('/styles/mobile.css')} //document.head.appendChild(cssFile); // append css to head element var table = $("#datatable").DataTable({ dom: 'Bfrtip', buttons: [ 'pageLength', "colvis", 'pdf' ], orderCellsTop: true, "lengthChange": true, "lengthMenu": [[10, 25, 50, 100, 500, 1000000000000], [10, 25, 50, 100, 500, "Max"]], "pageLength": 50, "aaSorting": [[0, 'desc']], "order": [[0, 'desc']], }); // Setup - add a text input to each footer cell $('#datatable tfoot th').each(function () { var title = $(this).text(); if (title != "Action") { //$(this).html(`
`); $(this).html(`
`); } else { $(this).html(''); } }); // DataTable table.columns().every(function () { var that = this; $('input', this.footer()).on('keyup change', function () { if (that.search() !== this.value) { that .search(this.value) .draw(); } }); }); }); function ShowToaster(type, text) { let toasterType; let title; switch (type) { case 1: toasterType = "success"; title = "Success"; break; case 0: toasterType = "error"; title = "Error!"; break; } toastr[toasterType](text, title, { closeButton: true, tapToDismiss: false, //"extendedTimeOut": 800, }); }