diff --git a/htdocs/features.js b/htdocs/features.js index 0add3b43..b2dbf373 100644 --- a/htdocs/features.js +++ b/htdocs/features.js @@ -1,5 +1,12 @@ $(function(){ var converter = new showdown.Converter({openLinksInNewWindow: true}); + + function yes_no(v) { + return v? + 'YES' : + 'NO'; + } + $.ajax('api/features').done(function(data){ var $table = $('table.features'); $.each(data, function(name, details) { @@ -8,13 +15,13 @@ $(function(){ '' + '' + name + '' + '' + converter.makeHtml(r.description) + '' + - '' + (r.available ? 'YES' : 'NO') + '' + + yes_no(r.available) + ''; }); $table.append( '' + '' + name + '' + - '' + (details.available ? 'YES' : 'NO') + '' + + yes_no(details.available) + '' + requirements.join("") );