diff options
author | Nils Adermann <naderman@naderman.de> | 2014-05-02 18:29:50 +0200 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2014-05-02 18:29:50 +0200 |
commit | b187031082aa41e5d2da5537ca403677dc7e05ce (patch) | |
tree | 39a0d07cf8d7454ee3586f7896450a95ddad8708 /phpBB/assets | |
parent | f0be9549ac14c49cad44b1476382aedf2a6f4af8 (diff) | |
parent | ed4b72d1f2e1cc96ebec845f9af97db406065c6b (diff) | |
download | forums-b187031082aa41e5d2da5537ca403677dc7e05ce.tar forums-b187031082aa41e5d2da5537ca403677dc7e05ce.tar.gz forums-b187031082aa41e5d2da5537ca403677dc7e05ce.tar.bz2 forums-b187031082aa41e5d2da5537ca403677dc7e05ce.tar.xz forums-b187031082aa41e5d2da5537ca403677dc7e05ce.zip |
Merge remote-tracking branch 'github-prototech/ticket/12265' into develop-ascraeus
* github-prototech/ticket/12265:
[ticket/12265] Actually use $u_pm.
[ticket/12265] Ensure that dropdown is always at the very left of the container
[ticket/12265] Define a loop for contact icons.
[ticket/12265] Break the icons that aren't in loop in case extensions add more
[ticket/12265] Fix modulo logic.
[ticket/12265] Adjust alignment of AIM and Jabber icons.
[ticket/12265] Ensure that there's only 4 icons per row in IE & Opera.
[ticket/12265] Add contact icon and remove border from last row & cells.
[ticket/12265] Fix issue with dropdown being restricted by the width of parent
[ticket/12265] Remove ugly logic.
[ticket/12265] Simplify contact icon design and move to dropdown.
Conflicts:
phpBB/viewtopic.php
Diffstat (limited to 'phpBB/assets')
-rw-r--r-- | phpBB/assets/javascript/core.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index 4920a1167f..a42701877b 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -918,9 +918,10 @@ phpbb.toggleDropdown = function() { // Check dimensions when showing dropdown // !visible because variable shows state of dropdown before it was toggled if (!visible) { + var windowWidth = $(window).width(); + options.dropdown.find('.dropdown-contents').each(function() { - var $this = $(this), - windowWidth = $(window).width(); + var $this = $(this); $this.css({ marginLeft: 0, @@ -938,6 +939,13 @@ phpbb.toggleDropdown = function() { $this.css('margin-left', (windowWidth - offset - width - 2) + 'px'); } }); + var freeSpace = parent.offset().left - 4; + + if (direction == 'left') { + options.dropdown.css('margin-left', '-' + freeSpace + 'px'); + } else { + options.dropdown.css('margin-right', '-' + (windowWidth + freeSpace) + 'px'); + } } // Prevent event propagation |