diff options
| author | Vjacheslav Trushkin <cyberalien@gmail.com> | 2013-09-15 01:19:45 +0300 |
|---|---|---|
| committer | Vjacheslav Trushkin <cyberalien@gmail.com> | 2013-10-17 21:08:31 +0300 |
| commit | 77a963549590bec5819ab88aab7d947a130853f3 (patch) | |
| tree | 571a6b879b4fb39a97e3f318fa07165986f78811 /phpBB/styles/prosilver | |
| parent | b84f0791b23e311f7333ac195a8bfb7700231abc (diff) | |
| download | forums-77a963549590bec5819ab88aab7d947a130853f3.tar forums-77a963549590bec5819ab88aab7d947a130853f3.tar.gz forums-77a963549590bec5819ab88aab7d947a130853f3.tar.bz2 forums-77a963549590bec5819ab88aab7d947a130853f3.tar.xz forums-77a963549590bec5819ab88aab7d947a130853f3.zip | |
[ticket/11552] Keep first nav row on same line
PHPBB3-11552
Diffstat (limited to 'phpBB/styles/prosilver')
| -rw-r--r-- | phpBB/styles/prosilver/template/forum_fn.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js index 316ab1e66f..fca0f0d701 100644 --- a/phpBB/styles/prosilver/template/forum_fn.js +++ b/phpBB/styles/prosilver/template/forum_fn.js @@ -442,6 +442,28 @@ function insert_single_user(formId, user) $('ul.linklist.bulletin li:first-child, ul.linklist.bulletin li.rightside:last-child').addClass('no-bulletin'); } + // Resize navigation block to keep all links on same line + $('.navlinks').each(function() { + var $this = $(this), + left = $this.children().not('.rightside'), + right = $this.children('.rightside'); + + if (left.length !== 1 || !right.length) return; + + function resize() { + var width = 0, + diff = left.outerWidth(true) - left.width(); + + right.each(function() { + width += $(this).outerWidth(true); + }); + left.css('max-width', Math.floor($this.width() - width - diff) + 'px'); + } + + resize(); + $(window).resize(resize); + }); + // Responsive breadcrumbs $('.breadcrumbs').each(function() { var $this = $(this), |
