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

[30967] Disable drag and drop by default, enable only for global table

Oliver Günthered404b7ae61e
diff --git a/frontend/src/app/components/wp-fast-table/builders/drag-and-drop/drag-drop-handle-render-pass.ts b/frontend/src/app/components/wp-fast-table/builders/drag-and-drop/drag-drop-handle-render-pass.ts
index 2f6b7391693..a1d3884c558 100644
--- a/frontend/src/app/components/wp-fast-table/builders/drag-and-drop/drag-drop-handle-render-pass.ts
+++ b/frontend/src/app/components/wp-fast-table/builders/drag-and-drop/drag-drop-handle-render-pass.ts
@@ -20,6 +20,11 @@ export class DragDropHandleRenderPass {
}
public render() {
+ if (!this.table.configuration.dragAndDropEnabled) {
+ return;
+ }
+
+
this.wpTableOrder.withLoadedPositions().then((positions:QueryOrder) => {
this.tablePass.renderedOrder.forEach((row:RowRenderInfo, position:number) => {
// We only care for rows that are natural work packages and are not relation sub-rows
diff --git a/frontend/src/app/components/wp-table/wp-table-configuration.ts b/frontend/src/app/components/wp-table/wp-table-configuration.ts
index 845d8f0ee88..752f6eb2775 100644
--- a/frontend/src/app/components/wp-table/wp-table-configuration.ts
+++ b/frontend/src/app/components/wp-table/wp-table-configuration.ts
@@ -58,7 +58,7 @@ export class WorkPackageTableConfiguration {
public hierarchyToggleEnabled:boolean = true;
/** Whether this table supports drag and drop */
- public dragAndDropEnabled:boolean = true;
+ public dragAndDropEnabled:boolean = false;
/** Whether this table is in an embedded context*/
public isEmbedded:boolean = false;
diff --git a/frontend/src/app/modules/work_packages/routing/wp-list/wp-list.component.ts b/frontend/src/app/modules/work_packages/routing/wp-list/wp-list.component.ts
index c3f0a938924..4d956be1660 100644
--- a/frontend/src/app/modules/work_packages/routing/wp-list/wp-list.component.ts
+++ b/frontend/src/app/modules/work_packages/routing/wp-list/wp-list.component.ts
@@ -36,6 +36,7 @@ import {CausedUpdatesService} from "core-app/modules/boards/board/caused-updates
import {DragAndDropService} from "core-app/modules/common/drag-and-drop/drag-and-drop.service";
import {BcfDetectorService} from "core-app/modules/bcf/helper/bcf-detector.service";
import {wpDisplayCardRepresentation} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-display-representation.service";
+import {WorkPackageTableConfigurationObject} from "core-components/wp-table/wp-table-configuration";
@Component({
selector: 'wp-list',
@@ -88,6 +89,9 @@ export class WorkPackagesListComponent extends WorkPackagesViewBase implements O
private readonly titleService:OpTitleService = this.injector.get(OpTitleService);
private readonly bcfDetectorService:BcfDetectorService = this.injector.get(BcfDetectorService);
+ public readonly wpTableConfiguration:WorkPackageTableConfigurationObject = {
+ dragAndDropEnabled: true
+ };
ngOnInit() {
super.ngOnInit();
diff --git a/frontend/src/app/modules/work_packages/routing/wp-list/wp.list.component.html b/frontend/src/app/modules/work_packages/routing/wp-list/wp.list.component.html
index 8143bb90599..23729ee7804 100644
--- a/frontend/src/app/modules/work_packages/routing/wp-list/wp.list.component.html
+++ b/frontend/src/app/modules/work_packages/routing/wp-list/wp.list.component.html
@@ -79,6 +79,7 @@
<!-- TABLE + TIMELINE horizontal split -->
<wp-table *ngIf="tableInformationLoaded && showListView"
[projectIdentifier]="projectIdentifier"
+ [configuration]="wpTableConfiguration"
class="work-packages-split-view--tabletimeline-content"></wp-table>
<!-- GRID representation of the WP -->