mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08: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') {
|
if (direction == 'left') {
|
||||||
options.dropdown.css('margin-left', '-' + freeSpace + 'px');
|
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 {
|
} else {
|
||||||
options.dropdown.css('margin-right', '-' + (windowWidth + freeSpace) + 'px');
|
options.dropdown.css('margin-right', '-' + (windowWidth + freeSpace) + 'px');
|
||||||
}
|
}
|
||||||
|
|
|
@ -1147,9 +1147,9 @@ form > p.post-notice strong {
|
||||||
|
|
||||||
.dropdown-extended .dropdown-contents {
|
.dropdown-extended .dropdown-contents {
|
||||||
max-height: none;
|
max-height: none;
|
||||||
max-width: 340px !important;
|
|
||||||
padding: 0;
|
padding: 0;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
width: 340px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-extended .header {
|
.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)
|
@media only screen and (max-width: 350px), only screen and (max-device-width: 350px)
|
||||||
{
|
{
|
||||||
.dropdown-extended .dropdown-contents {
|
.dropdown-extended .dropdown-contents {
|
||||||
max-width: 300px !important;
|
width: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue