mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
33 lines
913 B
JavaScript
33 lines
913 B
JavaScript
/*
|
|
* intro.js
|
|
* Copyright (c) 2017 thegrumpydictator@gmail.com
|
|
* This software may be modified and distributed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International License.
|
|
*
|
|
* See the LICENSE file for details.
|
|
*/
|
|
|
|
/** global: routeForTour, routeStepsUri, routeForFinishedTour */
|
|
|
|
$(function () {
|
|
"use strict";
|
|
//alert('show user intro for ' + route_for_tour);
|
|
$.getJSON(routeStepsUri).done(setupIntro)
|
|
});
|
|
|
|
function setupIntro(steps) {
|
|
|
|
var intro = introJs();
|
|
intro.setOptions({
|
|
steps: steps,
|
|
exitOnEsc: true,
|
|
exitOnOverlayClick: true,
|
|
keyboardNavigation: true
|
|
});
|
|
intro.oncomplete(reportIntroFinished);
|
|
intro.onexit(reportIntroFinished);
|
|
intro.start();
|
|
}
|
|
|
|
function reportIntroFinished() {
|
|
$.post(routeForFinishedTour);
|
|
} |