Wizard: Prevent the width of header steps from exceeding 100% in total

This commit is contained in:
Johannes Meyer 2015-07-29 12:30:39 +02:00
parent 5411efd546
commit 22bcc790ef
1 changed files with 8 additions and 2 deletions

View File

@ -80,7 +80,10 @@ if ($notifications->hasMessages()) {
$pos < $maxProgress ? ' visited' : ($currentPos > 2 ? ' active' : '')
); ?>
<?php if ($page === $firstPage): ?>
<div class="line left<?= $stateClass; ?>" style="float: left; width: <?= $lineWidth; ?>%; margin-right: 0"></div>
<div class="line left<?= $stateClass; ?>" style="float: left; width: <?= sprintf(
'%.2F',
100 - (count($configPagesLeft) - 1) * $lineWidth
); ?>%; margin-right: 0"></div>
<?php elseif ($page === $lastPage): ?>
<div class="line<?= $stateClass; ?>" style="float: left; width: <?= $lineWidth; ?>%; margin-right: -0.1em;"></div>
<?php else: ?>
@ -109,7 +112,10 @@ if ($notifications->hasMessages()) {
<?php if ($page === $firstPage): ?>
<div class="line<?= $stateClass; ?>" style="float: left; width: <?= $lineWidth; ?>%; margin-left: -0.1em;"></div>
<?php elseif ($page === $lastPage): ?>
<div class="line right<?= $stateClass; ?>" style="float: left; width: <?= $lineWidth; ?>%; margin-left: 0;"></div>
<div class="line right<?= $stateClass; ?>" style="float: left; width: <?= sprintf(
'%.2F',
100 - (count($configPagesRight) - 1) * $lineWidth
); ?>%; margin-left: 0;"></div>
<?php else: ?>
<div class="line<?= $stateClass; ?>" style="float: left; width: <?= $lineWidth; ?>%;"></div>
<?php endif ?>