forked from wenzhixin/bootstrap-table-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
350.html
49 lines (49 loc) · 2.02 KB
/
350.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
<!DOCTYPE html>
<html>
<head>
<title>Support for data-field with dot notation</title>
<meta charset="utf-8">
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/bootstrap-table/src/bootstrap-table.css">
<link rel="stylesheet" href="assets/examples.css">
<script src="assets/jquery.min.js"></script>
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
<script src="assets/bootstrap-table/src/bootstrap-table.js"></script>
<script src="assets/bootstrap-table/src/extensions/flatJSON/bootstrap-table-flatJSON.js"></script>
<script src="//rawgit.com/djhvscf/bootstrap-table-flatJSON/master/src/bootstrap-table-flatJSON.js"></script>
<script src="ga.js"></script>
</head>
<body>
<div class="container">
<div class="ribbon">
<a href="https://github.com/wenzhixin/bootstrap-table-examples/blob/master/350.html" target="_blank">View Source on GitHub</a>
</div>
<h1>Support for data-field with dot notation(<a href="https://github.com/wenzhixin/bootstrap-table/pull/350">#350</a>).</h1>
<table id="table"
data-toggle="table"
data-search="true"
data-show-refresh="true"
data-show-toggle="true"
data-show-columns="true"
data-flat="true"
data-url="json/350.json">
<thead>
<tr>
<th data-field="github.name" data-sortable="true">Name</th>
<th data-field="github.count.stargazers" data-sortable="true">Stargazers</th>
<th data-field="github.count.forks" data-sortable="true">Forks</th>
<th data-field="github.description" data-sortable="true">Description</th>
</tr>
</thead>
</table>
</div>
<script>
var $table = $('#table');
$(function () {
$table.on('sort.bs.table', function (event, name, order) {
console.log(name, order);
});
});
</script>
</body>
</html>