Commit ea5e146e authored by carlosperate's avatar carlosperate

Stop the settings modal from being open multiple consecutive times.

parent 26b84b9a
...@@ -307,14 +307,21 @@ Ardublockly.openNotConnectedModal = function() { ...@@ -307,14 +307,21 @@ Ardublockly.openNotConnectedModal = function() {
}); });
}; };
/** Tracks if the settings modal is currently opened. */
Ardublockly.settingsOpen = false;
/** Opens the modal that displays the Settings. */ /** Opens the modal that displays the Settings. */
Ardublockly.openSettingsModal = function() { Ardublockly.openSettingsModal = function() {
$('#settings_dialog').openModal({ if (!Ardublockly.settingsOpen) {
dismissible: true, Ardublockly.settingsOpen = true;
opacity: .5, $('#settings_dialog').openModal({
in_duration: 200, dismissible: true,
out_duration: 250 opacity: .5,
}); in_duration: 200,
out_duration: 250,
complete: function() { Ardublockly.settingsOpen = false; }
});
}
}; };
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment