mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-03 12:45:20 +00:00
Some improvements in tour
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* globals $, columnChart, google, lineChart, pieChart, stackedColumnChart, areaChart */
|
||||
/* globals $, columnChart,showTour, Tour, google, lineChart, pieChart, stackedColumnChart, areaChart */
|
||||
|
||||
$(function () {
|
||||
"use strict";
|
||||
@@ -9,18 +9,32 @@ $(function () {
|
||||
// do chart JS stuff.
|
||||
drawChart();
|
||||
}
|
||||
|
||||
$.getJSON('json/tour').success(function (data) {
|
||||
var tour = new Tour({steps: data.steps, template: data.template});
|
||||
// Initialize the tour
|
||||
tour.init();
|
||||
// Start the tour
|
||||
tour.start();
|
||||
});
|
||||
if (showTour) {
|
||||
$.getJSON('json/tour').success(function (data) {
|
||||
var tour = new Tour(
|
||||
{
|
||||
steps: data.steps,
|
||||
template: data.template,
|
||||
onEnd: endTheTour
|
||||
});
|
||||
// Initialize the tour
|
||||
tour.init();
|
||||
// Start the tour
|
||||
tour.start();
|
||||
}).fail(function () {
|
||||
console.log('Already had tour.');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
function endTheTour() {
|
||||
"use strict";
|
||||
$.post('json/end-tour', {_token: token});
|
||||
|
||||
}
|
||||
|
||||
function drawChart() {
|
||||
"use strict";
|
||||
areaChart('chart/account/frontpage', 'accounts-chart');
|
||||
|
||||
Reference in New Issue
Block a user