aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2015-04-02 21:22:12 +0200
committerMarc Alexander <admin@m-a-styles.de>2015-04-02 21:22:12 +0200
commit418aabb46e6515a292c8c6ef9eaadac377a858cb (patch)
tree6ae3cb69b53b9c81eba1ac503cbdfded6d88e277
parent335520fc45f1d7a907b9e7a1f2328ea294f6ad13 (diff)
parent90b82d1a5f80b59edbe7335706f196e3d7feaf0e (diff)
downloadforums-418aabb46e6515a292c8c6ef9eaadac377a858cb.tar
forums-418aabb46e6515a292c8c6ef9eaadac377a858cb.tar.gz
forums-418aabb46e6515a292c8c6ef9eaadac377a858cb.tar.bz2
forums-418aabb46e6515a292c8c6ef9eaadac377a858cb.tar.xz
forums-418aabb46e6515a292c8c6ef9eaadac377a858cb.zip
Merge pull request #3508 from cyberalien/ticket/13726
[ticket/13726] Fix function that calculates responsive breadcrumbs width
-rw-r--r--phpBB/styles/prosilver/template/forum_fn.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js
index 5d17bf50d2..7a377a4973 100644
--- a/phpBB/styles/prosilver/template/forum_fn.js
+++ b/phpBB/styles/prosilver/template/forum_fn.js
@@ -376,12 +376,19 @@ function parseDocument($container) {
function resize() {
var width = 0,
- diff = $left.outerWidth(true) - $left.width();
+ diff = $left.outerWidth(true) - $left.width(),
+ minWidth = Math.max($this.width() / 3, 240),
+ maxWidth;
$right.each(function() {
- width += $(this).outerWidth(true);
+ var $this = $(this);
+ if ($this.is(':visible')) {
+ width += $this.outerWidth(true);
+ }
});
- $left.css('max-width', Math.floor($this.width() - width - diff) + 'px');
+
+ maxWidth = $this.width() - width - diff;
+ $left.css('max-width', Math.floor(Math.max(maxWidth, minWidth)) + 'px');
}
resize();