Export Modified Final Version over exporter
- Adjusts the motion exporter to prefer modified final versions over "just" final versions - enhance the change detection of motion detail a little (editor and viewport changes)
This commit is contained in:
parent
4451fe979e
commit
e97292afdd
@ -672,6 +672,7 @@
|
||||
formControlName="modified_final_version"
|
||||
[init]="tinyMceSettings"
|
||||
required
|
||||
(onChange)="detectChanges()"
|
||||
></editor>
|
||||
<div
|
||||
*ngIf="
|
||||
@ -696,7 +697,7 @@
|
||||
|
||||
<!-- The HTML Editor for motions and traditional amendments -->
|
||||
<ng-container *ngIf="motion && editMotion && !motion.isParagraphBasedAmendment()">
|
||||
<editor formControlName="text" [init]="tinyMceSettings" required></editor>
|
||||
<editor formControlName="text" [init]="tinyMceSettings" (onChange)="detectChanges()" required></editor>
|
||||
<div
|
||||
*ngIf="
|
||||
contentForm.get('text').invalid &&
|
||||
|
@ -523,6 +523,13 @@ export class MotionDetailComponent extends BaseViewComponent implements OnInit,
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
/**
|
||||
* Check for changes of the viewport subject changes
|
||||
*/
|
||||
this.vp.isMobileSubject.subscribe(() => {
|
||||
this.cd.markForCheck();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1612,4 +1619,11 @@ export class MotionDetailComponent extends BaseViewComponent implements OnInit,
|
||||
public removeFromAgenda(): void {
|
||||
this.itemRepo.removeFromAgenda(this.motion.item).catch(this.raiseError);
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function so UI elements can call to detect changes
|
||||
*/
|
||||
public detectChanges(): void {
|
||||
this.cd.markForCheck();
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,7 @@
|
||||
<mat-button-toggle [value]="crMode.Diff" #diffVersionButton>
|
||||
<span translate>Diff version</span>
|
||||
</mat-button-toggle>
|
||||
<mat-button-toggle [value]="crMode.Final"> <span translate>Final version</span> </mat-button-toggle>
|
||||
<mat-button-toggle [value]="crMode.ModifiedFinal"> <span translate>Final version</span> </mat-button-toggle>
|
||||
</mat-button-toggle-group>
|
||||
</div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user