diff --git a/install-new/controllers/http/process.php b/install-new/controllers/http/process.php index 8fb134a58..63de1a352 100644 --- a/install-new/controllers/http/process.php +++ b/install-new/controllers/http/process.php @@ -224,13 +224,12 @@ class InstallControllerHttpProcess extends InstallControllerHttp public function display() { $this->process_steps = array( - 'installDatabase', - 'populateDatabase', - 'configureShop', - 'installModules', - 'installFixtures', - 'installTheme', - //'preactivation', + array('key' => 'installDatabase', 'lang' => $this->l('Create database tables')), + array('key' => 'populateDatabase', 'lang' => $this->l('Populate database tables')), + array('key' => 'configureShop', 'lang' => $this->l('Configure shop informations')), + array('key' => 'installModules', 'lang' => $this->l('Install modules')), + array('key' => 'installFixtures', 'lang' => $this->l('Install demonstration data')), + array('key' => 'installTheme', 'lang' => $this->l('Install theme')), ); $this->displayTemplate('process'); } diff --git a/install-new/theme/img/ajax-loader-small.gif b/install-new/theme/img/ajax-loader-small.gif index 5b33f7e54..e2a116c72 100644 Binary files a/install-new/theme/img/ajax-loader-small.gif and b/install-new/theme/img/ajax-loader-small.gif differ diff --git a/install-new/theme/js/process.js b/install-new/theme/js/process.js index 6e63d288b..48f279d33 100644 --- a/install-new/theme/js/process.js +++ b/install-new/theme/js/process.js @@ -5,8 +5,6 @@ $(document).ready(function() start_install(); }); -is_installing_count = 0; -is_installing_max = 5; current_step = 0; function start_install() { @@ -17,7 +15,6 @@ function start_install() $('.process_step').removeClass('fail').removeClass('success').hide(); $('.error_log').hide(); - setTimeout(text_is_installing, 500); $('#progress_bar').show(); $('#progress_bar .installing').show(); process_install(); @@ -27,10 +24,12 @@ function process_install(step) { if (!step) step = process_steps[0]; - + + $('.installing').hide().html(step.lang+' ...').fadeIn('slow'); + $.ajax({ url: 'index.php', - data: step+'=true', + data: step.key+'=true', dataType: 'json', cache: false, success: function(json) @@ -38,11 +37,12 @@ function process_install(step) // No error during this step if (json.success) { - $('#progress_bar_'+step).addClass('complete'); - $('#process_step_'+step).show().addClass('success'); + $('#process_step_'+step.key).show().addClass('success'); current_step++; if (current_step >= process_steps.length) { + $('#progress_bar .total .progress').animate({'width': '100%'}, 500); + // Installation finished setTimeout(function() { @@ -51,6 +51,8 @@ function process_install(step) } else { + $('#progress_bar .total .progress').animate({'width': '+='+process_percent+'%'}, 500); + // Process next step process_install(process_steps[current_step]); } @@ -58,13 +60,13 @@ function process_install(step) // An error occured during this step else { - install_error(step, json.message); + install_error(step.key, json.message); } }, // An error HTTP (page not found, json not valid, etc.) occured during this step error: function() { - install_error(step); + install_error(step.key); } }); } @@ -73,12 +75,11 @@ function install_error(step, errors) { current_step = 0; is_installing = false; - $('#process_step_'+step).show().addClass('fail'); + $('#process_step_'+step.key).show().addClass('fail'); $.each(process_steps, function(k, v) { - $('#progress_bar_'+v).removeClass('complete'); + $('#progress_bar_'+v.key).removeClass('complete'); }); - $('#progress_bar .installing').hide(); if (errors) { @@ -92,30 +93,15 @@ function install_error(step, errors) display += '
| - - |