Skip to content

Commit 346e22c

Browse files
committed
Add flatJSON example.
1 parent 64503fc commit 346e22c

File tree

6 files changed

+120
-1
lines changed

6 files changed

+120
-1
lines changed

extensions/flatJSON.html

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>flatJSON</title>
5+
<meta charset="utf-8">
6+
<link rel="stylesheet" href="../assets/bootstrap/css/bootstrap.min.css">
7+
<link rel="stylesheet" href="../assets/bootstrap-table/src/bootstrap-table.css">
8+
<link rel="stylesheet" href="../assets/examples.css">
9+
<script src="../assets/jquery.min.js"></script>
10+
<script src="../assets/bootstrap/js/bootstrap.min.js"></script>
11+
<script src="../assets/bootstrap-table/src/bootstrap-table.js"></script>
12+
<script src="../assets/bootstrap-table/src/extensions/flatJSON/bootstrap-table-flatJSON.js"></script>
13+
<script src="../ga.js"></script>
14+
</head>
15+
<body>
16+
<div class="container">
17+
<div class="ribbon">
18+
<a href="https://github.com/wenzhixin/bootstrap-table-examples/blob/master/extensions/export.html" target="_blank">View Source on GitHub</a>
19+
</div>
20+
<h1></h1>
21+
<table id="table"
22+
data-toggle="table"
23+
data-flat="true"
24+
data-search="true"
25+
data-side-pagination="server"
26+
data-url="../json/data4.json">
27+
<thead>
28+
<tr>
29+
<th data-field="github.name" data-sortable="true">Name</th>
30+
<th data-field="github.count.stargazers" data-sortable="true">Stargazers</th>
31+
<th data-field="github.count.forks" data-sortable="true">Forks</th>
32+
<th data-field="github.description" data-sortable="true">Description</th>
33+
</tr>
34+
</thead>
35+
</table>
36+
</div>
37+
</body>
38+
</html>

index.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@
7878
<li><a href="methods/toggleView.html">toggleView</a></li>
7979
</ul>
8080
</li>
81+
<li>
82+
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Extensions <span class="caret"></span></a>
83+
<ul class="dropdown-menu" role="menu">
84+
<li><a href="extensions/export.html">Export</a></li>
85+
<li><a href="extensions/flatJSON.html">flatJSON</a></li>
86+
</ul>
87+
</li>
8188
</ul>
8289
</div><!--/.nav-collapse -->
8390
</div>

index.html.conf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@
7878
<li><a href="methods/toggleView.html">toggleView</a></li>
7979
</ul>
8080
</li>
81+
<li>
82+
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Extensions <span class="caret"></span></a>
83+
<ul class="dropdown-menu" role="menu">
84+
<li><a href="extensions/export.html">Export</a></li>
85+
<li><a href="extensions/flatJSON.html">flatJSON</a></li>
86+
</ul>
87+
</li>
8188
</ul>
8289
</div><!--/.nav-collapse -->
8390
</div>

json/data3.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
[
2+
{
3+
"github": {
4+
"name": "bootstrap-table",
5+
"count": {
6+
"stargazers": 768,
7+
"forks": 183
8+
},
9+
"description": "An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3)"
10+
}
11+
},
12+
{
13+
"github": {
14+
"name": "multiple-select",
15+
"count": {
16+
"stargazers": 365,
17+
"forks": 166
18+
},
19+
"description": "A jQuery plugin to select multiple elements with checkboxes :)"
20+
}
21+
},
22+
{
23+
"github": {
24+
"name": "bootstrap-show-password",
25+
"count": {
26+
"stargazers": 37,
27+
"forks": 13
28+
},
29+
"description": "Show/hide password plugin for twitter bootstrap."
30+
}
31+
}
32+
]

json/data4.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"total": 100,
3+
"rows": [
4+
{
5+
"github": {
6+
"name": "bootstrap-table",
7+
"count": {
8+
"stargazers": 768,
9+
"forks": 183
10+
},
11+
"description": "An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3)"
12+
}
13+
},
14+
{
15+
"github": {
16+
"name": "multiple-select",
17+
"count": {
18+
"stargazers": 365,
19+
"forks": 166
20+
},
21+
"description": "A jQuery plugin to select multiple elements with checkboxes :)"
22+
}
23+
},
24+
{
25+
"github": {
26+
"name": "bootstrap-show-password",
27+
"count": {
28+
"stargazers": 37,
29+
"forks": 13
30+
},
31+
"description": "Show/hide password plugin for twitter bootstrap."
32+
}
33+
}
34+
]
35+
}

0 commit comments

Comments
 (0)