From 43264318c43baaac2bceb84a735617f7769ada8f Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Wed, 27 Sep 2017 22:01:34 -0400 Subject: [PATCH] Some progress --- install/index.php | 85 ++++++++++++++++++++++++++---------- install/js/install-script.js | 49 +++++++++++++++++++++ 2 files changed, 111 insertions(+), 23 deletions(-) create mode 100644 install/js/install-script.js diff --git a/install/index.php b/install/index.php index 6af0ef16..82784cb6 100644 --- a/install/index.php +++ b/install/index.php @@ -5,51 +5,90 @@ require(HESK_PATH . 'install/install_functions.inc.php'); require(HESK_PATH . 'hesk_settings.inc.php'); hesk_dbConnect(); + +/* +We have four possible installation scenarios: + +1. Fresh install - the user has never installed Mods for HESK before. Simply start at migration #0. +2. Installed a really old version - we don't have a previous version to start from. +3. Installed a recent version, but before migrations began - just pull the version # and use the dictionary below. +4. Migration number present in the settings table. Take that number and run with it. + */ ?> - Mods For HESK <?php echo MODS_FOR_HESK_NEW_VERSION; ?> Install / Upgrade - + Mods for HESK <?php echo MODS_FOR_HESK_NEW_VERSION; ?> Install / Upgrade + - - - - - + - - +
- + \ No newline at end of file diff --git a/install/js/install-script.js b/install/js/install-script.js new file mode 100644 index 00000000..293fff3c --- /dev/null +++ b/install/js/install-script.js @@ -0,0 +1,49 @@ +var steps = [ + { + name: 'intro', + text: 'Thanks for choosing Mods for HESK', + callback: undefined + }, + { + name: 'db-confirm', + text: 'Confirm the information below', + callback: confirmDatabaseInformation + } +]; + +$(document).ready(function() { + var currentStep = 0; + + $('#next-button').click(function() { + goToStep(++currentStep); + }); + + $('#back-button').click(function() { + goToStep(--currentStep); + }); +}); + +function goToStep(step) { + $('[data-step]').hide(); + $('[data-step="' + steps[step].name + '"]').show(); + + if (step === 0) { + $('#tools-button').show(); + $('#back-button').hide(); + } else { + $('#tools-button').hide(); + $('#back-button').show(); + } + + if (step === steps.length - 1) { + $('#next-button').hide(); + } else { + $('#next-button').show(); + } + + $('#header-text').text(steps[step].text); +} + +function confirmDatabaseInformation() { + +} \ No newline at end of file