Skip to content

Commit 341243d

Browse files
alexschwartzwenzhixin
authored andcommitted
Simple example for "Group by" (wenzhixin#195)
* starting with copied files for 'group-by' example * added continent+country * added the group-by extension * succeeded with the first group by country * switched to other examples * renaming examle to clarify it is covering group-by-v2 rather than group-by
1 parent dbdc86c commit 341243d

File tree

4 files changed

+86
-0
lines changed

4 files changed

+86
-0
lines changed

extensions/group-by-v2.html

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Editable</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/bootstrap-table/src/extensions/group-by-v2/bootstrap-table-group-by.css">
9+
<link rel="stylesheet" href="../assets/examples.css">
10+
<script src="../assets/jquery.min.js"></script>
11+
<script src="../assets/bootstrap/js/bootstrap.min.js"></script>
12+
<script src="../assets/bootstrap-table/src/bootstrap-table.js"></script>
13+
<script src="../assets/bootstrap-table/src/extensions/group-by-v2/bootstrap-table-group-by.js"></script>
14+
<script src="../ga.js"></script>
15+
</head>
16+
<body>
17+
<div class="container">
18+
<h1>Group By v2</h1>
19+
<table id="table"
20+
data-toggle="table"
21+
data-group-by="true"
22+
data-group-by-field="shape"
23+
data-url="../json/data6.json">
24+
<thead>
25+
<tr>
26+
<th data-field="shape">Shape</th>
27+
<th data-field="color">Color</th>
28+
<th data-field="area">Area</th>
29+
</tr>
30+
</thead>
31+
</table>
32+
</div>
33+
</body>
34+
</html>

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
<li><a href="extensions/export.html">Export</a></li>
9999
<li><a href="extensions/flat-json.html">Flat Json</a></li>
100100
<li><a href="extensions/cookie.html">Cookie</a></li>
101+
<li><a href="extensions/group-by-v2.html">Group By v2</a></li>
101102
<li><a href="extensions/resizable.html">Resizable</a></li>
102103
<li><a href="extensions/key-events.html">Key Events</a></li>
103104
<li><a href="extensions/mobile.html">Mobile</a></li>

index.html.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
<li><a href="extensions/export.html">Export</a></li>
9999
<li><a href="extensions/flat-json.html">Flat Json</a></li>
100100
<li><a href="extensions/cookie.html">Cookie</a></li>
101+
<li><a href="extensions/group-by-v2.html">Group By v2</a></li>
101102
<li><a href="extensions/resizable.html">Resizable</a></li>
102103
<li><a href="extensions/key-events.html">Key Events</a></li>
103104
<li><a href="extensions/mobile.html">Mobile</a></li>

json/data6.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
[
2+
{
3+
"shape": "triangle",
4+
"color": "red",
5+
"area": 5,
6+
"label": "T1"
7+
},
8+
{
9+
"shape": "triangle",
10+
"color": "green",
11+
"area": 27,
12+
"label": "T2"
13+
},
14+
{
15+
"shape": "triangle",
16+
"color": "yellow",
17+
"area": 15,
18+
"label": "T3"
19+
},
20+
{
21+
"shape": "triangle",
22+
"color": "red",
23+
"area": 10,
24+
"label": "T4"
25+
},
26+
{
27+
"shape": "quadrangle",
28+
"color": "red",
29+
"area": 25,
30+
"label": "Q1"
31+
},
32+
{
33+
"shape": "quadrangle",
34+
"color": "red",
35+
"area": 44,
36+
"label": "Q2"
37+
},
38+
{
39+
"shape": "circle",
40+
"color": "red",
41+
"area": 44,
42+
"label": "Q2"
43+
},
44+
{
45+
"shape": "circle",
46+
"color": "black",
47+
"area": 44,
48+
"label": "Q2"
49+
}
50+
]

0 commit comments

Comments
 (0)