patternfly-sass 3.13.0 → 3.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/javascripts/patternfly-functions.js +1137 -0
- data/assets/javascripts/patternfly-functions.min.js +1 -0
- data/assets/javascripts/patternfly-settings.js +506 -0
- data/assets/javascripts/patternfly-settings.min.js +1 -0
- data/assets/javascripts/patternfly.dataTables.pfEmpty.js +244 -0
- data/assets/javascripts/patternfly.dataTables.pfEmpty.min.js +1 -0
- data/assets/javascripts/patternfly.dataTables.pfFilter.js +421 -0
- data/assets/javascripts/patternfly.dataTables.pfFilter.min.js +1 -0
- data/assets/javascripts/patternfly.dataTables.pfResize.js +214 -0
- data/assets/javascripts/patternfly.dataTables.pfResize.min.js +1 -0
- data/assets/javascripts/patternfly.dataTables.pfSelect.js +281 -0
- data/assets/javascripts/patternfly.dataTables.pfSelect.min.js +1 -0
- data/assets/javascripts/patternfly.js +692 -652
- data/assets/javascripts/patternfly.min.js +2 -2
- data/assets/stylesheets/_patternfly.scss +1 -0
- data/assets/stylesheets/patternfly/_datatables.scss +17 -49
- data/assets/stylesheets/patternfly/_table-view.scss +170 -0
- data/bower.json +1 -1
- data/lib/patternfly-sass/version.rb +2 -2
- data/package.json +70 -0
- data/spec/html/about-modal.html +1 -0
- data/spec/html/accordions.html +1 -0
- data/spec/html/alerts.html +1 -0
- data/spec/html/area-charts.html +1 -0
- data/spec/html/badges.html +1 -0
- data/spec/html/bar-charts.html +1 -0
- data/spec/html/basic.html +368 -418
- data/spec/html/blank-slate.html +2 -1
- data/spec/html/bootstrap-combobox.html +1 -0
- data/spec/html/bootstrap-datepicker.html +1 -0
- data/spec/html/bootstrap-select.html +1 -0
- data/spec/html/bootstrap-switch.html +1 -0
- data/spec/html/bootstrap-touchspin.html +1 -0
- data/spec/html/bootstrap-treeview-2.html +1 -0
- data/spec/html/bootstrap-treeview.html +1 -0
- data/spec/html/breadcrumbs.html +1 -0
- data/spec/html/buttons.html +1 -0
- data/spec/html/card-view-card-variations.html +1 -0
- data/spec/html/card-view-multi-select.html +1 -0
- data/spec/html/card-view-single-select.html +1 -0
- data/spec/html/cards.html +1 -0
- data/spec/html/code.html +1 -0
- data/spec/html/dashboard.html +1 -0
- data/spec/html/dist/css/patternfly-additions.css +143 -52
- data/spec/html/dist/css/patternfly-additions.css.map +1 -1
- data/spec/html/dist/css/patternfly-additions.min.css +1 -1
- data/spec/html/dist/css/patternfly-additions.min.css.map +1 -1
- data/spec/html/dist/css/patternfly.min.css +2 -2
- data/spec/html/dist/css/patternfly.min.css.map +1 -1
- data/spec/html/donut-charts.html +1 -0
- data/spec/html/dropdowns.html +1 -0
- data/spec/html/form.html +1 -0
- data/spec/html/forms.html +1 -0
- data/spec/html/horizontal-navigation.html +1 -0
- data/spec/html/icons.html +1 -0
- data/spec/html/index.html +10 -6
- data/spec/html/infotip.html +1 -0
- data/spec/html/labels.html +1 -0
- data/spec/html/line-charts.html +1 -0
- data/spec/html/list-group.html +1 -0
- data/spec/html/list-view-compound-expansion.html +1 -0
- data/spec/html/list-view-rows.html +1 -0
- data/spec/html/list-view-simple-expansion.html +1 -0
- data/spec/html/list-view.html +1 -0
- data/spec/html/login.html +1 -0
- data/spec/html/modals.html +1 -0
- data/spec/html/navbar.html +1 -0
- data/spec/html/notification-drawer-horizontal-nav.html +1 -0
- data/spec/html/notification-drawer-vertical-nav.html +1 -0
- data/spec/html/pagination.html +1 -0
- data/spec/html/panels.html +1 -0
- data/spec/html/pie-charts.html +1 -0
- data/spec/html/popovers.html +1 -0
- data/spec/html/progress-bars.html +1 -0
- data/spec/html/search.html +1 -0
- data/spec/html/spinner.html +1 -0
- data/spec/html/tab.html +373 -420
- data/spec/html/{datatables-columns.html → table-view-columns.html} +9 -7
- data/spec/html/table-view-navbar.html +532 -0
- data/spec/html/table-view.html +422 -0
- data/spec/html/tables.html +1 -0
- data/spec/html/tabs.html +1 -0
- data/spec/html/time-picker.html +1 -0
- data/spec/html/toast.html +1 -0
- data/spec/html/toolbar.html +1 -0
- data/spec/html/tooltip.html +1 -0
- data/spec/html/typography-2.html +1 -1
- data/spec/html/typography.html +1 -0
- data/spec/html/utilization-bar-charts.html +1 -0
- data/spec/html/vertical-navigation-primary-only.html +1 -0
- data/spec/html/vertical-navigation-with-badges.html +1 -0
- data/spec/html/vertical-navigation-with-secondary.html +1 -0
- data/spec/html/vertical-navigation-with-tertiary-no-icons.html +1 -0
- data/spec/html/vertical-navigation-with-tertiary-pins.html +1 -0
- data/spec/html/wizard.html +1 -0
- metadata +22 -6
- data/spec/html/datatables.html +0 -472
@@ -4,7 +4,7 @@
|
|
4
4
|
<html lang="en-us">
|
5
5
|
<!--<![endif]-->
|
6
6
|
<head>
|
7
|
-
<title>
|
7
|
+
<title>Table View [Deprecated example] with column visibility, reordering - PatternFly</title>
|
8
8
|
<meta charset="UTF-8">
|
9
9
|
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
10
10
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
@@ -25,6 +25,7 @@
|
|
25
25
|
<link rel="apple-touch-icon-precomposed" sizes="57x57" href="../../dist/img/apple-touch-icon-precomposed-57.png">
|
26
26
|
<link rel="stylesheet" href="../../dist/css/patternfly.min.css" >
|
27
27
|
<link rel="stylesheet" href="../../dist/css/patternfly-additions.min.css" >
|
28
|
+
<link href="tests.css" rel="stylesheet" media="screen, print">
|
28
29
|
<script src="//code.jquery.com/jquery-2.1.4.min.js"></script>
|
29
30
|
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
|
30
31
|
<script src="//cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"></script>
|
@@ -36,21 +37,21 @@
|
|
36
37
|
<body>
|
37
38
|
<div class="container">
|
38
39
|
<div class="page-header">
|
39
|
-
<h1>
|
40
|
+
<h1>Table View [Deprecated example] with column visibility, reordering</h1>
|
40
41
|
</div>
|
41
42
|
<div class="alert alert-warning">
|
42
43
|
<span class="pficon pficon-warning-triangle-o"></span>
|
43
44
|
These examples are included for development testing purposes. For official documentation, see <a href="https://www.patternfly.org" class="alert-link">https://www.patternfly.org</a>, <a href="http://getbootstrap.com" class="alert-link">http://getbootstrap.com</a>, and <a href="http://datatables.net" class="alert-link">http://datatables.net</a>.
|
44
45
|
</div>
|
45
46
|
<hr>
|
46
|
-
<table class="
|
47
|
+
<table class="table table-striped table-bordered">
|
47
48
|
<thead>
|
48
49
|
<tr>
|
49
|
-
<th>Rendering
|
50
|
+
<th>Rendering Engine</th>
|
50
51
|
<th>Browser</th>
|
51
52
|
<th>Platform(s)</th>
|
52
|
-
<th>Engine
|
53
|
-
<th>CSS
|
53
|
+
<th>Engine Version</th>
|
54
|
+
<th>CSS Grade</th>
|
54
55
|
</tr>
|
55
56
|
</thead>
|
56
57
|
<tbody>
|
@@ -462,10 +463,11 @@
|
|
462
463
|
</tr>
|
463
464
|
</tbody>
|
464
465
|
</table>
|
466
|
+
|
465
467
|
<script>
|
466
468
|
$(document).ready(function() {
|
467
469
|
// Initialize Datatables
|
468
|
-
var table = $('
|
470
|
+
var table = $('table').DataTable({
|
469
471
|
// Customize the header and footer
|
470
472
|
"dom": 'R<"dataTables_header"fCi>t<"dataTables_footer"p>',
|
471
473
|
// Customize the ColVis button text so it's an icon and align the dropdown to the right side
|
@@ -0,0 +1,532 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<!--[if IE 9]><html lang="en-us" class="ie9"><![endif]-->
|
3
|
+
<!--[if gt IE 9]><!-->
|
4
|
+
<html lang="en-us">
|
5
|
+
<!--<![endif]-->
|
6
|
+
<head>
|
7
|
+
<title>Table View with Navbar - PatternFly</title>
|
8
|
+
<meta charset="UTF-8">
|
9
|
+
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
10
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
11
|
+
<link rel="shortcut icon" href="../../dist/img/favicon.ico">
|
12
|
+
<!-- iPad retina icon -->
|
13
|
+
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../dist/img/apple-touch-icon-precomposed-152.png">
|
14
|
+
<!-- iPad retina icon (iOS < 7) -->
|
15
|
+
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="../../dist/img/apple-touch-icon-precomposed-144.png">
|
16
|
+
<!-- iPad non-retina icon -->
|
17
|
+
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="../../dist/img/apple-touch-icon-precomposed-76.png">
|
18
|
+
<!-- iPad non-retina icon (iOS < 7) -->
|
19
|
+
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="../../dist/img/apple-touch-icon-precomposed-72.png">
|
20
|
+
<!-- iPhone 6 Plus icon -->
|
21
|
+
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="../../dist/img/apple-touch-icon-precomposed-180.png">
|
22
|
+
<!-- iPhone retina icon (iOS < 7) -->
|
23
|
+
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="../../dist/img/apple-touch-icon-precomposed-114.png">
|
24
|
+
<!-- iPhone non-retina icon (iOS < 7) -->
|
25
|
+
<link rel="apple-touch-icon-precomposed" sizes="57x57" href="../../dist/img/apple-touch-icon-precomposed-57.png">
|
26
|
+
<link rel="stylesheet" href="../../dist/css/patternfly.min.css" >
|
27
|
+
<link rel="stylesheet" href="../../dist/css/patternfly-additions.min.css" >
|
28
|
+
<link href="tests.css" rel="stylesheet" media="screen, print">
|
29
|
+
<script src="//code.jquery.com/jquery-2.1.4.min.js"></script>
|
30
|
+
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
|
31
|
+
<script src="//cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"></script>
|
32
|
+
<script src="//cdn.datatables.net/select/1.2.0/js/dataTables.select.min.js"></script>
|
33
|
+
<script src="../../dist/js/patternfly.dataTables.pfEmpty.js"></script>
|
34
|
+
<script src="../../dist/js/patternfly.dataTables.pfFilter.js"></script>
|
35
|
+
<script src="../../dist/js/patternfly.dataTables.pfResize.js"></script>
|
36
|
+
<script src="../../dist/js/patternfly.dataTables.pfSelect.js"></script>
|
37
|
+
<script src="../../dist/js/patternfly.min.js"></script>
|
38
|
+
</head>
|
39
|
+
|
40
|
+
<body>
|
41
|
+
<!-- Navbar -->
|
42
|
+
<nav class="navbar navbar-default navbar-pf" role="navigation">
|
43
|
+
<div class="navbar-header">
|
44
|
+
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse-1">
|
45
|
+
<span class="sr-only">Toggle navigation</span>
|
46
|
+
<span class="icon-bar"></span>
|
47
|
+
<span class="icon-bar"></span>
|
48
|
+
<span class="icon-bar"></span>
|
49
|
+
</button>
|
50
|
+
<a class="navbar-brand" href="/">
|
51
|
+
<img src="../../dist/img/brand.svg" alt="PatternFly Enterprise Application" />
|
52
|
+
</a>
|
53
|
+
</div>
|
54
|
+
<div class="collapse navbar-collapse navbar-collapse-1">
|
55
|
+
<ul class="nav navbar-nav navbar-utility">
|
56
|
+
<li>
|
57
|
+
<a href="#">Status</a>
|
58
|
+
</li>
|
59
|
+
<li class="dropdown">
|
60
|
+
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
61
|
+
<span class="pficon pficon-user"></span>
|
62
|
+
Brian Johnson <b class="caret"></b>
|
63
|
+
</a>
|
64
|
+
<ul class="dropdown-menu">
|
65
|
+
<li>
|
66
|
+
<a href="#">Link</a>
|
67
|
+
</li>
|
68
|
+
<li>
|
69
|
+
<a href="#">Another link</a>
|
70
|
+
</li>
|
71
|
+
<li>
|
72
|
+
<a href="#">Something else here</a>
|
73
|
+
</li>
|
74
|
+
<li class="divider"></li>
|
75
|
+
<li class="dropdown-submenu">
|
76
|
+
<a tabindex="-1" href="#">More options</a>
|
77
|
+
<ul class="dropdown-menu">
|
78
|
+
<li>
|
79
|
+
<a href="#">Link</a>
|
80
|
+
</li>
|
81
|
+
<li>
|
82
|
+
<a href="#">Another link</a>
|
83
|
+
</li>
|
84
|
+
<li>
|
85
|
+
<a href="#">Something else here</a>
|
86
|
+
</li>
|
87
|
+
<li class="divider"></li>
|
88
|
+
<li class="dropdown-header">Nav header</li>
|
89
|
+
<li>
|
90
|
+
<a href="#">Separated link</a>
|
91
|
+
</li>
|
92
|
+
<li class="divider"></li>
|
93
|
+
<li>
|
94
|
+
<a href="#">One more separated link</a>
|
95
|
+
</li>
|
96
|
+
</ul>
|
97
|
+
</li>
|
98
|
+
<li class="divider"></li>
|
99
|
+
<li>
|
100
|
+
<a href="#">One more separated link</a>
|
101
|
+
</li>
|
102
|
+
</ul>
|
103
|
+
</li>
|
104
|
+
</ul>
|
105
|
+
<ul class="nav navbar-nav navbar-primary">
|
106
|
+
<li>
|
107
|
+
<a href="basic.html">Basic</a>
|
108
|
+
</li>
|
109
|
+
<li>
|
110
|
+
<a href="bootstrap-treeview-2.html">Tree View</a>
|
111
|
+
</li>
|
112
|
+
<li>
|
113
|
+
<a href="dashboard.html">Dashboard</a>
|
114
|
+
</li>
|
115
|
+
<li>
|
116
|
+
<a href="form.html">Form</a>
|
117
|
+
</li>
|
118
|
+
<li>
|
119
|
+
<a href="tab.html">Tab</a>
|
120
|
+
</li>
|
121
|
+
<li>
|
122
|
+
<a href="typography-2.html">Typography</a>
|
123
|
+
</li>
|
124
|
+
<li>
|
125
|
+
<a href="card-view-multi-select.html">Card View - Multi Select</a>
|
126
|
+
</li>
|
127
|
+
<li>
|
128
|
+
<a href="card-view-single-select.html">Card View - Single Select</a>
|
129
|
+
</li>
|
130
|
+
<li>
|
131
|
+
<a href="cards.html">Cards</a>
|
132
|
+
</li>
|
133
|
+
</ul>
|
134
|
+
</div>
|
135
|
+
</nav>
|
136
|
+
|
137
|
+
<!-- Toolbar -->
|
138
|
+
<div class="container-fluid">
|
139
|
+
<div class="row toolbar-pf table-view-pf-toolbar-external" id="toolbar1">
|
140
|
+
<div class="col-sm-12">
|
141
|
+
<form class="toolbar-pf-actions">
|
142
|
+
<div class="form-group toolbar-pf-filter">
|
143
|
+
<label class="sr-only" for="filter">Rendering Engine</label>
|
144
|
+
<div class="input-group">
|
145
|
+
<div class="input-group-btn">
|
146
|
+
<button type="button" class="btn btn-default dropdown-toggle" id="filter" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Rendering Engine <span class="caret"></span></button>
|
147
|
+
<ul class="dropdown-menu">
|
148
|
+
<li><a href="#" id="filter1">Rendering Engine</a></li>
|
149
|
+
<li><a href="#" id="filter2">Browser</a></li>
|
150
|
+
<li><a href="#" id="filter3">Platform(s)</a></li>
|
151
|
+
<li><a href="#" id="filter4">Engine Version</a></li>
|
152
|
+
<li><a href="#" id="filter5">CSS Grade</a></li>
|
153
|
+
</ul>
|
154
|
+
</div>
|
155
|
+
<input type="text" class="form-control" placeholder="Filter By Rendering Engine..." autocomplete="off">
|
156
|
+
</div>
|
157
|
+
</div>
|
158
|
+
<div class="form-group">
|
159
|
+
<div class="dropdown btn-group">
|
160
|
+
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Rendering Engine <span class="caret"></span></button>
|
161
|
+
<ul class="dropdown-menu">
|
162
|
+
<li><a href="#">Rendering Engine</a></li>
|
163
|
+
<li><a href="#">Browser</a></li>
|
164
|
+
<li><a href="#">Platform(s)</a></li>
|
165
|
+
<li><a href="#">Engine Version</a></li>
|
166
|
+
<li><a href="#">CSS Grade</a></li>
|
167
|
+
</ul>
|
168
|
+
</div>
|
169
|
+
<button class="btn btn-link" type="button">
|
170
|
+
<span class="fa fa-sort-alpha-asc"></span>
|
171
|
+
</button>
|
172
|
+
</div>
|
173
|
+
<div class="form-group">
|
174
|
+
<button class="btn btn-default" type="button" id="deleteRows1">Delete Rows</button>
|
175
|
+
<button class="btn btn-default" type="button" id="restoreRows1" disabled>Restore Rows</button>
|
176
|
+
<div class="dropdown btn-group dropdown-kebab-pf">
|
177
|
+
<button class="btn btn-link dropdown-toggle" type="button" id="dropdownKebab" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
178
|
+
<span class="fa fa-ellipsis-v"></span>
|
179
|
+
</button>
|
180
|
+
<ul class="dropdown-menu " aria-labelledby="dropdownKebab">
|
181
|
+
<li><a href="#">Action</a></li>
|
182
|
+
<li><a href="#">Another action</a></li>
|
183
|
+
<li><a href="#">Something else here</a></li>
|
184
|
+
<li role="separator" class="divider"></li>
|
185
|
+
<li><a href="#">Separated link</a></li>
|
186
|
+
</ul>
|
187
|
+
</div>
|
188
|
+
|
189
|
+
</div>
|
190
|
+
<div class="toolbar-pf-action-right">
|
191
|
+
<div class="form-group toolbar-pf-find">
|
192
|
+
<button class="btn btn-link btn-find" type="button">
|
193
|
+
<span class="fa fa-search"></span>
|
194
|
+
</button>
|
195
|
+
<div class="find-pf-dropdown-container">
|
196
|
+
<input type="text" class="form-control" id="find" placeholder="Find By Keyword...">
|
197
|
+
<div class="find-pf-buttons">
|
198
|
+
<span class="find-pf-nums">1 of 3</span>
|
199
|
+
<button class="btn btn-link" type="button">
|
200
|
+
<span class="fa fa-angle-up"></span>
|
201
|
+
</button>
|
202
|
+
<button class="btn btn-link" type="button">
|
203
|
+
<span class="fa fa-angle-down"></span>
|
204
|
+
</button>
|
205
|
+
<button class="btn btn-link btn-find-close" type="button">
|
206
|
+
<span class="pficon pficon-close"></span>
|
207
|
+
</button>
|
208
|
+
</div>
|
209
|
+
</div>
|
210
|
+
</div>
|
211
|
+
<div class="form-group toolbar-pf-view-selector">
|
212
|
+
<button class="btn btn-link active"><i class="fa fa-th"></i></button>
|
213
|
+
<button class="btn btn-link"><i class="fa fa-th-large"></i></button>
|
214
|
+
<button class="btn btn-link"><i class="fa fa-th-list"></i></button>
|
215
|
+
</div>
|
216
|
+
</div>
|
217
|
+
</form>
|
218
|
+
<div class="row toolbar-pf-results">
|
219
|
+
<div class="col-sm-9">
|
220
|
+
<div class="hidden">
|
221
|
+
<h5>0 Results</h5>
|
222
|
+
<p>Active filters:</p>
|
223
|
+
<ul class="list-inline"></ul>
|
224
|
+
<p><a href="#">Clear All Filters</a></p>
|
225
|
+
</div>
|
226
|
+
</div>
|
227
|
+
<div class="col-sm-3 table-view-pf-select-results">
|
228
|
+
<strong>0</strong> of <strong>0</strong> selected
|
229
|
+
</div>
|
230
|
+
</div>
|
231
|
+
</div>
|
232
|
+
</div>
|
233
|
+
</div>
|
234
|
+
|
235
|
+
<div class="col-sm-12">
|
236
|
+
<!-- Table HTML -->
|
237
|
+
<table class="table table-striped table-bordered table-hover" id="table1">
|
238
|
+
<thead>
|
239
|
+
<tr>
|
240
|
+
<th><label class="sr-only" for="selectAll">Select all rows</label><input type="checkbox" id="selectAll" name="selectAll"></th>
|
241
|
+
<th>Rendering Engine</th>
|
242
|
+
<th>Browser</th>
|
243
|
+
<th>Platform(s)</th>
|
244
|
+
<th>Engine Version</th>
|
245
|
+
<th>CSS Grade</th>
|
246
|
+
<th colspan="2">Actions</th>
|
247
|
+
</tr>
|
248
|
+
</thead>
|
249
|
+
</table>
|
250
|
+
|
251
|
+
<!-- Blank Slate HTML -->
|
252
|
+
<div class="blank-slate-pf table-view-pf-empty hidden" id="emptyState1">
|
253
|
+
<div class="blank-slate-pf-icon">
|
254
|
+
<span class="pficon pficon pficon-add-circle-o"></span>
|
255
|
+
</div>
|
256
|
+
<h1>
|
257
|
+
Empty State Title
|
258
|
+
</h1>
|
259
|
+
<p>
|
260
|
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
261
|
+
</p>
|
262
|
+
<p>
|
263
|
+
Learn more about this <a href="#">on the documentation</a>.
|
264
|
+
</p>
|
265
|
+
<div class="blank-slate-pf-main-action">
|
266
|
+
<button class="btn btn-primary btn-lg"> Main Action </button>
|
267
|
+
</div>
|
268
|
+
<div class="blank-slate-pf-secondary-action">
|
269
|
+
<button class="btn btn-default"> Secondary Action </button> <button class="btn btn-default"> Secondary Action </button> <button class="btn btn-default"> Secondary Action </button>
|
270
|
+
</div>
|
271
|
+
</div>
|
272
|
+
|
273
|
+
</div>
|
274
|
+
<script>
|
275
|
+
$(document).ready(function() {
|
276
|
+
|
277
|
+
// JSON data for Table View
|
278
|
+
var dataSet = [{
|
279
|
+
engine: "Trident",
|
280
|
+
browser: "Internet Explorer 4.0",
|
281
|
+
platforms: "Win 95+",
|
282
|
+
version: "4",
|
283
|
+
grade: "X"
|
284
|
+
},{
|
285
|
+
engine: "Trident",
|
286
|
+
browser: "Internet Explorer 5.0",
|
287
|
+
platforms: "Win 95+",
|
288
|
+
version: "5",
|
289
|
+
grade: "C"
|
290
|
+
}, {
|
291
|
+
engine: "Trident",
|
292
|
+
browser: "Internet Explorer 5.5",
|
293
|
+
platforms: "Win 95+",
|
294
|
+
version: "5.5",
|
295
|
+
grade: "A"
|
296
|
+
}, {
|
297
|
+
engine: "Trident",
|
298
|
+
browser: "Internet Explorer 6",
|
299
|
+
platforms: "Win 98+",
|
300
|
+
version: "6",
|
301
|
+
grade: "A"
|
302
|
+
}, {
|
303
|
+
engine: "Trident",
|
304
|
+
browser: "Internet Explorer 7",
|
305
|
+
platforms: "Win XP SP2+",
|
306
|
+
version: "7",
|
307
|
+
grade: "A"
|
308
|
+
}, {
|
309
|
+
engine: "Trident",
|
310
|
+
browser: "AOL browser (AOL desktop)",
|
311
|
+
platforms: "Win XP",
|
312
|
+
version: "6",
|
313
|
+
grade: "A"
|
314
|
+
}, {
|
315
|
+
engine: "Gecko",
|
316
|
+
browser: "Firefox 1.0",
|
317
|
+
platforms: "Win 98+ / OSX.2+",
|
318
|
+
version: "1.7",
|
319
|
+
grade: "A"
|
320
|
+
}, {
|
321
|
+
engine: "Gecko",
|
322
|
+
browser: "Firefox 1.5",
|
323
|
+
platforms: "Win 98+ / OSX.2+",
|
324
|
+
version: "1.8",
|
325
|
+
grade: "A"
|
326
|
+
}, {
|
327
|
+
engine: "Gecko",
|
328
|
+
browser: "Firefox 2.0",
|
329
|
+
platforms: "Win 98+ / OSX.2+",
|
330
|
+
version: "1.8",
|
331
|
+
grade: "A"
|
332
|
+
}, {
|
333
|
+
engine: "Gecko",
|
334
|
+
browser: "Firefox 3.0",
|
335
|
+
platforms: "Win 2k+ / OSX.3+",
|
336
|
+
version: "1.9",
|
337
|
+
grade: "A"
|
338
|
+
}, {
|
339
|
+
engine: "Gecko",
|
340
|
+
browser: "Camino 1.0",
|
341
|
+
platforms: "OSX.2+",
|
342
|
+
version: "1.8",
|
343
|
+
grade: "A"
|
344
|
+
}, {
|
345
|
+
engine: "Gecko",
|
346
|
+
browser: "Camino 1.5",
|
347
|
+
platforms: "OSX.3+",
|
348
|
+
version: "1.8",
|
349
|
+
grade: "A"
|
350
|
+
}, {
|
351
|
+
engine: "Gecko",
|
352
|
+
browser: "Netscape 7.2",
|
353
|
+
platforms: "Win 95+ / Mac OS 8.6-9.2",
|
354
|
+
version: "1.7",
|
355
|
+
grade: "A"
|
356
|
+
}, {
|
357
|
+
engine: "Gecko",
|
358
|
+
browser: "Netscape Browser 8",
|
359
|
+
platforms: "Win 98SE+",
|
360
|
+
version: "1.7",
|
361
|
+
grade: "A"
|
362
|
+
}, {
|
363
|
+
engine: "Gecko",
|
364
|
+
browser: "Netscape Navigator 9",
|
365
|
+
platforms: "Win 98+ / OSX.2+",
|
366
|
+
version: "1.8",
|
367
|
+
grade: "A"
|
368
|
+
}, {
|
369
|
+
engine: "Gecko",
|
370
|
+
browser: "Mozilla 1.0",
|
371
|
+
platforms: "Win 95+ / OSX.1+",
|
372
|
+
version: "1",
|
373
|
+
grade: "A"
|
374
|
+
}, {
|
375
|
+
engine: "Gecko",
|
376
|
+
browser: "Mozilla 1.1",
|
377
|
+
platforms: "Win 95+ / OSX.1+",
|
378
|
+
version: "1.1",
|
379
|
+
grade: "A"
|
380
|
+
}, {
|
381
|
+
engine: "Gecko",
|
382
|
+
browser: "Mozilla 1.2",
|
383
|
+
platforms: "Win 95+ / OSX.1+",
|
384
|
+
version: "1.2",
|
385
|
+
grade: "A"
|
386
|
+
}];
|
387
|
+
|
388
|
+
// DataTable Config
|
389
|
+
$("#table1").DataTable({
|
390
|
+
columns: [
|
391
|
+
{ data: null,
|
392
|
+
className: "table-view-pf-select",
|
393
|
+
render: function (data, type, full, meta) {
|
394
|
+
// Select row checkbox renderer
|
395
|
+
var id = "select" + meta.row;
|
396
|
+
return '<label class="sr-only" for="' + id + '">Select row ' + meta.row +
|
397
|
+
'</label><input type="checkbox" id="' + id + '" name="' + id + '">';
|
398
|
+
},
|
399
|
+
sortable: false
|
400
|
+
},
|
401
|
+
{ data: "engine" },
|
402
|
+
{ data: "browser" },
|
403
|
+
{ data: "platforms" },
|
404
|
+
{ data: "version" },
|
405
|
+
{ data: "grade"},
|
406
|
+
{ data: null,
|
407
|
+
className: "table-view-pf-actions",
|
408
|
+
render: function (data, type, full, meta) {
|
409
|
+
// Inline action button renderer
|
410
|
+
return '<div class="table-view-pf-btn"><button class="btn btn-default" type="button">Actions</button></div>';
|
411
|
+
}
|
412
|
+
}, {
|
413
|
+
data: null,
|
414
|
+
className: "table-view-pf-actions",
|
415
|
+
render: function (data, type, full, meta) {
|
416
|
+
// Inline action kebab renderer
|
417
|
+
return '<div class="dropdown dropdown-kebab-pf">' +
|
418
|
+
'<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">' +
|
419
|
+
'<span class="fa fa-ellipsis-v"></span></button>' +
|
420
|
+
'<ul class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownKebabRight">' +
|
421
|
+
'<li><a href="#">Action</a></li>' +
|
422
|
+
'<li><a href="#">Another action</a></li>' +
|
423
|
+
'<li><a href="#">Something else here</a></li>' +
|
424
|
+
'<li role="separator" class="divider"></li>' +
|
425
|
+
'<li><a href="#">Separated link</a></li></ul></div>';
|
426
|
+
}
|
427
|
+
}
|
428
|
+
],
|
429
|
+
data: dataSet,
|
430
|
+
dom: "t",
|
431
|
+
language: {
|
432
|
+
zeroRecords: "No records found"
|
433
|
+
},
|
434
|
+
order: [[ 1, 'asc' ]],
|
435
|
+
pfConfig: {
|
436
|
+
emptyStateSelector: "#emptyState1",
|
437
|
+
filterCols: [
|
438
|
+
null,
|
439
|
+
{
|
440
|
+
default: true,
|
441
|
+
optionSelector: "#filter1",
|
442
|
+
placeholder: "Filter By Rendering Engine..."
|
443
|
+
}, {
|
444
|
+
optionSelector: "#filter2",
|
445
|
+
placeholder: "Filter By Browser..."
|
446
|
+
}, {
|
447
|
+
optionSelector: "#filter3",
|
448
|
+
placeholder: "Filter By Platform(s)..."
|
449
|
+
}, {
|
450
|
+
optionSelector: "#filter4",
|
451
|
+
placeholder: "Filter By Engine Version..."
|
452
|
+
}, {
|
453
|
+
optionSelector: "#filter5",
|
454
|
+
placeholder: "Filter By CSS Grade..."
|
455
|
+
}
|
456
|
+
],
|
457
|
+
toolbarSelector: "#toolbar1",
|
458
|
+
selectAllSelector: 'th:first-child input[type="checkbox"]'
|
459
|
+
},
|
460
|
+
select: {
|
461
|
+
selector: 'td:first-child input[type="checkbox"]',
|
462
|
+
style: 'multi'
|
463
|
+
},
|
464
|
+
});
|
465
|
+
|
466
|
+
/**
|
467
|
+
* Utility to show empty Table View
|
468
|
+
*
|
469
|
+
* @param {object} config - Config properties associated with a Table View
|
470
|
+
* @param {object} config.data - Data set for DataTable
|
471
|
+
* @param {string} config.deleteRowsSelector - Selector for delete rows control
|
472
|
+
* @param {string} config.restoreRowsSelector - Selector for restore rows control
|
473
|
+
* @param {string} config.tableSelector - Selector for the HTML table
|
474
|
+
*/
|
475
|
+
var emptyTableViewUtil = function (config) {
|
476
|
+
var self = this;
|
477
|
+
|
478
|
+
this.dt = $(config.tableSelector).DataTable(); // DataTable
|
479
|
+
this.deleteRows = $(config.deleteRowsSelector); // Delete rows control
|
480
|
+
this.restoreRows = $(config.restoreRowsSelector); // Restore rows control
|
481
|
+
|
482
|
+
// Handle click on delete rows control
|
483
|
+
this.deleteRows.on('click', function() {
|
484
|
+
self.dt.clear().draw();
|
485
|
+
$(self.restoreRows).prop("disabled", false);
|
486
|
+
});
|
487
|
+
|
488
|
+
// Handle click on restore rows control
|
489
|
+
this.restoreRows.on('click', function() {
|
490
|
+
self.dt.rows.add(config.data).draw();
|
491
|
+
$(this).prop("disabled", true);
|
492
|
+
});
|
493
|
+
|
494
|
+
// Initialize restore rows
|
495
|
+
if (this.dt.data().length === 0) {
|
496
|
+
$(this.restoreRows).prop("disabled", false);
|
497
|
+
}
|
498
|
+
};
|
499
|
+
|
500
|
+
// Initialize empty Table View util
|
501
|
+
new emptyTableViewUtil({
|
502
|
+
data: dataSet,
|
503
|
+
deleteRowsSelector: "#deleteRows1",
|
504
|
+
restoreRowsSelector: "#restoreRows1",
|
505
|
+
tableSelector: "#table1"
|
506
|
+
});
|
507
|
+
|
508
|
+
/**
|
509
|
+
* Utility to find items in Table View
|
510
|
+
*/
|
511
|
+
var findTableViewUtil = function (config) {
|
512
|
+
// Upon clicking the find button, show the find dropdown content
|
513
|
+
$(".btn-find").click(function () {
|
514
|
+
$(this).parent().find(".find-pf-dropdown-container").toggle();
|
515
|
+
});
|
516
|
+
|
517
|
+
// Upon clicking the find close button, hide the find dropdown content
|
518
|
+
$(".btn-find-close").click(function () {
|
519
|
+
$(".find-pf-dropdown-container").hide();
|
520
|
+
});
|
521
|
+
};
|
522
|
+
|
523
|
+
// Initialize find util
|
524
|
+
new findTableViewUtil();
|
525
|
+
|
526
|
+
});
|
527
|
+
</script>
|
528
|
+
|
529
|
+
|
530
|
+
|
531
|
+
</body>
|
532
|
+
</html>
|