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

⭐️ Remove remaining traces to dynamic scripts ⭐

Aaron Contrerasefd3cfdbc662
diff --git a/app/views/messages/show.html.erb b/app/views/messages/show.html.erb
index da6c651e12c..5692762d9fe 100644
--- a/app/views/messages/show.html.erb
+++ b/app/views/messages/show.html.erb
@@ -27,10 +27,6 @@ See COPYRIGHT and LICENSE files for more details.
++#%>
-<% content_for :header_tags do %>
- <meta name="required_script" content="forums"/>
-<% end %>
-
<% breadcrumb_paths(
link_to(t(:label_forum_plural), project_forums_path(@project)),
link_to(h(@forum.name), project_forum_path(@project, @forum)))
diff --git a/frontend/src/app/core/augmenting/openproject-augmenting.module.ts b/frontend/src/app/core/augmenting/openproject-augmenting.module.ts
index 540f86dd928..873aac18512 100644
--- a/frontend/src/app/core/augmenting/openproject-augmenting.module.ts
+++ b/frontend/src/app/core/augmenting/openproject-augmenting.module.ts
@@ -29,17 +29,13 @@
import { NgModule } from '@angular/core';
import { OpenprojectModalModule } from 'core-app/shared/components/modal/modal.module';
import { OpModalWrapperAugmentService } from 'core-app/shared/components/modal/modal-wrapper-augment.service';
-import { PathScriptAugmentService } from 'core-app/core/augmenting/services/path-script.augment.service';
@NgModule({
imports: [OpenprojectModalModule],
- providers: [PathScriptAugmentService],
})
export class OpenprojectAugmentingModule {
- constructor(modalWrapper:OpModalWrapperAugmentService,
- pathScript:PathScriptAugmentService) {
+ constructor(modalWrapper:OpModalWrapperAugmentService) {
// Setup augmenting services
modalWrapper.setupListener();
- pathScript.loadRequiredScripts();
}
}
diff --git a/frontend/src/app/core/augmenting/services/path-script.augment.service.ts b/frontend/src/app/core/augmenting/services/path-script.augment.service.ts
deleted file mode 100644
index a5e25e3351e..00000000000
--- a/frontend/src/app/core/augmenting/services/path-script.augment.service.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-// -- copyright
-// OpenProject is an open source project management software.
-// Copyright (C) 2012-2023 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 { Inject, Injectable } from '@angular/core';
-import { DOCUMENT } from '@angular/common';
-import { debugLog } from 'core-app/shared/helpers/debug_output';
-
-@Injectable({ providedIn: 'root' })
-export class PathScriptAugmentService {
- constructor(@Inject(DOCUMENT) protected documentElement:Document) {
- }
-
- /**
- * Import required javascript paths from backend-rendered pages
- * This provides a replacement for the asset pipeline that was previously used
- * to load javascripts in the backend.
- *
- * This approach retains the ability to dynamically load code (from a specific set of paths only)
- * while defining the dependency in the rails template to ensure developer visibility.
- */
- public loadRequiredScripts() {
- const matches = this.documentElement.querySelectorAll<HTMLMetaElement>('meta[name="required_script"]');
- for (let i = 0; i < matches.length; ++i) {
- const name = matches[i].content;
- debugLog(`Loading required script ${name}`);
- import(`../dynamic-scripts/${name}`);
- }
- }
-}
diff --git a/frontend/src/tsconfig.app.json b/frontend/src/tsconfig.app.json
index 8d84483da06..aeda6f9c8a5 100644
--- a/frontend/src/tsconfig.app.json
+++ b/frontend/src/tsconfig.app.json
@@ -16,7 +16,6 @@
"src/**/*.ts",
"stimulus/**/*.ts",
"**/*.d.ts",
- "app/core/augmenting/dynamic-scripts/*.ts"
],
"exclude": [
"**/*.stories.*"
diff --git a/modules/storages/app/views/storages/admin/storages/edit.html.erb b/modules/storages/app/views/storages/admin/storages/edit.html.erb
index a4d300fc242..cebe804a9a0 100644
--- a/modules/storages/app/views/storages/admin/storages/edit.html.erb
+++ b/modules/storages/app/views/storages/admin/storages/edit.html.erb
@@ -1,10 +1,6 @@
<!-- Standard Ruby view, please see the controller for comments -->
<!-- We want to hide client_secret from the user while allowing the user to edit the other attributes -->
-<% content_for :header_tags do %>
- <meta name="required_script" content="storage_form"/>
-<% end %>
-
<% html_title t(:label_administration), t("project_module_storages"), t('label_edit_x', x: @object.name) %>
<% local_assigns[:additional_breadcrumb] = @object.name %>
<%= toolbar title: t('label_edit_x', x: @object.name) %>