forked from mozilla/standards-positions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
387 lines (349 loc) · 14.2 KB
/
index.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Mozilla Specification Positions</title>
<link href="node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="node_modules/datatables/media/css/jquery.dataTables.min.css" rel="stylesheet">
<style>
@font-face {
font-family: "Zilla Slab";
font-weight: bold;
src: url("asset/ZillaSlab-Bold.woff2") format("woff2");
}
.jumbotron h1 {
font-weight: bold;
font-family: "Zilla Slab", serif;
}
/* align sizes with bootstrap's grid snapping of .container */
@media (min-width: 768px) { .jumbotron h1 { font-size: 42px; } }
@media (min-width: 992px) { .jumbotron h1 { font-size: 58px; } }
@media (min-width: 1200px) { .jumbotron h1 { font-size: 72px; } }
.space dt {
padding-bottom: 5px;
}
table.dataTable > tbody > tr:target,
table.dataTable > tbody > tr.shown:target + tr {
background: #fd0;
}
tr:not(:hover):not(:focus-within) > .link-control > a {
visibility: hidden;
}
.clipicon {
width: 1em;
height: 1em;
background: currentColor;
}
.clipicon-MDN {
-webkit-mask: url(asset/MDN.svg) center no-repeat;
mask: url(asset/MDN.svg) center no-repeat;
width: 1.20833em;
}
#showall { display: none; }
</style>
</head>
<body>
<div class="container">
<br>
<div class="jumbotron">
<h1><img src="asset/Mozilla.svg" style="height: 1.04em; vertical-align: -0.23em;" alt="Mozilla"> Specification Positions</h1>
<p>This page tracks Mozilla's positions on open Web and Web-related specifications submitted to standards
bodies like the <a href="https://www.ietf.org/">IETF</a>, <a href="https://w3.org/">W3C</a>,
and <a href="https://tc39.github.io/">Ecma TC39</a>.</p>
<p>Please remember, this isn't a commitment to implement or participate;
<strong>it's just what we think right now</strong>. See <a
href="https://groups.google.com/a/mozilla.org/g/dev-platform/">dev-platform</a>
to find out what we're implementing.</p>
<p><mark>Want Mozilla's position on a specification? <a href="https://github.com/mozilla/standards-positions/">Find out more</a>.</mark></p>
</div>
<div class="col-sm-1"></div>
<div class="col-sm-10">
<div>
<a class="btn btn-primary" href="javascript:open_all()">Expand All</a>
<a class="btn btn-primary" href="javascript:close_all()">Collapse All</a>
<a class="btn btn-primary" href="javascript:show_all()" id="showall">Show All</a>
</div>
<table id="mozPositions" class="table table-hover dataTable">
<thead>
<tr>
<th></th>
<th></th>
<th></th>
<th class="sorting">Specification</th>
<th class="sorting">Mozilla Position</th>
<th>More Info</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div class="col-sm-1"></div>
<div class="clearfix"></div>
<h3>legend</h3>
<p>The possible positions are:</p>
<dl class="dl-horizontal space">
<dt><button class="btn btn-success btn-xs position">positive</button></dt><dd>Mozilla regards this work as a potential improvement to the web.</dd>
<dt><button class="btn btn-default btn-xs position">neutral</button></dt><dd>Mozilla is not convinced of the merits of this work, but does not see any significant negative potential.</dd>
<dt><button class="btn btn-danger btn-xs position">negative</button></dt><dd>Mozilla believes that pursuing this work in its current form would not be good for the web.</dd>
<dt><button class="btn btn-warning btn-xs position">defer</button></dt><dd>Mozilla takes no position on this work.</dd>
<dt><button class="btn btn-dark btn-xs position">under consideration</button></dt><dd>Mozilla has not taken a position on this work and is gathering more information.</dd>
</dl>
</div>
<script src="node_modules/jquery/dist/jquery.min.js"></script>
<script src="node_modules/datatables/media/js/jquery.dataTables.min.js"></script>
<script src="components/datatables-plugins/sorting/enum.js"></script>
<script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
<script>
var gFirstTableRender = true;
$(document).ready(function(){
var status_styles = {
"positive": "success",
"neutral": "default",
"negative": "danger",
"defer": "warning",
"under consideration": "dark",
}
var REPO_OWNER = "mozilla";
var REPO_NAME = "standards-positions";
function iconLink(url, text, icon, options) {
var iconClasses;
if (options && options.custom) {
iconClasses = `glyphicon clipicon clipicon-${icon}`;
} else {
iconClasses = `glyphicon glyphicon-${icon}`;
}
/* glyphicons documented at https://getbootstrap.com/docs/3.3/components/#glyphicons */
return `<a href='${url || "javascript:void(0)"}' title='${text}'>`
+ `<span class='${iconClasses}' aria-hidden='true'></span>`
+ `<span class='sr-only'>${text}</span></a> `;
}
$.fn.dataTable.enum( [ "under consideration", "positive",
"neutral", "negative", "defer" ] );
var ptable = $('#mozPositions').DataTable({
"paging": false,
"ajax": {
url: 'activities.json',
dataSrc: ''
},
dom: 'ilfrtip',
rowId: 'id',
"order": [[4, "asc"]],
"columns": [
{
"className": 'expand-control',
"orderable": false,
"data": null,
"defaultContent": '',
"render": function (data, type, row, meta) {
if ((row.description && row.description !== "") ||
(row.mozPositionDetail && row.mozPositionDetail !== "")) {
if (row.shown) {
return iconLink(`javascript:close_row(${meta.row})`, "Collapse", "triangle-bottom");
} else {
return iconLink(`javascript:open_row(${meta.row})`, 'Expand', 'triangle-right');
}
} else {
return ""
}
}
},
{
"className": 'link-control',
"data": null,
"defaultContent": '',
"render": function (data, type, row, meta) {
var id = data.id;
if (id != "") {
return iconLink('#' + id, 'link', 'link');
}
return "";
},
"orderable": false,
"searchable": false
},
{
"className": "dt-body-center",
"data": "org",
"render": function (data, type, row, meta) {
if (type !== "display") {
return data;
}
if (data !== "") {
var extension = ".svg"
if (data === "Proposal") {
return iconLink(null, 'Proposal', 'user');
}
if (data === "Ecma") {
data = "JS"
}
return `<img src='asset/${data}${extension}' height='18px' alt='${data}'>`
} else {
return ""
}
},
"orderable": true,
"searchable": false
},
{
"data": "title",
"render": function (data, type, row, meta) {
if (type !== "display") {
return data;
}
return "<a href='" + row.url + "'>" + data + "</a>"
},
"orderable": true,
"searchable": true
},
{
"name": "mozPosition",
"data": "mozPosition",
"type": "enum-0",
"render": function (data, type, row, meta) {
if (type !== "display") {
return data;
}
if (data !== "" && ! status_styles.hasOwnProperty(data)) {
console.log("WARNING: unrecognised position '" + data + "' on " + row.name);
}
return "<button type='button' class='btn btn-xs position btn-" + status_styles[data] +
"'>" + data + "</button>";
},
"orderable": true
},
{
"data": "null",
"render": function (data, type, row, meta) {
var out = "";
if (row.mozPositionIssue && row.mozPositionIssue !== "") {
out += iconLink(`https://github.com/${REPO_OWNER}/${REPO_NAME}/issues/${row.mozPositionIssue}`, 'position discussion', 'comment');
}
if (row.mozBugUrl && row.mozBugUrl !== "") {
// Allow either a string or an array of strings.
var bugArray = row.mozBugUrl;
if (!Array.isArray(bugArray)) {
bugArray = [bugArray];
}
for (var bug of bugArray) {
out += iconLink(bug, 'mozilla bug', 'wrench');
}
}
if (row.mdnUrl && row.mdnUrl !== "") {
// Allow either a string or an array of strings.
var mdnArray = row.mdnUrl;
if (!Array.isArray(mdnArray)) {
mdnArray = [mdnArray];
}
for (var mdn of mdnArray) {
out += iconLink(mdn, 'MDN', "MDN", { custom: true });
}
}
if (row.ciuName && row.ciuName !== "") {
out += iconLink(`https://caniuse.com/${row.ciuName}`, 'caniuse', 'tasks');
}
return out;
},
"orderable": false,
"searchable": false
}
]
})
function format ( d ) {
// `d` is the original data object for the row
var out = [];
if (d.description && d.description !== "") {
out.push('<dt>Description</dt>' +
'<dd>' + d.description + '</dd>')
}
if (d.mozPositionDetail && d.mozPositionDetail !== "") {
out.push('<dt>Mozilla\'s Position</dt>' +
'<dd>' + d.mozPositionDetail + '</dd>')
}
if (out.length > 0) {
return '<dl class="dl-horizontal">' + out.join("\n")+ '</dl>'
}
}
window.open_all = function() {
ptable.rows().every( function(rowIndex, tableLoop, rowLoop) {
open_row(rowIndex);
});
}
window.open_row = function(row_selector) {
var row = ptable.row(row_selector);
var data = row.data();
var extra_data = format(data);
if (extra_data !== "") {
var tr = row.node();
data.shown = true;
ptable.cell(tr, 0).invalidate();
row.child( extra_data ).show();
tr.classList.add('shown');
}
}
window.close_all = function() {
ptable.rows().every( function(rowIndex, tableLoop, rowLoop) {
close_row(rowIndex);
});
}
window.close_row = function(row_selector) {
var row = ptable.row(row_selector);
var data = row.data();
var tr = row.node();
data.shown = false;
ptable.cell(tr, 0).invalidate();
row.child.hide();
tr.classList.remove('shown');
}
window.filterPosition = function(e) {
e.preventDefault();
ptable.columns('mozPosition:name').search(e.target.innerText).draw();
// Calling .show() sets display to 'inline', which styles inconsistently.
$('#showall')[0].style.display = 'inline-block';
}
ptable.on('draw', function() {
$('button.position').click(window.filterPosition);
});
window.show_all = function(e) {
$('#mozPositions_filter input')[0].value = '';
// Reset both the global and per-column search.
ptable.search('').column('mozPosition:name').search('').draw();
$('#showall').hide();
}
// Work around bugs in both Chrome and Firefox relating to
// anchor scrolling and :target selection.
$('#mozPositions').on('order.dt', function() {
if (gFirstTableRender) {
gFirstTableRender = false;
setTimeout(function() {
var hash = location.hash;
if (hash != "") {
// just "location.hash = location.hash" would be enough for
// Firefox, but not Chrome.
location.hash = "";
location.hash = hash;
}
}, 0);
}
});
window.addEventListener("hashchange", function (event) {
var hash = location.hash.slice(1);
if (hash == "") {
return;
}
var tr = document.getElementById(hash);
if (!tr) {
return;
}
// Open the row that is now the target.
open_row(tr);
});
})
</script>
</body>
</html>