Remove references to old tour but include code for new tour.

This commit is contained in:
James Cole
2017-07-15 21:40:42 +02:00
parent accbdea942
commit 8a38ce1964
18 changed files with 139 additions and 214 deletions

View File

@@ -8,36 +8,15 @@
* See the LICENSE file for details.
*/
/** global: Tour, showTour, accountFrontpageUri, token, billCount, accountExpenseUri, accountRevenueUri */
/** global: accountFrontpageUri, token, billCount, accountExpenseUri, accountRevenueUri */
$(function () {
"use strict";
// do chart JS stuff.
drawChart();
if (showTour === true) {
$.getJSON('json/tour').done(function (data) {
var tour = new Tour(
{
steps: data.steps,
template: data.template,
onEnd: endTheTour
});
// Initialize the tour
tour.init();
// Start the tour
tour.start();
});
}
});
function endTheTour() {
"use strict";
$.post('json/end-tour', {_token: token});
}
function drawChart() {
"use strict";
lineChart(accountFrontpageUri, 'accounts-chart');