2019-07-05 17:30:24 +00:00
|
|
|
$(function(){
|
2019-07-05 20:31:46 +00:00
|
|
|
var converter = new showdown.Converter();
|
2019-11-25 19:17:11 +00:00
|
|
|
$.ajax('api/features').done(function(data){
|
2019-07-09 15:34:24 +00:00
|
|
|
var $table = $('table.features');
|
2019-07-05 20:31:46 +00:00
|
|
|
$.each(data, function(name, details) {
|
2019-07-09 15:34:24 +00:00
|
|
|
var requirements = $.map(details.requirements, function(r, name){
|
2019-07-05 20:31:46 +00:00
|
|
|
return '<tr>' +
|
|
|
|
'<td></td>' +
|
|
|
|
'<td>' + name + '</td>' +
|
|
|
|
'<td>' + converter.makeHtml(r.description) + '</td>' +
|
|
|
|
'<td>' + (r.available ? 'YES' : 'NO') + '</td>' +
|
|
|
|
'</tr>';
|
|
|
|
});
|
|
|
|
$table.append(
|
|
|
|
'<tr>' +
|
|
|
|
'<td colspan=2>' + name + '</td>' +
|
|
|
|
'<td>' + converter.makeHtml(details.description) + '</td>' +
|
|
|
|
'<td>' + (details.available ? 'YES' : 'NO') + '</td>' +
|
|
|
|
'</tr>' +
|
|
|
|
requirements.join("")
|
|
|
|
);
|
|
|
|
})
|
2019-07-05 17:30:24 +00:00
|
|
|
});
|
2019-11-25 19:17:11 +00:00
|
|
|
});
|