From 25c00ed545c7fbb90f655f6ed21ba5f95941347e Mon Sep 17 00:00:00 2001 From: Sofia Papacharalampous Date: Tue, 28 May 2024 14:57:47 +0300 Subject: [PATCH] description template editor: enable reordering from not-selected questions --- ...scription-template-editor-section-fieldset.component.html | 5 +++-- ...description-template-editor-section-fieldset.component.ts | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dmp-frontend/src/app/ui/admin/description-template/editor/components/section-fieldset/description-template-editor-section-fieldset.component.html b/dmp-frontend/src/app/ui/admin/description-template/editor/components/section-fieldset/description-template-editor-section-fieldset.component.html index 36befcf19..197ce50cf 100644 --- a/dmp-frontend/src/app/ui/admin/description-template/editor/components/section-fieldset/description-template-editor-section-fieldset.component.html +++ b/dmp-frontend/src/app/ui/admin/description-template/editor/components/section-fieldset/description-template-editor-section-fieldset.component.html @@ -56,9 +56,10 @@ [ngClass]="{'field-container-active': fieldset.get('id').value === selectedFieldSetId}"> - + + drag_indicator - diff --git a/dmp-frontend/src/app/ui/admin/description-template/editor/components/section-fieldset/description-template-editor-section-fieldset.component.ts b/dmp-frontend/src/app/ui/admin/description-template/editor/components/section-fieldset/description-template-editor-section-fieldset.component.ts index dfee0dbf1..ea96e861a 100644 --- a/dmp-frontend/src/app/ui/admin/description-template/editor/components/section-fieldset/description-template-editor-section-fieldset.component.ts +++ b/dmp-frontend/src/app/ui/admin/description-template/editor/components/section-fieldset/description-template-editor-section-fieldset.component.ts @@ -53,7 +53,7 @@ export class DescriptionTemplateEditorSectionFieldSetComponent implements OnInit this.dragulaService.createGroup(this.FIELDSETS, { moves: (el, container, handle) => { // if(this.viewOnly) return false; //uncomment if want to unable drag n drop in viewonly mode - if (el.id != (this.dragula_prefix + this.tocentry.id)) return false; + // if (el.id != (this.dragula_prefix + this.tocentry.id)) return false; if (handle.className && handle.classList.contains('handle')) return true; return false; } @@ -67,13 +67,14 @@ export class DescriptionTemplateEditorSectionFieldSetComponent implements OnInit // obs. + this.dataNeedsRefresh.emit(); return; })); this.subs.add(this.dragulaService.dragend(this.FIELDSETS).subscribe(({ el }) => { this.exitReordering(); - })) + })); const initializerSub = this.initializer .pipe(