$(function(){
var converter = new showdown.Converter();
$.ajax('/api/features').done(function(data){
$table = $('table.features');
$.each(data, function(name, details) {
requirements = $.map(details.requirements, function(r, name){
return '
' +
' | ' +
'' + name + ' | ' +
'' + converter.makeHtml(r.description) + ' | ' +
'' + (r.available ? 'YES' : 'NO') + ' | ' +
'
';
});
$table.append(
'' +
'' + name + ' | ' +
'' + converter.makeHtml(details.description) + ' | ' +
'' + (details.available ? 'YES' : 'NO') + ' | ' +
'
' +
requirements.join("")
);
})
});
});