Skip to content

Commit

Permalink
Bugfix: Fixed button on left or right browser edge
Browse files Browse the repository at this point in the history
  • Loading branch information
t3solution authored Jan 24, 2020
1 parent b467702 commit ab250de
Showing 1 changed file with 22 additions and 10 deletions.
32 changes: 22 additions & 10 deletions Configuration/TypoScript/Page/JS/InlineJS.typoscript
Original file line number Diff line number Diff line change
Expand Up @@ -62,29 +62,41 @@ temp.jsFooterInline {
}, 1500, "easeInOutExpo");
}


)

2 = TEXT
2.value (

// fixed button on left or right browser edge
var buttonFixedPosition = $('.fixedPosition');
if ( buttonFixedPosition.length ) {
$( buttonFixedPosition ).each(function() {
if ( $(this).hasClass('fixedModalButton') ) {
var position = $(this).outerWidth()/2 - $(this).outerHeight()/2;
var fixedButton = $(this).find('button');
} else {
var position = $(this).outerWidth()/2 - $(this).outerHeight()/2 + 2;
}
var rotateFixedPosition = $(this).children();
if ( $(this).hasClass('fixedPosition-left') ) {
$(this).css('left', '-'+position+'px');
if ( $(this).hasClass('fixedGroupButton') ) {
var fixedButton = $(this).find('div');
} else {
var fixedButton = $(this).find('a');
}
}
if ( $(this).hasClass('fixedPosition-right') ) {
$(this).css('right', '-'+position+'px');
$(this).hide().removeClass('d-none').delay(2000).fadeIn(400);

if ( fixedButton.hasClass('rotate-minus') || fixedButton.hasClass('rotate-plus') ) {
var position = $(this).outerWidth()/2 - $(this).outerHeight()/2;
if ( $(this).hasClass('fixedPosition-right') ) {
$(this).css('right', '-'+position+'px');
} else {
$(this).css('left', '-'+position+'px');
}
}
});
}


)


2.if.isTrue = {$bootstrap.extconf.fixedButton}

3 = TEXT
3.value (
Expand Down

0 comments on commit ab250de

Please sign in to comment.