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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Avoid showing parent box when collapsed
Aleix Suau01aa7914bc23
diff --git a/frontend/src/app/components/wp-fast-table/handlers/state/hierarchy-transformer.ts b/frontend/src/app/components/wp-fast-table/handlers/state/hierarchy-transformer.tsindex ecccaf30b79..9fa76006efb 100644--- a/frontend/src/app/components/wp-fast-table/handlers/state/hierarchy-transformer.ts+++ b/frontend/src/app/components/wp-fast-table/handlers/state/hierarchy-transformer.ts@@ -74,7 +74,18 @@ export class HierarchyTransformer {// Toggle the root stylejQuery(`.${hierarchyRootClass(wpId)} .wp-table--hierarchy-indicator`).toggleClass(indicatorCollapsedClass, isCollapsed);- // Get all affected rows+ // Get parent row and mark/unmark it as collapsed+ const hierarchyRoot = document.querySelector(`.wp-timeline-cell.__hierarchy-root-${wpId}`);++ if (hierarchyRoot) {+ if (isCollapsed) {+ hierarchyRoot.classList.add(`__hierarchy-root-collapsed`);+ } else {+ hierarchyRoot.classList.remove(`__hierarchy-root-collapsed`);+ }+ }++ // Get all affected children rowsconst affected = jQuery(`.${hierarchyGroupClass(wpId)}`);// Hide/Show the descendants.diff --git a/frontend/src/global_styles/content/work_packages/timelines/_timelines.sass b/frontend/src/global_styles/content/work_packages/timelines/_timelines.sassindex b8b296ea053..7eaf5da7779 100644--- a/frontend/src/global_styles/content/work_packages/timelines/_timelines.sass+++ b/frontend/src/global_styles/content/work_packages/timelines/_timelines.sass@@ -98,6 +98,9 @@background-color: #d3d3d361.wp-timeline-cell.row-hovered .children-duration-hover-container- display: block+ display: block++.wp-timeline-cell.__hierarchy-root-collapsed .children-duration-hover-container+ display: none