mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
Merge pull request #25 from scott1702/userform-progress
keep first/last step buttons within userform-progress div
This commit is contained in:
commit
6848b39ac0
@ -431,6 +431,14 @@ jQuery(function ($) {
|
|||||||
buttonOffset = -1 * ($button.innerWidth() / 2);
|
buttonOffset = -1 * ($button.innerWidth() / 2);
|
||||||
|
|
||||||
$button.css({left: leftPercent, marginLeft: buttonOffset});
|
$button.css({left: leftPercent, marginLeft: buttonOffset});
|
||||||
|
|
||||||
|
// First and last buttons are kept within userform-progress container
|
||||||
|
if (index === self.$jsAlign.length - 1) {
|
||||||
|
$button.css({marginLeft: buttonOffset * 2});
|
||||||
|
} else if (index === 0) {
|
||||||
|
$button.css({marginLeft: 0});
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
this.update(1);
|
this.update(1);
|
||||||
|
Loading…
Reference in New Issue
Block a user