Defect #23751

Tab buttons appear on pages that have no tabs

Added by Edouard Cunibil about 1 year ago. Updated about 1 year ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:UI
Target version:3.3.1
Resolution:Fixed Affected version:3.3.0

Description

The JS condition that's supposed to hide the tab buttons checks if the first LI element is visible or not.
If there is no LI element, the tab buttons are always shown.

file: public/javascripts/application.js
line: 383

replace:

if ((tabsWidth < el.width() - bw) && (lis.first().is(':visible'))) {

by:

if ((tabsWidth < el.width() - bw) && (lis.length === 0 || lis.first().is(':visible'))) {

In case it helps, here is my environemt:

Environment:
  Redmine version                3.3.0.stable
  Ruby version                   2.1.5-p273 (2014-11-13) [x86_64-linux-gnu]
  Rails version                  4.2.6
  Environment                    production
  Database adapter               Mysql2
SCM:
  Git                            2.1.4
  Filesystem                     
Redmine plugins:
  redmine_agile                  1.4.1
  redmine_backlogs               v1.0.6
  redmine_checklists             3.1.3

Sorry not provinding a patch but I'm a Git guy so I don't have anything related to SVN installed on my system.

fix-tabs.diff Magnifier (934 Bytes) Edouard Cunibil, 2016-09-02 13:29

23751.jpg (158 KB) Go MAEDA, 2016-09-04 05:34

Associated revisions

Revision 15853
Added by Jean-Philippe Lang about 1 year ago

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

Patch by Edouard Cunibil.

History

#1 Updated by Marius BALTEANU about 1 year ago

E C wrote:

Sorry not provinding a patch but I'm a Git guy so I don't have anything related to SVN installed on my system.

You don't need SVN to generate a patch. Check How_to_create_patch_series_on_Mercurial_and_Git or use the command git diff > path_to_patch

#2 Updated by Edouard Cunibil about 1 year ago

Thank you for the pointer. You might add it on the Submissions wiki page.
Here is the patch.

#3 Updated by Go MAEDA about 1 year ago

  • File 23751.jpg added
  • Target version set to 3.3.1

I confirmed this issue by removing all li elements in div#main-menu ul.

#4 Updated by Jean-Philippe Lang about 1 year ago

  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Patch committed, thanks.

Also available in: Atom PDF