-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexemple.html
More file actions
167 lines (166 loc) · 5.73 KB
/
exemple.html
File metadata and controls
167 lines (166 loc) · 5.73 KB
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<!--
*
* DevelopScript - DataTable v0.6.5 (http://developscript.com)
*
* Licensed under the MIT license.
*
* @file exemple.html
* @author Rafael Pegorari
* @date 13/07/2015
*
* ====== Required ======
* This code was developed based on jQuery v2.1.4 and Bootstrap v3.3.5
* More informations
* jQuery url: https://jquery.com/
* Bootstrap url: http://getbootstrap.com/
*
*
-->
<!DOCTYPE html>
<html>
<head>
<title>DS - DataTable</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style-dsDataTable.min.css">
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<h1>Exemple DataTable - Ajax</h1>
<table class="table" id="table">
<thead>
<tr>
<th>Name</th>
<th>Surname</th>
<th>Department</th>
<th>E-mail</th>
<th>Salary</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
<script src="lib/jquery-2.1.4.js" type="text/javascript"></script>
<script src="dsDataTable.min.js" type="text/javascript"></script>
<script>
/*
* ====== Default setting ======
* search: {
* active: true,
* placeholder: 'Search',
* button: '<span class="icon-seach" aria-hidden="true"></span>',
* autosearch: true,
* class: ''
* },
* recordsPage: {
* active: true,
* rows: 10,
* next: 20,
* length: 5,
* class: ''
* },
* labelTotal: {
* active: true,
* showing: 'Showing',
* to: 'to',
* of: 'of',
* entries: 'entries',
* loading: 'Loading...',
* filter: 'Filter',
* values_in_total: 'values in total',
* records_not_found: 'Records not found.',
* class: ''
* },
* pagination: {
* active: true,
* class: ''
* },
* orderDefault: []
*
* ====== All settings ======
* $('#table').dsDataTable({
* search: {
* active: true||fase,
* placeholder: 'Search',
* button: '<span class="icon-seach" aria-hidden="true"></span>',
* autosearch: true||false,
* class: 'yourClass'
* },
* recordsPage: {
* active: true||false,
* rows: *,
* next: *,
* length: *,
* class: 'yourClass'
* },
* labelTotal: {
* active: true||false,
* showing: '*********',
* to: '**',
* of: '**',
* entries: '*********',
* loading: '*********',
* filter: '*********',
* values_in_total: '*********',
* records_not_found: '*********',
* class: ''
* },
* pagination: {
* active: true||false,
* class: 'yourClass'
* },
* orderDefault: [
* {name: 'Column_name', order: 'ASC||DESC'},
* ....
* ...
* ],
* // ==== required ====
* columns: [
* // Is required you set your columns as the html order.
* {name: 'Column_name', class: 'yourClass', order: true||false }
* ....
* ...
* ],
* // ==== required ====
* ajax: {
* url: '*********',
* type: 'POST||GET|| ...',
* addData: {yourData: 'yourValue'} // ==== optional ====
* }
* });
*
* ====== Basic ======
* Is required you set your columns as the html order.
* $('#table').dsDataTable({
* columns: [
* {name: "name"},
* {name: "surname"},
* {name: "department"},
* {name: "email"},
* {name: "salary"}
* ],
* ajax: {
* url: 'ajax.php',
* type: 'POST'
* }
* });
*/
$('#table').dsDataTable({
columns: [
{name: "name", class: 'class_name'},
{name: "surname", order: false},
{name: "department"},
{name: "email"},
{name: "salary"}
],
ajax: {
url: 'ajaxPDO.php',
type: 'POST'
}
});
</script>
</body>
</html>