mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°3530 Correctly place the popup and limit its height
This commit is contained in:
@@ -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{
|
||||
|
||||
@@ -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");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user