Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jQuery(document).ready(function($)
- {
- //convert all checkboxes before converting datatable
- replaceCheckboxes();
- var datatable = $("#table_export").dataTable({
- "sPaginationType": "bootstrap",
- "sDom": "<'row'<'col-xs-3 col-left'l><'col-xs-9 col-right'<'export-data'T>f>r>t<'row'<'col-xs-3 col-left'i><'col-xs-9 col-right'p>>",
- "aoColumns": [
- { "bSortable": false},
- { "bSortable": true},
- { "bVisible": true},
- { "bVisible": true},
- { "bVisible": true},
- ],
- });
- // Highlighted rows
- $("#table_export tbody input[type=checkbox]").each(function(i, el)
- {
- var $this = $(el),
- $p = $this.closest('tr');
- $(el).on('change', function()
- {
- var is_checked = $this.is(':checked');
- $p[is_checked ? 'addClass' : 'removeClass']('highlight');
- });
- });
- //customize the select menu
- $(".dataTables_wrapper select").select2({
- minimumResultsForSearch: -1
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement