Skip to content

Commit c2285e1

Browse files
Updating Tutorial to pass along the tour parameter to onShow() callbacks.
1 parent 5b5dced commit c2285e1

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

js/tutorial.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,62 +21,62 @@ define(function(require, exports, module) {
2121
orphan: true,
2222
content: 'Welcome to the Conditional Expression Parser.<br><br>Use your keyboard or the buttons below to navigate this brief tutorial.'
2323
},{
24-
onShow: function() {
25-
if(_options.onShow) { _options.onShow(); }
24+
onShow: function(tour) {
25+
if(_options.onShow) { _options.onShow(tour); }
2626
resetInput();
2727
},
2828
element: '.js-tutorial-input',
2929
placement: 'bottom',
3030
title: 'The Input Box',
3131
content: 'This textbox is where you\'ll enter the conditional expression you want to analyze.'
3232
},{
33-
onShow: function() {
34-
if(_options.onShow) { _options.onShow(); }
33+
onShow: function(tour) {
34+
if(_options.onShow) { _options.onShow(tour); }
3535
resetInput().val(example1);
3636
},
3737
element: '.js-tutorial-input',
3838
placement: 'bottom',
3939
title: 'A Simple Input',
4040
content: 'Let\'s begin with a simple example: two conditions, A and B, separated by an OR operator.<br><br>Notice that some syntax like the "if" statement and the opening bracket are included. They are unnecessary and will be ignored.'
4141
},{
42-
onShow: function() {
43-
if(_options.onShow) { _options.onShow(); }
42+
onShow: function(tour) {
43+
if(_options.onShow) { _options.onShow(tour); }
4444
resetInput().val(example1).change();
4545
},
4646
element: '.js-truth-table',
4747
placement: 'bottom',
4848
title: 'A Simple Output',
4949
content: 'The parser will generate a "truth table" showing all of the code paths in which the expression will evaluate to TRUE. Our simple example has simple results.'
5050
},{
51-
onShow: function() {
52-
if(_options.onShow) { _options.onShow(); }
51+
onShow: function(tour) {
52+
if(_options.onShow) { _options.onShow(tour); }
5353
resetInput().val(example2);
5454
},
5555
element: '.js-tutorial-input',
5656
placement: 'bottom',
5757
title: 'A Complex Input',
5858
content: 'If your conditional expressions were so simple, you wouldn\'t need this tool!<br><br>Let\'s try something harder with sub-expressions, function calls, strings, and varied operators.'
5959
},{
60-
onShow: function() {
61-
if(_options.onShow) { _options.onShow(); }
60+
onShow: function(tour) {
61+
if(_options.onShow) { _options.onShow(tour); }
6262
resetInput().val(example2).change();
6363
},
6464
element: '.js-truth-table',
6565
placement: 'bottom',
6666
title: 'A Complex Output',
6767
content: 'Now our truth table is much larger. The different colored columns are used to group conditions within the same expression depth.<br><br>Notice that function parameters and strings are grouped into a single expression even if they look like conditional expressions.'
6868
},{
69-
onShow: function() {
70-
if(_options.onShow) { _options.onShow(); }
69+
onShow: function(tour) {
70+
if(_options.onShow) { _options.onShow(tour); }
7171
resetInput().val(example3);
7272
},
7373
element: '.js-tutorial-input',
7474
placement: 'bottom',
7575
title: 'The XOR Operator',
7676
content: 'Lastly we\'ll look at the XOR operator. Unlike the OR operator, the XOR operator requires that one or more conditions is FALSE for the overall expression to be TRUE.'
7777
},{
78-
onShow: function() {
79-
if(_options.onShow) { _options.onShow(); }
78+
onShow: function(tour) {
79+
if(_options.onShow) { _options.onShow(tour); }
8080
resetInput().val(example3).change();
8181
},
8282
element: '.js-truth-table',

0 commit comments

Comments
 (0)