mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/12662] Fix notifications dropdown positioning for RTL
PHPBB3-12662
This commit is contained in:
parent
665742945f
commit
367c6aafca
3 changed files with 16 additions and 2 deletions
|
@ -1301,6 +1301,20 @@ phpbb.toggleDropdown = function() {
|
|||
|
||||
if (direction == 'left') {
|
||||
options.dropdown.css('margin-left', '-' + freeSpace + 'px');
|
||||
|
||||
// Try to position the notification dropdown correctly in RTL-responsive mode
|
||||
if (options.dropdown.hasClass('dropdown-extended')) {
|
||||
var contentWidth,
|
||||
fullFreeSpace = freeSpace + parent.outerWidth();
|
||||
|
||||
options.dropdown.find('.dropdown-contents').each(function() {
|
||||
contentWidth = parseInt($(this).outerWidth());
|
||||
$(this).css({marginLeft: 0, left: 0});
|
||||
});
|
||||
|
||||
var maxOffset = Math.min(contentWidth, fullFreeSpace) + 'px';
|
||||
options.dropdown.css({'width': maxOffset, 'margin-left': '-' + maxOffset});
|
||||
}
|
||||
} else {
|
||||
options.dropdown.css('margin-right', '-' + (windowWidth + freeSpace) + 'px');
|
||||
}
|
||||
|
|
|
@ -1147,9 +1147,9 @@ form > p.post-notice strong {
|
|||
|
||||
.dropdown-extended .dropdown-contents {
|
||||
max-height: none;
|
||||
max-width: 340px !important;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
width: 340px;
|
||||
}
|
||||
|
||||
.dropdown-extended .header {
|
||||
|
|
|
@ -191,7 +191,7 @@ ul.topiclist li.row dt a.subforum {
|
|||
@media only screen and (max-width: 350px), only screen and (max-device-width: 350px)
|
||||
{
|
||||
.dropdown-extended .dropdown-contents {
|
||||
max-width: 300px !important;
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue