New help thing.

This commit is contained in:
James Cole
2016-10-23 17:33:53 +02:00
parent 19e9f382e4
commit 48b0620629
5 changed files with 49 additions and 67 deletions

View File

@@ -16,12 +16,12 @@ function showHelp(e) {
$('#helpTitle').html('Please hold...');
$('#helpModal').modal('show');
$('#helpTitle').html('Help for this page');
$.getJSON('help/' + encodeURI(route)).done(function (data) {
$('#helpBody').html(data.text);
$('#helpTitle').html(data.title);
$('#helpBody').html(data);
}).fail(function () {
$('#helpBody').html('<p class="text-danger">No help text could be found.</p>');
$('#helpTitle').html('Sorry...');
$('#helpTitle').html('Apologies');
});
return false;
}