Last active
August 1, 2017 08:36
-
-
Save aziz-blr/d51e1378bba7b4131af1c590a8666755 to your computer and use it in GitHub Desktop.
JQuery Data Table Set Up
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var selected = []; | |
$(function () { | |
$('#emailTemplatesDataTable').DataTable({ | |
"paging": true, | |
"lengthChange": true, | |
"searching": true, | |
"ordering": true, | |
"info": true, | |
"autoWidth": false, | |
order: [[0, 'DESC']], | |
columnDefs: [ | |
{ orderable: false, targets: 0 }, | |
{ orderable: false, targets: 1 }, | |
{ orderable: false, targets: 2 }, | |
{ orderable: false, targets: 3 }, | |
{ "width": "5%", "targets": 2 }, | |
{ "width": "10%", "targets": 3 }, | |
{ "className": "dt-center", "targets": 2 }, | |
{ "className": "dt-center", "targets": 3 } | |
], | |
"drawCallback": function (settings) { | |
$("#emailTemplatesDataTable").wrap("<div class='table-responsive'></div>"); | |
$('[data-toggle=confirmation]').confirmation({ | |
rootSelector: '[data-toggle=confirmation]' | |
}); | |
}, | |
"fnRowCallback": function( nRow, aData) { | |
$(nRow).attr("rowid", aData[4]); | |
return nRow; | |
}, | |
"bProcessing": true, | |
"serverSide": true, | |
"language": { | |
"processing": '<img src="<?php echo BACKEND_URL; ?>/images/lazy-loader.gif">' | |
}, | |
"ajax":{ | |
url :"ajax/response_email_template.php", | |
type: "post" | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment