N°3530 Correctly place the popup and limit its height

This commit is contained in:
Stephen Abello
2021-03-17 17:33:45 +01:00
parent bab2febb24
commit ecc9733623
2 changed files with 6 additions and 3 deletions

View File

@@ -50,12 +50,13 @@ $ibo-popover-menu--item--no-message--image--svg--padding : 15px !default;
flex-flow: column;
min-width: $ibo-navigation-menu--notifications-menu--min-width;
.ibo-navigation-menu--notifications--messages-section{
overflow-x: auto;
overflow: auto;
}
}
.ibo-navigation-menu--notifications--show-all-messages, .ibo-navigation-menu--notifications-dismiss-all, .ibo-navigation-menu--notifications-show-all-multiple{
overflow-x: inherit;
text-align: center;
min-height: 45px;
}
.ibo-navigation-menu--notifications--item--image{

View File

@@ -44,11 +44,13 @@ $(function()
$(this.js_selectors.menu_toggler).on('click', function(oEvent) {
var oEventTarget = $(oEvent.target);
var aEventTargetPos = oEventTarget.position();
var aEventTargetOffset = oEventTarget.offset();
$iHeight = Math.abs(aEventTargetOffset.top - 100);
$(me.element).css({
'top': (aEventTargetPos.top + parseInt(oEventTarget.css('marginTop'), 10) - $(me.element).height()) + 'px',
'max-height': $iHeight + 'px',
'top': (aEventTargetPos.top + parseInt(oEventTarget.css('marginTop'), 10) - Math.min($(me.element).height(), $iHeight)) + 'px',
'left': (aEventTargetPos.left + parseInt(oEventTarget.css('marginLeft'), 10) + oEventTarget.width()) + 'px',
'max-height' : (aEventTargetPos.top + parseInt(oEventTarget.css('marginTop'), 10) - 100) + 'px'
});
$(me.element).popover_menu("togglePopup");
});