-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatatables.html
87 lines (77 loc) · 4.46 KB
/
datatables.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<!doctype html>
<html lang="pt-br">
<head>
<title>Telefones</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- https://www.srihash.org/ -->
<!-- Bootstrap CSS only -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<!-- Bootstrap JS, Popper.js, and jQuery -->
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha384-ZvpUoO/+PpLXR1lu4jmpXWu80pZlYUAfxl5NsBMWOEPSjUn/6Z/hRTt8+pR6L4N2" crossorigin="anonymous"></script>
<script src="https://bartaz.github.io/sandbox.js/jquery.highlight.js" integrity="sha384-COfjQfuLZw+Zvx+XMsYIVqsBHXPaUJnu/nwutbZvnI3zys8lUt3N3SUDsR6yu7ud" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
<!-- Datatables -->
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.21/css/dataTables.bootstrap4.min.css" integrity="sha384-9IE49Wand+n6ztme8e7Gh51OalpKkPG5z23U2F7SicqKr5It9ttcDbg6dNlhYeTE" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.datatables.net/plug-ins/1.10.21/features/searchHighlight/dataTables.searchHighlight.css" integrity="sha384-3FGcHDS9wKlVV/Pu4y1kojpLsNxlE3jQjdm1N0p7RC9f6xPdRAj78js3ELGiGP/j" crossorigin="anonymous">
<script src="https://cdn.datatables.net/1.10.21/js/jquery.dataTables.min.js" integrity="sha384-RxzVJNpULMjRDJ3nd+aAVYb11VBDmhgIonMdvYdLxYvylOdEl6pprk4R4PK0t3xG" crossorigin="anonymous"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.21/features/searchHighlight/dataTables.searchHighlight.min.js" integrity="sha384-1jzVfCcUzxcYh1NVfyue63vzMTbVdFIw+RAHWrqw9q3EQeDlcY6MWVN9H/Dvb2za" crossorigin="anonymous"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.21/filtering/type-based/accent-neutralise.js" integrity="sha384-IY/DHpw0/QfW3gH+nVk10pVhiN1dqOttmfXyjwcio6RnLu0awZhaQ/VBu0K5uLeU" crossorigin="anonymous"></script>
<script src="https://cdn.datatables.net/1.10.21/js/dataTables.bootstrap4.min.js" integrity="sha384-XS84aqWsn4cbfnAhdoO7kFSYtPxyAx70hgIXAzIzEtzPI1WL5g99awOOAhsmnetW" crossorigin="anonymous"></script>
<style>
.dataTables_filter {
float: left !important;
}
.dataTables_length {
float: right !important;
}
.table-hover tbody tr:hover td, .table-hover tbody tr:hover th {
background-color: #ffe8e7;
}
</style>
</head>
<body>
<div class="container">
<h1>Telefones</h1>
<br>
<table id="example" class="table table-striped table-bordered table-hover" style="width:100%">
<thead>
<tr><th>Nome</th><th>Departamento</th><th>Ramal</th><th>Celular</th></tr>
</thead>
<tbody>
<tr><td>Adilson Santiago</td><td>-</td><td>-</td><td>(xx) yyyyy-zzzz</td></tr>
<tr><td>Aílton Andrade</td><td>-</td><td>220</td><td>(xx) yyyyy-zzzz</td></tr>
<tr><td>Allan Fernandes</td><td>-</td><td>-</td><td>(xx) yyyyy-zzzz</td></tr>
<tr><td>Álvaro Silva</td><td>-</td><td>-</td><td>(xx) yyyyy-zzzz</td></tr>
<tr><td>Carlos Renan</td><td>-</td><td>-</td><td>(xx) yyyyy-zzzz</td></tr>
</tbody>
<tfoot>
<tr><th>Nome</th><th>Departamento</th><th>Ramal</th><th>Celular</th></tr>
</tfoot>
</table>
</div>
<script>
$(document).ready(function() {
var table = $('#example').DataTable( {
"pageLength": 50,
"language": {
"search": "Pesquisar:", // Removes the 'Search' field label
"lengthMenu": "Mostrar _MENU_ registros",
"zeroRecords": "Nenhum registro encontrado",
//"info": "Showing page _PAGE_ of _PAGES_",
"info": "_TOTAL_ registros encontrados",
"infoFiltered": "(total: _MAX_)",
},
"dom": "<'row'<'col-sm-12 col-md-6'f><'col-sm-12 col-md-6'l>>" + "<'row'<'col-sm-12'tr>>" + "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>"
} );
$('div.dataTables_filter input').focus();
table.on( 'draw', function () {
var body = $( table.table().body() );
body.unhighlight();
body.highlight( table.search() );
} );
} );
</script>
</body>
</html>