-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Anis KCHAOU
committed
Mar 6, 2021
1 parent
61be10d
commit 5632911
Showing
11 changed files
with
105,676 additions
and
48,671 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
$(function() { | ||
|
||
var table=$('table').DataTable({ | ||
orderCellsTop: true, | ||
dom: 'Bfrtip', | ||
paging: true, | ||
autoFill: true, | ||
pageLength: 10, | ||
buttons: [ | ||
'pdf','csvHtml5','excel','print' | ||
], | ||
initComplete: function () { | ||
this.api().columns([0,1,2,3,4,5,6,7]).every( function () { | ||
var column = this; | ||
var select = $('<select style="width:60px" ><option value=""></option></select>') | ||
.appendTo( $(column.footer()).empty() ) | ||
.on( 'change', function () { | ||
var val = $.fn.dataTable.util.escapeRegex( | ||
$(this).val() | ||
); | ||
|
||
column | ||
.search( val ? '^'+val+'$' : '', true, false ) | ||
.draw(); | ||
} ); | ||
|
||
column.data().unique().sort().each( function ( d, j ) { | ||
select.append( '<option value="'+d+'">'+d+'</option>' ) | ||
} ); | ||
} ); | ||
} | ||
|
||
|
||
|
||
}); | ||
//$.fn.DataTable.ext.pager.numbers_length = 2; | ||
$('a.toggle-vis').on( 'click', function (e) { | ||
e.preventDefault(); | ||
|
||
// Get the column API object | ||
var column = table.column( $(this).attr('data-column') ); | ||
|
||
// Toggle the visibility | ||
column.visible( ! column.visible() ); | ||
} ); | ||
|
||
|
||
$('.dataTables_paginate').addClass("btn-group datatable-pagination"); | ||
$('.dataTables_paginate > a').wrapInner('<span />'); | ||
$('.dataTables_paginate > a:first-child').append('<i class="icon-chevron-left shaded"></i>'); | ||
$('.dataTables_paginate > a:last-child').append('<i class="icon-chevron-right shaded"></i>'); | ||
|
||
|
||
$('.tooltips').append("<span></span>"); | ||
$('.tooltips:not([tooltip-position])').attr('tooltip-position','bottom'); | ||
|
||
|
||
$(".tooltips").mouseenter(function(){ | ||
$(this).find('span').empty().append($(this).attr('tooltip')); | ||
}); | ||
|
||
}); |
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.