Add a new step for complete

This commit is contained in:
Mike Koch 2017-10-12 13:07:50 -04:00
parent 0cd0337a39
commit cdd4c83e4f
No known key found for this signature in database
GPG Key ID: 9BA5D7F8391455ED

View File

@ -7,14 +7,21 @@ var steps = [
{ {
name: 'db-confirm', name: 'db-confirm',
text: 'Confirm the information below', text: 'Confirm the information below',
backPossible: true, showBack: true,
callback: undefined callback: undefined
}, },
{ {
name: 'install-or-update', name: 'install-or-update',
text: 'Updating to the latest version...', text: 'Updating to the latest version...',
backPossible: false, showBack: false,
showNext: false,
callback: installOrUpdate callback: installOrUpdate
},
{
name: 'complete',
text: 'Installation / Upgrade Complete',
showBack: false,
callback: undefined
} }
]; ];
@ -41,8 +48,11 @@ function goToStep(step) {
$('#tools-button').hide(); $('#tools-button').hide();
$('#back-button').show(); $('#back-button').show();
if (!steps[step].backPossible) { if (!steps[step].showBack) {
$('#back-button').addClass('disabled').attr('disabled', 'disabled'); $('#back-button').hide();
}
if (!steps[step].showNext) {
$('#next-button').hide();
} }
} }
@ -121,7 +131,6 @@ function updateProgressBar(migrationNumber, latestMigrationNumber, isError, isFi
} }
if (isFinished) { if (isFinished) {
$progressBar.hide(); goToStep(steps.length - 1);
$('#finished-install').show();
} }
} }