-
- {{'DESCRIPTION-TEMPLATE-EDITOR.ACTIONS.FIELD.PREVIEW' | translate}}
-
-
-
-
- {{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.FIELD.STATUS.PREVIEW-UPDATED' | translate}}
-
-
- {{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.FIELD.STATUS.CALCULATING-PREVIEW' | translate}}
-
-
-
+
+
+
+
+
+
-
-
diff --git a/dmp-frontend/src/app/ui/admin/description-template/editor/components/composite-field/description-template-editor-composite-field.component.ts b/dmp-frontend/src/app/ui/admin/description-template/editor/components/composite-field/description-template-editor-composite-field.component.ts
index 73c0bc6d0..f4f777d95 100644
--- a/dmp-frontend/src/app/ui/admin/description-template/editor/components/composite-field/description-template-editor-composite-field.component.ts
+++ b/dmp-frontend/src/app/ui/admin/description-template/editor/components/composite-field/description-template-editor-composite-field.component.ts
@@ -50,6 +50,7 @@ export class DescriptionTemplateEditorCompositeFieldComponent extends BaseCompon
@Input() numbering: string;
@Input() hasFocus: boolean = false;
+ @Input() reorderingMode: boolean = false;
@ViewChild("inputs") inputs: TransitionGroupComponent;
@Input() validationErrorModel: ValidationErrorModel;
@Input() validationRootPath: string;
@@ -483,9 +484,6 @@ export class DescriptionTemplateEditorCompositeFieldComponent extends BaseCompon
}
-
-
-
addNewInput(type: DescriptionTemplateFieldType) {
const fieldsArray = this.form.get('fields') as UntypedFormArray;
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 84d5723b6..c3053d3de 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
@@ -49,18 +49,18 @@
-
+
+
+
+ unfold_more
+ {{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.TOOLKIT.REORDER-QUESTION' |
+ translate}}
+
+
+
+
+ unfold_more
+ {{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.TOOLKIT.EXIT-REORDERING-MODE' |
+ translate}}
+
+
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 f00c1c8e6..87f828289 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
@@ -33,6 +33,7 @@ export class DescriptionTemplateEditorSectionFieldSetComponent implements OnInit
idprefix = "id";
+ reorderingMode = false;
readonly dragula_prefix = "dragulaid";
private subs = new Subscription();
private FIELDSETS = 'FIELDSETS';
@@ -228,6 +229,16 @@ export class DescriptionTemplateEditorSectionFieldSetComponent implements OnInit
}, 200);
}
+ enableReordering(): void {
+ this.reorderingMode = true;
+ this.scroller.next(this.selectedFieldSetId);
+ }
+
+ exitReordering(): void {
+ this.reorderingMode = false;
+ this.scroller.next(this.selectedFieldSetId);
+ }
+
private _findTocEntryById(id: string, tocentries: ToCEntry[]): ToCEntry {
if (!tocentries) {
return null;
diff --git a/dmp-frontend/src/app/ui/description/listing/description-listing.component.ts b/dmp-frontend/src/app/ui/description/listing/description-listing.component.ts
index 66ac171a7..edbc8ff2c 100644
--- a/dmp-frontend/src/app/ui/description/listing/description-listing.component.ts
+++ b/dmp-frontend/src/app/ui/description/listing/description-listing.component.ts
@@ -332,7 +332,6 @@ export class DescriptionListingComponent extends BaseComponent implements OnInit
public restartTour(): void {
this.setDashboardTourDmpText();
- console.log('lalala');
this.setDashboardTourDescriptionText();
console.log(this.dashboardTour);
this.guidedTourService.startTour(this.dashboardTour);
diff --git a/dmp-frontend/src/assets/i18n/en.json b/dmp-frontend/src/assets/i18n/en.json
index 1ef318a07..3637858f8 100644
--- a/dmp-frontend/src/assets/i18n/en.json
+++ b/dmp-frontend/src/assets/i18n/en.json
@@ -557,7 +557,9 @@
"GENERAL-TOOLS": "Questions tools",
"NEW-INPUT-SET": "Add Question",
"CLONE": "Clone",
- "DELETE": "Delete"
+ "DELETE": "Delete",
+ "REORDER-QUESTION": "Reorder",
+ "EXIT-REORDERING-MODE": "I am done reordering"
}
},
"ACTIONS": {