// Improve installation design (addons iframes + progress percent + remove back button)

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12954 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2012-02-03 09:19:55 +00:00
parent 791cc22ce0
commit c8b075f836
6 changed files with 36 additions and 15 deletions
+5
View File
@@ -64,6 +64,11 @@ abstract class InstallControllerHttp
*/ */
public $next_button = true; public $next_button = true;
/**
* @var bool If false, disable previous button access
*/
public $previous_button = true;
/** /**
* @var InstallAbstractModel * @var InstallAbstractModel
*/ */
+2
View File
@@ -34,6 +34,8 @@ class InstallControllerHttpProcess extends InstallControllerHttp
*/ */
protected $model_install; protected $model_install;
public $previous_button = false;
public function init() public function init()
{ {
require_once _PS_INSTALL_MODELS_PATH_.'install.php'; require_once _PS_INSTALL_MODELS_PATH_.'install.php';
+3
View File
@@ -42,6 +42,7 @@ function process_install(step)
if (current_step >= process_steps.length) if (current_step >= process_steps.length)
{ {
$('#progress_bar .total .progress').animate({'width': '100%'}, 500); $('#progress_bar .total .progress').animate({'width': '100%'}, 500);
$('#progress_bar .total span').html('100%');
// Installation finished // Installation finished
setTimeout(function() setTimeout(function()
@@ -52,6 +53,7 @@ function process_install(step)
else else
{ {
$('#progress_bar .total .progress').animate({'width': '+='+process_percent+'%'}, 500); $('#progress_bar .total .progress').animate({'width': '+='+process_percent+'%'}, 500);
$('#progress_bar .total span').html(Math.ceil(current_step * process_percent)+'%');
// Process next step // Process next step
process_install(process_steps[current_step]); process_install(process_steps[current_step]);
@@ -98,6 +100,7 @@ function install_error(step, errors)
function install_success() function install_success()
{ {
$('#progress_bar .total span').hide();
$('.installing').html(install_is_done); $('.installing').html(install_is_done);
is_installing = false; is_installing = false;
$('#install_process_form').slideUp(); $('#install_process_form').slideUp();
+12
View File
@@ -692,6 +692,9 @@ ul#optional_update {list-style-type:none;}
} }
/* STEP 5 ******************************************/ /* STEP 5 ******************************************/
#install_process_form{
height: 260px;
}
#progress_bar { #progress_bar {
display: none; display: none;
} }
@@ -700,8 +703,17 @@ ul#optional_update {list-style-type:none;}
height: 30px; height: 30px;
border: 1px solid #999999; border: 1px solid #999999;
background-color: #eeeeee; background-color: #eeeeee;
text-align: center;
} }
#progress_bar .total span{
font-size: 16px;
font-weight: bold;
margin-top: 5px;
position: absolute;
text-align: center;
}
#progress_bar .total .progress { #progress_bar .total .progress {
width: 0px; width: 0px;
height: 30px; height: 30px;
+1 -1
View File
@@ -10,7 +10,7 @@
<?php endif; ?> <?php endif; ?>
<?php endif; ?> <?php endif; ?>
<?php if (!$this->isFirstStep()): ?> <?php if (!$this->isFirstStep() && $this->previous_button): ?>
<input id="btBack" class="button little" type="submit" name="submitPrevious" value="<?php echo $this->l('Back') ?>" /> <input id="btBack" class="button little" type="submit" name="submitPrevious" value="<?php echo $this->l('Back') ?>" />
<?php endif; ?> <?php endif; ?>
</div> </div>
+13 -14
View File
@@ -13,6 +13,7 @@ var process_percent = <?php echo 100 / count($this->process_steps) ?>;
<div class="installing"></div> <div class="installing"></div>
<div class="total"> <div class="total">
<span>0%</span>
<div class="progress"></div> <div class="progress"></div>
</div> </div>
@@ -54,26 +55,24 @@ var process_percent = <?php echo 100 / count($this->process_steps) ?>;
<h3 class="infosBlock"><?php echo $this->l('WARNING: For security purposes, you must delete the "install" folder.') ?></h3> <h3 class="infosBlock"><?php echo $this->l('WARNING: For security purposes, you must delete the "install" folder.') ?></h3>
<div id="boBlock" class="blockInfoEnd clearfix"> <div id="boBlock" class="blockInfoEnd clearfix">
<img src="theme/img/visu_boBlock.png" /> <img src="theme/img/visu_boBlock.png" />
<h3><?php echo $this->l('Back Office'); ?></h3> <h3><?php echo $this->l('Back Office'); ?></h3>
<p class="description"><?php echo $this->l('Manage your store using your Back Office. Manage your orders and customers, add modules, change themes, etc.') ?></p> <p class="description"><?php echo $this->l('Manage your store using your Back Office. Manage your orders and customers, add modules, change themes, etc.') ?></p>
<a href="../admin" id="access" class="BO" target="_blank"><span><?php echo $this->l('Manage your store') ?></span></a> <a href="../admin" id="access" class="BO" target="_blank"><span><?php echo $this->l('Manage your store') ?></span></a>
</div> </div>
<div id="foBlock" class="blockInfoEnd last clearfix"> <div id="foBlock" class="blockInfoEnd last clearfix">
<img src="theme/img/visu_foBlock.png" /> <img src="theme/img/visu_foBlock.png" />
<h3><?php echo $this->l('Front Office'); ?></h3> <h3><?php echo $this->l('Front Office'); ?></h3>
<p class="description"><?php echo $this->l('Discover your store as your future customers will see it!') ?></p> <p class="description"><?php echo $this->l('Discover your store as your future customers will see it!') ?></p>
<a href="../" id="access" class="FO" target="_blank"><span><?php echo $this->l('Discover your store') ?></span></a> <a href="../" id="access" class="FO" target="_blank"><span><?php echo $this->l('Discover your store') ?></span></a>
</div> </div>
</div> </div>
<?php </div>
if (@fsockopen('addons.prestashop.com', 80, $errno, $errst, 3)): ?>
<?php if (@fsockopen('addons.prestashop.com', 80, $errno, $errst, 3)): ?>
<iframe src="http://addons.prestashop.com/psinstall.php?lang=<?php echo $this->language->getLanguageIso() ?>" scrolling="no" id="prestastore"> <iframe src="http://addons.prestashop.com/psinstall.php?lang=<?php echo $this->language->getLanguageIso() ?>" scrolling="no" id="prestastore">
<p>Your browser does not support iframes.</p> <p>Your browser does not support iframes.</p>
</iframe> </iframe>
<?php <?php endif; ?>
endif; ?>
</div>
<?php $this->displayTemplate('footer') ?> <?php $this->displayTemplate('footer') ?>