2 typeof define === "function" ? function (m) { define("kismet-ui-walkthrough-js", m); } :
3 typeof exports === "object" ? function (m) { module.exports = m(); } :
4 function(m){ this.kismet_ui_walkthrough = m(); }
7 /* A tabbed set of introductory/walkthrough windows, for instance to implement
8 * an onboarding process.
10 * Each step should contain:
11 * title Main title of step
12 * content String content or function(element)
19 // Flag we're still loading
20 exports.load_complete = 0;
22 // Generate a walkthrough
23 exports.MakeWalkthrough = function() {
28 // Concatenate a step onto the list of actions
29 exports.AddWalkthroughStep = function(walkthrough, step) {
30 walkthrough['steps'].push(step);
34 // Disable the 'next' button in the walkthrough
35 exports.DisableNext = function(walkthrough) {
39 // Enable the 'next' button in the walkthrough
40 exports.EnableNext = function(walkthrough) {
44 exports.ShowWalkthrough = function(walkthrough) {
45 var w = $(window).width() * 0.85;
46 var h = $(window).height() * 0.75;
49 if ($(window).width() < 450 || $(window).height() < 450) {
50 w = $(window).width() - 5;
51 h = $(window).height() - 5;
55 walkthrough['content'] =
60 walkthrough['prevbutton'] =
62 class: 'wt-button-previous',
67 .on('click', function() {
68 exports.PreviousWalkthrough(walkthrough);
71 walkthrough['nextbutton'] =
73 class: 'wt-button-next',
78 .on('click', function() {
79 exports.NextWalkthrough(walkthrough);
86 .append(walkthrough['content'])
91 .append(walkthrough['prevbutton'])
92 .append(walkthrough['nextbutton'])
96 walkthrough['panel'] = $.jsPanel({
114 exports.CancelWalkthrough = function(walkthrough) {
118 exports.NextWalkthrough = function(walkthrough) {
122 epxorts.PreviousWalkthrough = function(walkthrough) {