aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/assets/javascript/core.js
diff options
context:
space:
mode:
authorCesar G <prototech91@gmail.com>2014-07-03 23:02:11 -0700
committerCesar G <prototech91@gmail.com>2014-07-03 23:02:11 -0700
commit5878314671954526c4cbf74417b02c1c963f0e37 (patch)
tree206b6fa20ab144467674c66d4612192ea0970a18 /phpBB/assets/javascript/core.js
parent0deacb843865bea01f24d39040209c73eb087056 (diff)
parentd8d6e3e943e718b4520059a04624a3922b916534 (diff)
downloadforums-5878314671954526c4cbf74417b02c1c963f0e37.tar
forums-5878314671954526c4cbf74417b02c1c963f0e37.tar.gz
forums-5878314671954526c4cbf74417b02c1c963f0e37.tar.bz2
forums-5878314671954526c4cbf74417b02c1c963f0e37.tar.xz
forums-5878314671954526c4cbf74417b02c1c963f0e37.zip
Merge remote-tracking branch 'PayBas/ticket/12662' into develop-ascraeus
* PayBas/ticket/12662: (29 commits) [ticket/12662] Hide quick-links when empty [ticket/12662] Fix white-space issue to make dropdowns uniform [ticket/12662] Remove last remaining linklist outside navbars [ticket/12662] Use data-last-responsive attr instead of hardcoded list [ticket/12662] Remove <li> container from logged_out_content event [ticket/12662] Username <span> fix for list columns [ticket/12662] Fix notifications dropdown positioning for RTL [ticket/12662] Update tests that utilize get_username_string [ticket/12662] Update subsilver2 index template event names [ticket/12662] Update events docs from b5 to rc1/rc2 [ticket/12662] Move dropdown container from <li> to new inner div [ticket/12662] Remove linklist container and update template events [ticket/12662] Add span containers to all usernames for consistency [ticket/12662] IE8 fixes [ticket/12662] Fix responsive positioning of notifications dropdown [ticket/12662] Remove inherited props from ddown-extendended [ticket/12662] Change CSS selectors to direct descendants for linklist [ticket/12662] Reorder icon CSS rules alphabetically [ticket/12662] Use slack variable to determine line-break sensitivity [ticket/12662] Change new event names and fix events.md ...
Diffstat (limited to 'phpBB/assets/javascript/core.js')
-rw-r--r--phpBB/assets/javascript/core.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js
index 785aa141f0..02fb3ed08d 100644
--- a/phpBB/assets/javascript/core.js
+++ b/phpBB/assets/javascript/core.js
@@ -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');
}