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
@@ -0,0 +1,422 @@
|
|
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 - 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
|
+
<div class="container">
|
42
|
+
<div class="page-header">
|
43
|
+
<h1>Table View</h1>
|
44
|
+
</div>
|
45
|
+
<div class="alert alert-warning">
|
46
|
+
<span class="pficon pficon-warning-triangle-o"></span>
|
47
|
+
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>.
|
48
|
+
</div>
|
49
|
+
<hr>
|
50
|
+
<!-- Toolbar -->
|
51
|
+
<div class="row toolbar-pf table-view-pf-toolbar" id="toolbar1">
|
52
|
+
<div class="col-sm-12">
|
53
|
+
<form class="toolbar-pf-actions">
|
54
|
+
<div class="form-group toolbar-pf-filter">
|
55
|
+
<label class="sr-only" for="filter">Rendering Engine</label>
|
56
|
+
<div class="input-group">
|
57
|
+
<div class="input-group-btn">
|
58
|
+
<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>
|
59
|
+
<ul class="dropdown-menu">
|
60
|
+
<li><a href="#" id="filter1">Rendering Engine</a></li>
|
61
|
+
<li><a href="#" id="filter2">Browser</a></li>
|
62
|
+
<li><a href="#" id="filter3">Platform(s)</a></li>
|
63
|
+
<li><a href="#" id="filter4">Engine Version</a></li>
|
64
|
+
<li><a href="#" id="filter5">CSS Grade</a></li>
|
65
|
+
</ul>
|
66
|
+
</div>
|
67
|
+
<input type="text" class="form-control" placeholder="Filter By Rendering Engine..." autocomplete="off" id="filterInput">
|
68
|
+
</div>
|
69
|
+
</div>
|
70
|
+
<div class="form-group">
|
71
|
+
<button class="btn btn-default" type="button" id="deleteRows1">Delete Rows</button>
|
72
|
+
<button class="btn btn-default" type="button" id="restoreRows1" disabled>Restore Rows</button>
|
73
|
+
<div class="dropdown btn-group dropdown-kebab-pf">
|
74
|
+
<button class="btn btn-link dropdown-toggle" type="button" id="dropdownKebab" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
75
|
+
<span class="fa fa-ellipsis-v"></span>
|
76
|
+
</button>
|
77
|
+
<ul class="dropdown-menu " aria-labelledby="dropdownKebab">
|
78
|
+
<li><a href="#">Action</a></li>
|
79
|
+
<li><a href="#">Another action</a></li>
|
80
|
+
<li><a href="#">Something else here</a></li>
|
81
|
+
<li role="separator" class="divider"></li>
|
82
|
+
<li><a href="#">Separated link</a></li>
|
83
|
+
</ul>
|
84
|
+
</div>
|
85
|
+
|
86
|
+
</div>
|
87
|
+
<div class="toolbar-pf-action-right">
|
88
|
+
<div class="form-group toolbar-pf-find">
|
89
|
+
<button class="btn btn-link btn-find" type="button">
|
90
|
+
<span class="fa fa-search"></span>
|
91
|
+
</button>
|
92
|
+
<div class="find-pf-dropdown-container">
|
93
|
+
<input type="text" class="form-control" id="find" placeholder="Find By Keyword...">
|
94
|
+
<div class="find-pf-buttons">
|
95
|
+
<span class="find-pf-nums">1 of 3</span>
|
96
|
+
<button class="btn btn-link" type="button">
|
97
|
+
<span class="fa fa-angle-up"></span>
|
98
|
+
</button>
|
99
|
+
<button class="btn btn-link" type="button">
|
100
|
+
<span class="fa fa-angle-down"></span>
|
101
|
+
</button>
|
102
|
+
<button class="btn btn-link btn-find-close" type="button">
|
103
|
+
<span class="pficon pficon-close"></span>
|
104
|
+
</button>
|
105
|
+
</div>
|
106
|
+
</div>
|
107
|
+
</div>
|
108
|
+
</div>
|
109
|
+
</form>
|
110
|
+
<div class="row toolbar-pf-results">
|
111
|
+
<div class="col-sm-9">
|
112
|
+
<div class="hidden">
|
113
|
+
<h5>0 Results</h5>
|
114
|
+
<p>Active filters:</p>
|
115
|
+
<ul class="list-inline"></ul>
|
116
|
+
<p><a href="#">Clear All Filters</a></p>
|
117
|
+
</div>
|
118
|
+
</div>
|
119
|
+
<div class="col-sm-3 table-view-pf-select-results">
|
120
|
+
<strong>0</strong> of <strong>0</strong> selected
|
121
|
+
</div>
|
122
|
+
</div>
|
123
|
+
</div>
|
124
|
+
</div>
|
125
|
+
|
126
|
+
<!-- Table HTML -->
|
127
|
+
<table class="table table-striped table-bordered table-hover" id="table1">
|
128
|
+
<thead>
|
129
|
+
<tr>
|
130
|
+
<th><label class="sr-only" for="selectAll">Select all rows</label><input type="checkbox" id="selectAll" name="selectAll"></th>
|
131
|
+
<th>Rendering Engine</th>
|
132
|
+
<th>Browser</th>
|
133
|
+
<th>Platform(s)</th>
|
134
|
+
<th>Engine Version</th>
|
135
|
+
<th>CSS Grade</th>
|
136
|
+
<th colspan="2">Actions</th>
|
137
|
+
</tr>
|
138
|
+
</thead>
|
139
|
+
</table>
|
140
|
+
|
141
|
+
<!-- Blank Slate HTML -->
|
142
|
+
<div class="blank-slate-pf table-view-pf-empty hidden" id="emptyState1">
|
143
|
+
<div class="blank-slate-pf-icon">
|
144
|
+
<span class="pficon pficon pficon-add-circle-o"></span>
|
145
|
+
</div>
|
146
|
+
<h1>
|
147
|
+
Empty State Title
|
148
|
+
</h1>
|
149
|
+
<p>
|
150
|
+
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.
|
151
|
+
</p>
|
152
|
+
<p>
|
153
|
+
Learn more about this <a href="#">on the documentation</a>.
|
154
|
+
</p>
|
155
|
+
<div class="blank-slate-pf-main-action">
|
156
|
+
<button class="btn btn-primary btn-lg"> Main Action </button>
|
157
|
+
</div>
|
158
|
+
<div class="blank-slate-pf-secondary-action">
|
159
|
+
<button class="btn btn-default"> Secondary Action </button> <button class="btn btn-default"> Secondary Action </button> <button class="btn btn-default"> Secondary Action </button>
|
160
|
+
</div>
|
161
|
+
</div>
|
162
|
+
|
163
|
+
<script>
|
164
|
+
$(document).ready(function() {
|
165
|
+
|
166
|
+
// JSON data for Table View
|
167
|
+
var dataSet = [{
|
168
|
+
engine: "Trident",
|
169
|
+
browser: "Internet Explorer 4.0",
|
170
|
+
platforms: "Win 95+",
|
171
|
+
version: "4",
|
172
|
+
grade: "X"
|
173
|
+
},{
|
174
|
+
engine: "Trident",
|
175
|
+
browser: "Internet Explorer 5.0",
|
176
|
+
platforms: "Win 95+",
|
177
|
+
version: "5",
|
178
|
+
grade: "C"
|
179
|
+
}, {
|
180
|
+
engine: "Trident",
|
181
|
+
browser: "Internet Explorer 5.5",
|
182
|
+
platforms: "Win 95+",
|
183
|
+
version: "5.5",
|
184
|
+
grade: "A"
|
185
|
+
}, {
|
186
|
+
engine: "Trident",
|
187
|
+
browser: "Internet Explorer 6",
|
188
|
+
platforms: "Win 98+",
|
189
|
+
version: "6",
|
190
|
+
grade: "A"
|
191
|
+
}, {
|
192
|
+
engine: "Trident",
|
193
|
+
browser: "Internet Explorer 7",
|
194
|
+
platforms: "Win XP SP2+",
|
195
|
+
version: "7",
|
196
|
+
grade: "A"
|
197
|
+
}, {
|
198
|
+
engine: "Trident",
|
199
|
+
browser: "AOL browser (AOL desktop)",
|
200
|
+
platforms: "Win XP",
|
201
|
+
version: "6",
|
202
|
+
grade: "A"
|
203
|
+
}, {
|
204
|
+
engine: "Gecko",
|
205
|
+
browser: "Firefox 1.0",
|
206
|
+
platforms: "Win 98+ / OSX.2+",
|
207
|
+
version: "1.7",
|
208
|
+
grade: "A"
|
209
|
+
}, {
|
210
|
+
engine: "Gecko",
|
211
|
+
browser: "Firefox 1.5",
|
212
|
+
platforms: "Win 98+ / OSX.2+",
|
213
|
+
version: "1.8",
|
214
|
+
grade: "A"
|
215
|
+
}, {
|
216
|
+
engine: "Gecko",
|
217
|
+
browser: "Firefox 2.0",
|
218
|
+
platforms: "Win 98+ / OSX.2+",
|
219
|
+
version: "1.8",
|
220
|
+
grade: "A"
|
221
|
+
}, {
|
222
|
+
engine: "Gecko",
|
223
|
+
browser: "Firefox 3.0",
|
224
|
+
platforms: "Win 2k+ / OSX.3+",
|
225
|
+
version: "1.9",
|
226
|
+
grade: "A"
|
227
|
+
}, {
|
228
|
+
engine: "Gecko",
|
229
|
+
browser: "Camino 1.0",
|
230
|
+
platforms: "OSX.2+",
|
231
|
+
version: "1.8",
|
232
|
+
grade: "A"
|
233
|
+
}, {
|
234
|
+
engine: "Gecko",
|
235
|
+
browser: "Camino 1.5",
|
236
|
+
platforms: "OSX.3+",
|
237
|
+
version: "1.8",
|
238
|
+
grade: "A"
|
239
|
+
}, {
|
240
|
+
engine: "Gecko",
|
241
|
+
browser: "Netscape 7.2",
|
242
|
+
platforms: "Win 95+ / Mac OS 8.6-9.2",
|
243
|
+
version: "1.7",
|
244
|
+
grade: "A"
|
245
|
+
}, {
|
246
|
+
engine: "Gecko",
|
247
|
+
browser: "Netscape Browser 8",
|
248
|
+
platforms: "Win 98SE+",
|
249
|
+
version: "1.7",
|
250
|
+
grade: "A"
|
251
|
+
}, {
|
252
|
+
engine: "Gecko",
|
253
|
+
browser: "Netscape Navigator 9",
|
254
|
+
platforms: "Win 98+ / OSX.2+",
|
255
|
+
version: "1.8",
|
256
|
+
grade: "A"
|
257
|
+
}, {
|
258
|
+
engine: "Gecko",
|
259
|
+
browser: "Mozilla 1.0",
|
260
|
+
platforms: "Win 95+ / OSX.1+",
|
261
|
+
version: "1",
|
262
|
+
grade: "A"
|
263
|
+
}, {
|
264
|
+
engine: "Gecko",
|
265
|
+
browser: "Mozilla 1.1",
|
266
|
+
platforms: "Win 95+ / OSX.1+",
|
267
|
+
version: "1.1",
|
268
|
+
grade: "A"
|
269
|
+
}, {
|
270
|
+
engine: "Gecko",
|
271
|
+
browser: "Mozilla 1.2",
|
272
|
+
platforms: "Win 95+ / OSX.1+",
|
273
|
+
version: "1.2",
|
274
|
+
grade: "A"
|
275
|
+
}];
|
276
|
+
|
277
|
+
// DataTable Config
|
278
|
+
$("#table1").DataTable({
|
279
|
+
columns: [
|
280
|
+
{ data: null,
|
281
|
+
className: "table-view-pf-select",
|
282
|
+
render: function (data, type, full, meta) {
|
283
|
+
// Select row checkbox renderer
|
284
|
+
var id = "select" + meta.row;
|
285
|
+
return '<label class="sr-only" for="' + id + '">Select row ' + meta.row +
|
286
|
+
'</label><input type="checkbox" id="' + id + '" name="' + id + '">';
|
287
|
+
},
|
288
|
+
sortable: false
|
289
|
+
},
|
290
|
+
{ data: "engine" },
|
291
|
+
{ data: "browser" },
|
292
|
+
{ data: "platforms" },
|
293
|
+
{ data: "version" },
|
294
|
+
{ data: "grade"},
|
295
|
+
{ data: null,
|
296
|
+
className: "table-view-pf-actions",
|
297
|
+
render: function (data, type, full, meta) {
|
298
|
+
// Inline action button renderer
|
299
|
+
return '<div class="table-view-pf-btn"><button class="btn btn-default" type="button">Actions</button></div>';
|
300
|
+
}
|
301
|
+
}, {
|
302
|
+
data: null,
|
303
|
+
className: "table-view-pf-actions",
|
304
|
+
render: function (data, type, full, meta) {
|
305
|
+
// Inline action kebab renderer
|
306
|
+
return '<div class="dropdown dropdown-kebab-pf">' +
|
307
|
+
'<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">' +
|
308
|
+
'<span class="fa fa-ellipsis-v"></span></button>' +
|
309
|
+
'<ul class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownKebabRight">' +
|
310
|
+
'<li><a href="#">Action</a></li>' +
|
311
|
+
'<li><a href="#">Another action</a></li>' +
|
312
|
+
'<li><a href="#">Something else here</a></li>' +
|
313
|
+
'<li role="separator" class="divider"></li>' +
|
314
|
+
'<li><a href="#">Separated link</a></li></ul></div>';
|
315
|
+
}
|
316
|
+
}
|
317
|
+
],
|
318
|
+
data: dataSet,
|
319
|
+
dom: "t",
|
320
|
+
language: {
|
321
|
+
zeroRecords: "No records found"
|
322
|
+
},
|
323
|
+
order: [[ 1, 'asc' ]],
|
324
|
+
pfConfig: {
|
325
|
+
emptyStateSelector: "#emptyState1",
|
326
|
+
filterCols: [
|
327
|
+
null,
|
328
|
+
{
|
329
|
+
default: true,
|
330
|
+
optionSelector: "#filter1",
|
331
|
+
placeholder: "Filter By Rendering Engine..."
|
332
|
+
}, {
|
333
|
+
optionSelector: "#filter2",
|
334
|
+
placeholder: "Filter By Browser..."
|
335
|
+
}, {
|
336
|
+
optionSelector: "#filter3",
|
337
|
+
placeholder: "Filter By Platform(s)..."
|
338
|
+
}, {
|
339
|
+
optionSelector: "#filter4",
|
340
|
+
placeholder: "Filter By Engine Version..."
|
341
|
+
}, {
|
342
|
+
optionSelector: "#filter5",
|
343
|
+
placeholder: "Filter By CSS Grade..."
|
344
|
+
}
|
345
|
+
],
|
346
|
+
toolbarSelector: "#toolbar1",
|
347
|
+
selectAllSelector: 'th:first-child input[type="checkbox"]'
|
348
|
+
},
|
349
|
+
select: {
|
350
|
+
selector: 'td:first-child input[type="checkbox"]',
|
351
|
+
style: 'multi'
|
352
|
+
},
|
353
|
+
});
|
354
|
+
|
355
|
+
/**
|
356
|
+
* Utility to show empty Table View
|
357
|
+
*
|
358
|
+
* @param {object} config - Config properties associated with a Table View
|
359
|
+
* @param {object} config.data - Data set for DataTable
|
360
|
+
* @param {string} config.deleteRowsSelector - Selector for delete rows control
|
361
|
+
* @param {string} config.restoreRowsSelector - Selector for restore rows control
|
362
|
+
* @param {string} config.tableSelector - Selector for the HTML table
|
363
|
+
*/
|
364
|
+
var emptyTableViewUtil = function (config) {
|
365
|
+
var self = this;
|
366
|
+
|
367
|
+
this.dt = $(config.tableSelector).DataTable(); // DataTable
|
368
|
+
this.deleteRows = $(config.deleteRowsSelector); // Delete rows control
|
369
|
+
this.restoreRows = $(config.restoreRowsSelector); // Restore rows control
|
370
|
+
|
371
|
+
// Handle click on delete rows control
|
372
|
+
this.deleteRows.on('click', function() {
|
373
|
+
self.dt.clear().draw();
|
374
|
+
$(self.restoreRows).prop("disabled", false);
|
375
|
+
});
|
376
|
+
|
377
|
+
// Handle click on restore rows control
|
378
|
+
this.restoreRows.on('click', function() {
|
379
|
+
self.dt.rows.add(config.data).draw();
|
380
|
+
$(this).prop("disabled", true);
|
381
|
+
});
|
382
|
+
|
383
|
+
// Initialize restore rows
|
384
|
+
if (this.dt.data().length === 0) {
|
385
|
+
$(this.restoreRows).prop("disabled", false);
|
386
|
+
}
|
387
|
+
};
|
388
|
+
|
389
|
+
// Initialize empty Table View util
|
390
|
+
new emptyTableViewUtil({
|
391
|
+
data: dataSet,
|
392
|
+
deleteRowsSelector: "#deleteRows1",
|
393
|
+
restoreRowsSelector: "#restoreRows1",
|
394
|
+
tableSelector: "#table1"
|
395
|
+
});
|
396
|
+
|
397
|
+
/**
|
398
|
+
* Utility to find items in Table View
|
399
|
+
*/
|
400
|
+
var findTableViewUtil = function (config) {
|
401
|
+
// Upon clicking the find button, show the find dropdown content
|
402
|
+
$(".btn-find").click(function () {
|
403
|
+
$(this).parent().find(".find-pf-dropdown-container").toggle();
|
404
|
+
});
|
405
|
+
|
406
|
+
// Upon clicking the find close button, hide the find dropdown content
|
407
|
+
$(".btn-find-close").click(function () {
|
408
|
+
$(".find-pf-dropdown-container").hide();
|
409
|
+
});
|
410
|
+
};
|
411
|
+
|
412
|
+
// Initialize find util
|
413
|
+
new findTableViewUtil();
|
414
|
+
|
415
|
+
});
|
416
|
+
</script>
|
417
|
+
|
418
|
+
|
419
|
+
|
420
|
+
</div><!-- /container -->
|
421
|
+
</body>
|
422
|
+
</html>
|
data/spec/html/tables.html
CHANGED
@@ -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="../../dist/js/patternfly.min.js"></script>
|
data/spec/html/tabs.html
CHANGED
@@ -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="../../dist/js/patternfly.min.js"></script>
|
data/spec/html/time-picker.html
CHANGED
@@ -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="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.14.1/moment.min.js"></script>
|
data/spec/html/toast.html
CHANGED
@@ -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="../../dist/js/patternfly.min.js"></script>
|