[ticket/12662] Fix notifications dropdown positioning for RTL

PHPBB3-12662
This commit is contained in:
PayBas 2014-06-25 13:28:54 +02:00
parent 665742945f
commit 367c6aafca
3 changed files with 16 additions and 2 deletions

View file

@ -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');
}

View file

@ -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 {

View file

@ -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;
}
}