Skip to content

Commit

Permalink
Issue #1568: fix tutorial exit behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
bjost2s committed Feb 9, 2024
1 parent 29e160f commit 9bced9b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,10 @@ function loadFromTutorial(tutId) {
$('#tutorial-header').html(tutorial.name);

// prepare the view
$('#tutorial-navigation, #tutorialEnd').toggle();
$('#head-navigation, #tab-navigation').toggle();
$('#tutorial-navigation, #tutorialEnd, #tutorialButton').show();
$('#head-navigation, #tab-navigation').hide();

$('#tutorialHeader :first-child').addClass('active');
$('#tutorialButton').show();
$('.blocklyToolboxDiv>.levelTabs').addClass('invisible');

initStepEvents();
Expand All @@ -110,8 +109,9 @@ function initStepEvents() {
nextStep();
openTutorialView();
});
$('#tutorialEnd').oneWrap('click', function () {
$('#tutorialEnd').oneWrap('click', function (e) {
exitTutorial();
return false;
});
}

Expand Down Expand Up @@ -227,8 +227,8 @@ function createInstruction() {
class: 'btn',
click: function () {
MSG.displayMessage(tutorial.end, 'POPUP', '');
$('.modal').oneWrap('hide.bs.modal', function (e) {
$('#tutorialEnd').clickWrap();
$('#show-message').oneWrap('hide.bs.modal', function (e) {
exitTutorial();
return false;
});
return false;
Expand Down Expand Up @@ -502,8 +502,8 @@ function closeTutorialView() {
}

function exitTutorial() {
$('#tutorial-navigation, #tutorialEnd').toggle();
$('#head-navigation, #tab-navigation').toggle();
$('#tutorial-navigation, #tutorialEnd, #tutorialButton').hide();
$('#head-navigation, #tab-navigation').show();
$('.blocklyToolboxDiv>.levelTabs').removeClass('invisible');
GUISTATE_C.resetDynamicProgramToolbox();
PROG_C.loadExternalToolbox(GUISTATE_C.getProgramToolbox());
Expand Down

0 comments on commit 9bced9b

Please sign in to comment.