mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 08:36:26 +02:00
Fix race condition
This commit is contained in:
parent
796909d366
commit
9cd8f372f2
1 changed files with 8 additions and 6 deletions
|
@ -2,6 +2,8 @@ var Metaverse = {
|
||||||
accessToken: null
|
accessToken: null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var currentStepNumber;
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
Strings.ADD_PLACE_NOT_CONNECTED_MESSAGE = "You must have an access token to query your High Fidelity places.<br><br>" +
|
Strings.ADD_PLACE_NOT_CONNECTED_MESSAGE = "You must have an access token to query your High Fidelity places.<br><br>" +
|
||||||
"Please go back and connect your account.";
|
"Please go back and connect your account.";
|
||||||
|
@ -122,7 +124,7 @@ $(document).ready(function(){
|
||||||
});
|
});
|
||||||
|
|
||||||
function setupWizardSteps() {
|
function setupWizardSteps() {
|
||||||
var stepsCompleted = Settings.data.values.wizard.steps_completed;
|
currentStepNumber = Settings.data.values.wizard.steps_completed;
|
||||||
var steps = null;
|
var steps = null;
|
||||||
|
|
||||||
if (Settings.data.values.wizard.cloud_domain) {
|
if (Settings.data.values.wizard.cloud_domain) {
|
||||||
|
@ -145,12 +147,12 @@ function setupWizardSteps() {
|
||||||
$(this).children(".step-title").text("Step " + (i + 1) + " of " + steps.length);
|
$(this).children(".step-title").text("Step " + (i + 1) + " of " + steps.length);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (stepsCompleted == 0) {
|
if (currentStepNumber == 0) {
|
||||||
$('#skip-wizard-button').show();
|
$('#skip-wizard-button').show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var currentStep = steps[stepsCompleted];
|
var currentStep = steps[currentStepNumber];
|
||||||
$(currentStep).show();
|
$(currentStep).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -253,7 +255,7 @@ function goToNextStep() {
|
||||||
currentStep.hide();
|
currentStep.hide();
|
||||||
nextStep.show();
|
nextStep.show();
|
||||||
|
|
||||||
var currentStepNumber = parseInt(Settings.data.values.wizard.steps_completed) + 1;
|
currentStepNumber += 1;
|
||||||
|
|
||||||
postSettings({
|
postSettings({
|
||||||
"wizard": {
|
"wizard": {
|
||||||
|
@ -282,7 +284,7 @@ function goToPreviousStep() {
|
||||||
currentStep.hide();
|
currentStep.hide();
|
||||||
previousStep.show();
|
previousStep.show();
|
||||||
|
|
||||||
var currentStepNumber = parseInt(Settings.data.values.wizard.steps_completed) - 1;
|
currentStepNumber -= 1;
|
||||||
|
|
||||||
postSettings({
|
postSettings({
|
||||||
"wizard": {
|
"wizard": {
|
||||||
|
@ -488,7 +490,7 @@ function saveUsernamePassword() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var currentStepNumber = parseInt(Settings.data.values.wizard.steps_completed) + 1;
|
currentStepNumber += 1;
|
||||||
|
|
||||||
var formJSON = {
|
var formJSON = {
|
||||||
"security": {
|
"security": {
|
||||||
|
|
Loading…
Reference in a new issue