From dbb6fc2ebeffe3aac52a79fb937946b01e079606 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Thu, 17 Oct 2013 21:11:03 +0300 Subject: [PATCH] [ticket/11552] Responsive menu PHPBB3-11552 --- phpBB/styles/prosilver/template/forum_fn.js | 80 ++++++++++++++++++- .../prosilver/template/overall_header.html | 2 +- phpBB/styles/prosilver/theme/colours.css | 17 ++++ phpBB/styles/prosilver/theme/common.css | 69 ++++++++++++++++ 4 files changed, 163 insertions(+), 5 deletions(-) diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js index 8e06997d8d..aca0146792 100644 --- a/phpBB/styles/prosilver/template/forum_fn.js +++ b/phpBB/styles/prosilver/template/forum_fn.js @@ -465,7 +465,7 @@ function insert_single_user(formId, user) }); // Responsive breadcrumbs - $('.breadcrumbs').each(function() { + $('.breadcrumbs:not(.skip-responsive)').each(function() { var $this = $(this), $body = $('body'), links = $this.find('.crumb'), @@ -504,17 +504,23 @@ function insert_single_user(formId, user) if (wrapped) { $this.removeClass('wrapped').find('.crumb.wrapped').removeClass('wrapped ' + classes.join(' ')); wrapped = false; - if ($this.height() <= maxHeight) return; + if ($this.height() <= maxHeight) { + return; + } } wrapped = true; $this.addClass('wrapped'); - if ($this.height() <= maxHeight) return; + if ($this.height() <= maxHeight) { + return; + } for (i = 0; i < classesLength; i ++) { for (j = length; j >= 0; j --) { links.eq(j).addClass('wrapped ' + classes[i]); - if ($this.height() <= maxHeight) return; + if ($this.height() <= maxHeight) { + return; + } } } } @@ -523,5 +529,71 @@ function insert_single_user(formId, user) check(); $(window).resize(check); }); + + // Responsive link lists + $('.linklist:not(.navlinks, .skip-responsive)').each(function() { + var $this = $(this), + $body = $('body'), + links = $this.children().not('.skip-responsive'), + toggle = $this.append('