Merge pull request #7660 from opf/fix/30967/disable-embedded-drag-and-drop

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

[ci skip]
pull/7665/head
Oliver Günther 5 years ago committed by GitHub
commit d27903c8a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      frontend/src/app/components/wp-fast-table/builders/drag-and-drop/drag-drop-handle-render-pass.ts
  2. 2
      frontend/src/app/components/wp-table/wp-table-configuration.ts
  3. 4
      frontend/src/app/modules/work_packages/routing/wp-list/wp-list.component.ts
  4. 1
      frontend/src/app/modules/work_packages/routing/wp-list/wp.list.component.html

@ -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

@ -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;

@ -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();

@ -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 -->

Loading…
Cancel
Save