Merge branch 'dmp-refactoring' of code-repo.d4science.org:MaDgiK-CITE/argos into dmp-refactoring
This commit is contained in:
commit
04146f64f1
|
@ -56,9 +56,10 @@
|
|||
[ngClass]="{'field-container-active': fieldset.get('id').value === selectedFieldSetId}">
|
||||
<mat-card-content>
|
||||
|
||||
<mat-card-header *ngIf="(fieldset.get('id').value === selectedFieldSetId) && !viewOnly">
|
||||
<!-- <mat-card-header *ngIf="(fieldset.get('id').value === selectedFieldSetId) && !viewOnly"> -->
|
||||
<mat-card-header *ngIf="!viewOnly">
|
||||
<mat-icon *ngIf="reorderingMode" class="handle dragpan enabled-dragpan">drag_indicator</mat-icon>
|
||||
<button mat-icon-button class="ml-auto mr-auto" *ngIf="!reorderingMode" (click)="enableReordering()">
|
||||
<button mat-icon-button class="ml-auto mr-auto" *ngIf="!reorderingMode && (fieldset.get('id').value === selectedFieldSetId)" (click)="enableReordering()">
|
||||
<mat-icon class="handle dragpan">drag_indicator</mat-icon>
|
||||
</button>
|
||||
</mat-card-header>
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue