Tab buttons appear on pages that have no tabs (#23751).

Patch by Edouard Cunibil.

git-svn-id: http://svn.redmine.org/redmine/trunk@15853 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2016-10-01 08:55:56 +00:00
parent 1810283a66
commit 84ab16dcfe

View File

@@ -385,7 +385,7 @@ function displayTabsButtons() {
}
});
var bw = $(el).parents('div.tabs-buttons').outerWidth(true);
if ((tabsWidth < el.width() - bw) && (lis.first().is(':visible'))) {
if ((tabsWidth < el.width() - bw) && (lis.length === 0 || lis.first().is(':visible'))) {
el.find('div.tabs-buttons').hide();
} else {
el.find('div.tabs-buttons').show().children('button.tab-left').toggleClass('disabled', numHidden == 0);