diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js index 29e02af034..ec5e7cc946 100644 --- a/phpBB/styles/prosilver/template/forum_fn.js +++ b/phpBB/styles/prosilver/template/forum_fn.js @@ -516,7 +516,7 @@ function insert_single_user(formId, user) } for (i = 0; i < classesLength; i ++) { - for (j = length; j >= 0; j --) { + for (j = length; j > 0; j --) { links.eq(j).addClass('wrapped ' + classes[i]); if ($this.height() <= maxHeight) { return; @@ -547,7 +547,8 @@ function insert_single_user(formId, user) } var toggle = $this.children('.responsive-menu'), - menu = toggle.find('.responsive-popup'), + toggleLink = toggle.find('a.responsive-menu-link'), + menu = toggle.find('ul.responsive-popup'), lastWidth = false, responsive = false, copied = false; @@ -591,7 +592,7 @@ function insert_single_user(formId, user) $this.addClass('responsive'); } - toggle.click(function() { + toggleLink.click(function() { if (!responsive) return; if (!toggle.hasClass('visible')) { // Hide other popups @@ -610,5 +611,68 @@ function insert_single_user(formId, user) $('.responsive-menu.visible').removeClass('visible').find('.responsive-popup').hide(); } }); + + // Responsive tabs + $('#tabs').not('.skip-responsive').each(function() { + var $this = $(this), + $body = $('body'), + ul = $this.children(), + tabs = ul.children().not('.skip-responsive'), + links = tabs.children('a'), + toggle = ul.append('