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
[#55024] Remove bugfix that is not required anymore
Dombi Attilabc5d508b7a17
diff --git a/frontend/src/app/core/routing/openproject.routes.ts b/frontend/src/app/core/routing/openproject.routes.tsindex d1f3cf49cf0..ebb4709e386 100644--- a/frontend/src/app/core/routing/openproject.routes.ts+++ b/frontend/src/app/core/routing/openproject.routes.ts@@ -195,29 +195,6 @@ export function initializeUiRouterListeners(injector:Injector) {(transition) => redirectToMobileAlternative(transition),);- // Fire an event when navigating to a different module. This event then can be detected in- // the non-angular parts of the application. A usecase for this can be found in the- // overview-header.controllers.ts- // See https://community.openproject.org/wp/55024 for details.- $transitions.onBefore(- {},- (transition:Transition) => {- const fromState = transition.from();- const toState = transition.to();- if (- !!fromState.name- && !!toState.name- && fromState.name?.split('.')[0] !== toState.name?.split('.')[0]- ) {- window.dispatchEvent(new CustomEvent('angular:router:module-changed', {- detail: toState.name?.split('.')[0],- }));- }-- return true;- },- );-// Apply classes from bodyClasses in each state definition// This was defined as onEnter, onExit functions in each state before// but since AOT doesn't allow anonymous functions, we can't re-use them now.diff --git a/frontend/src/stimulus/controllers/dynamic/overview-header.controller.ts b/frontend/src/stimulus/controllers/dynamic/overview-header.controller.tsdeleted file mode 100644index c8c912e5905..00000000000--- a/frontend/src/stimulus/controllers/dynamic/overview-header.controller.ts+++ /dev/null@@ -1,52 +0,0 @@-/*- * -- copyright- * OpenProject is an open source project management software.- * Copyright (C) the OpenProject GmbH- *- * This program is free software; you can redistribute it and/or- * modify it under the terms of the GNU General Public License version 3.- *- * OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:- * Copyright (C) 2006-2013 Jean-Philippe Lang- * Copyright (C) 2010-2013 the ChiliProject Team- *- * This program is free software; you can redistribute it and/or- * modify it under the terms of the GNU General Public License- * as published by the Free Software Foundation; either version 2- * of the License, or (at your option) any later version.- *- * This program is distributed in the hope that it will be useful,- * but WITHOUT ANY WARRANTY; without even the implied warranty of- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the- * GNU General Public License for more details.- *- * You should have received a copy of the GNU General Public License- * along with this program; if not, write to the Free Software- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.- *- * See COPYRIGHT and LICENSE files for more details.- * ++- */--import { Controller } from '@hotwired/stimulus';--export default class OverviewHeaderController extends Controller {- connect() {- window.addEventListener('angular:router:module-changed', this.toggleHeaderVisibility);- }-- disconnect() {- window.removeEventListener('angular:router:module-changed', this.toggleHeaderVisibility);- }-- toggleHeaderVisibility = (event:CustomEvent) => {- const name = event.detail as string;- const element = this.element as HTMLElement;-- if (name === 'overview') {- element.classList.remove('d-none');- } else {- element.classList.add('d-none');- }- };-}diff --git a/modules/overviews/app/views/overviews/overviews/show.html.erb b/modules/overviews/app/views/overviews/overviews/show.html.erbindex bd1d6114ccb..cce3768ff98 100644--- a/modules/overviews/app/views/overviews/overviews/show.html.erb+++ b/modules/overviews/app/views/overviews/overviews/show.html.erb@@ -3,13 +3,7 @@<% end -%><%=- render(Primer::OpenProject::PageHeader.new(- data: {- 'controller': 'overview-header',- 'application-target': 'dynamic',- turbo: true- }- )) do |header|+ render(Primer::OpenProject::PageHeader.new) do |header|header.with_title(variant: :medium) { t("overviews.label") }header.with_breadcrumbs([