From 9ccccb8baac5649777da9125be2fab494106d725 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Sun, 15 Sep 2013 18:19:15 +0300 Subject: [PATCH] [ticket/11552] Fixes for tabs and breadcrumbs PHPBB3-11552 --- phpBB/styles/prosilver/template/forum_fn.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js index b22f33daf3..dfcfa09d76 100644 --- a/phpBB/styles/prosilver/template/forum_fn.js +++ b/phpBB/styles/prosilver/template/forum_fn.js @@ -519,7 +519,7 @@ function insert_single_user(formId, user) } for (i = 0; i < classesLength; i ++) { - for (j = length; j > 0; j --) { + for (j = length - 1; j >= 0; j --) { links.eq(j).addClass('wrapped ' + classes[i]); if ($this.height() <= maxHeight) { return; @@ -653,14 +653,16 @@ function insert_single_user(formId, user) total = availableTabs.length, i, tab; - for (i = total; i > 0; i --) { + for (i = total - 1; i >= 0; i --) { tab = availableTabs.eq(i); menu.prepend(tab.clone(true)); tab.hide(); if ($this.height() <= maxHeight) { + menu.find('a').click(function() { check(true); }); return; } } + menu.find('a').click(function() { check(true); }); } toggleLink.click(function() {