mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-22 12:04:00 +00:00
Option to re-enable intro boxes.
This commit is contained in:
@@ -11,27 +11,40 @@
|
||||
$(function () {
|
||||
"use strict";
|
||||
$('#help').click(showHelp);
|
||||
$(function () {
|
||||
|
||||
//$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
});
|
||||
|
||||
function showHelp(e) {
|
||||
"use strict";
|
||||
var target = $(e.target);
|
||||
var route = target.data('route');
|
||||
//
|
||||
var specialPage = target.data('extra');
|
||||
|
||||
if (typeof specialPage === 'undefined') {
|
||||
specialPage = '';
|
||||
}
|
||||
$('#helpBody').html('<i class="fa fa-refresh fa-spin"></i>');
|
||||
$('#helpTitle').html('Please hold...');
|
||||
|
||||
$('#helpModal').modal('show');
|
||||
$('#helpTitle').html('Help for this page');
|
||||
$.getJSON('help/' + encodeURI(route)).done(function (data) {
|
||||
$('#helpBody').html(data);
|
||||
$('#helpBody').html(data.html);
|
||||
}).fail(function () {
|
||||
$('#helpBody').html('<p class="text-danger">No help text could be found.</p>');
|
||||
$('#helpTitle').html('Apologies');
|
||||
});
|
||||
$('#reenableGuidance').unbind('click').click(function () {
|
||||
enableGuidance(route, specialPage);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function enableGuidance(route, specialPage) {
|
||||
$.post('json/intro/enable/' + route + '/' + specialPage).done(function (data) {
|
||||
alert(data.message);
|
||||
}).fail(function () {
|
||||
alert('Could not re-enable introduction.');
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user