[ticket/11552] Keep first nav row on same line

PHPBB3-11552
This commit is contained in:
Vjacheslav Trushkin 2013-09-15 01:19:45 +03:00
parent b84f0791b2
commit 77a9635495

View file

@ -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),