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 += '
  • '+v+'
  • '; }); display += ''; - $('#process_step_'+step+' .error_log').html(display).show(); + $('#process_step_'+step.key+' .error_log').html(display).show(); } } function install_success() { + $('.installing').html(install_is_done); + return; is_installing = false; $('#install_process_form').slideUp(); $('#install_process_success').slideDown(); -} - -function text_is_installing() -{ - if (!is_installing) - return; - - var text = ''; - for (var i = 0; i <= is_installing_count; i++) - text += '.'; - $('#progress_bar .installing span').html(text); - - is_installing_count++; - if (is_installing_count == is_installing_max) - is_installing_count = 0; - - setTimeout(text_is_installing, 500); } \ No newline at end of file diff --git a/install-new/theme/view.css b/install-new/theme/view.css index 9127d4a16..5476cbd72 100644 --- a/install-new/theme/view.css +++ b/install-new/theme/view.css @@ -695,24 +695,28 @@ ul#optional_update {list-style-type:none;} #progress_bar { display: none; } - #progress_bar table { + #progress_bar .total { width: 100%; + height: 30px; border: 1px solid #999999; + background-color: #eeeeee; } - #progress_bar table td { - background-color: #eeeeee; - height: 25px; - margin: 3px; - } - #progress_bar table td.complete { - background-color: #74A3DC; - } + + #progress_bar .total .progress { + width: 0px; + height: 30px; + background-color: #74A3DC; + } + #progress_bar .installing { - background: url("img/ajax-loader-small.gif") no-repeat scroll 0 0 transparent; - font-size: 14px; - font-style: italic; - padding-left: 20px; - display: none; + background: url("img/ajax-loader-small.gif") no-repeat scroll 0 0 transparent; + display: none; + font-size: 18px; + font-style: italic; + font-weight: bold; + height: 26px; + padding-left: 36px; + padding-top: 6px; } #progress_bar ol { diff --git a/install-new/theme/views/process.phtml b/install-new/theme/views/process.phtml index c26bad376..7b642216e 100644 --- a/install-new/theme/views/process.phtml +++ b/install-new/theme/views/process.phtml @@ -2,28 +2,24 @@
    -
    - l('Installing') ?> -
    +
    - - - process_steps as $item): ?> - - - -
     
    +
    +
    +
      process_steps as $item): ?> -
    1. - l('process_step_'.$item) ?> +
    2. +