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() {
});
};
/** Tracks if the settings modal is currently opened. */
Ardublockly.settingsOpen = false;
/** Opens the modal that displays the Settings. */
Ardublockly.openSettingsModal = function() {
if (!Ardublockly.settingsOpen) {
Ardublockly.settingsOpen = true;
$('#settings_dialog').openModal({
dismissible: true,
opacity: .5,
in_duration: 200,
out_duration: 250
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