Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Fix: add styles for disabled tabs

Wieland Lindenthalde7e3c97c6c9
diff --git a/app/assets/stylesheets/content/_tabs.sass b/app/assets/stylesheets/content/_tabs.sass
index c2a03056539..5b95fb4ae60 100644
--- a/app/assets/stylesheets/content/_tabs.sass
+++ b/app/assets/stylesheets/content/_tabs.sass
@@ -41,6 +41,7 @@
text-decoration: none
&:hover
text-decoration: none
+
li.tab-icon
width: 5%
.icon-context:before
@@ -63,6 +64,13 @@
li:hover
border-bottom-color: #DDDDDD
+ li.-disabled
+ cursor: default
+ pointer-events: none
+ border-bottom-width: 0
+ a
+ color: $tabs-font-color-disabled
+
content-tabs
min-height: 73px
display: block
diff --git a/frontend/src/app/components/wp-table/configuration-modal/wp-table-configuration.modal.html b/frontend/src/app/components/wp-table/configuration-modal/wp-table-configuration.modal.html
index 98db611cb6b..5bf86ea1f6c 100644
--- a/frontend/src/app/components/wp-table/configuration-modal/wp-table-configuration.modal.html
+++ b/frontend/src/app/components/wp-table/configuration-modal/wp-table-configuration.modal.html
@@ -22,10 +22,10 @@
class="content--tabs scrollable-tabs">
<ul class="tabrow">
<li *ngFor="let tab of availableTabs"
- [ngClass]="{ 'selected': currentTab && tab.name === currentTab.name }">
+ [ngClass]="{ 'selected': currentTab && tab.name === currentTab.name, '-disabled': tab.disableBecause != null }">
<a class="tab-show"
role="button"
- [ngClass]="{ '-disabled': tab.disableBecause != null, 'selected': currentTab && tab.name === currentTab.name }"
+ [ngClass]="{ 'selected': currentTab && tab.name === currentTab.name }"
[attr.title]="tab.disableBecause || tab.title"
[textContent]="tab.title"
(click)="switchTo(tab.name)"
diff --git a/lib/open_project/custom_styles/design.rb b/lib/open_project/custom_styles/design.rb
index 222035001a0..a12087e8452 100644
--- a/lib/open_project/custom_styles/design.rb
+++ b/lib/open_project/custom_styles/design.rb
@@ -174,6 +174,7 @@ module OpenProject
'table-row-hierarchies-row-font-color' => "#6C7A89",
'table-header-border-color' => "#D7D7D7",
'table-header-shadow-color' => "#DDDDDD",
+ 'tabs-font-color-disabled' => "$gray-dark",
'loading-indicator-bg-color' => "$body-background",
'loading-indicator-bg-opacity' => "0.8",
'loading-indicator-spinner-color' => "$primary-color",
diff --git a/spec/support/components/work_packages/table_configuration_modal.rb b/spec/support/components/work_packages/table_configuration_modal.rb
index 3aff039a0cd..e44e6c93ce2 100644
--- a/spec/support/components/work_packages/table_configuration_modal.rb
+++ b/spec/support/components/work_packages/table_configuration_modal.rb
@@ -88,7 +88,7 @@ module Components
end
def expect_disabled_tab(name)
- expect(page).to have_selector("#{selector} .tab-show.-disabled", text: name.upcase)
+ expect(page).to have_selector("#{selector} li.-disabled", text: name.upcase)
end
def selected_tab(name)