Sets the default value for sequential numbers in export dialog

This commit is contained in:
GabrielMeyer 2019-08-20 12:37:42 +02:00
parent bbe294a1ad
commit 3b9491224f

View File

@ -49,7 +49,7 @@ export class MotionExportDialogComponent implements OnInit {
format: ExportFileFormat.PDF, format: ExportFileFormat.PDF,
content: ['text', 'reason'], content: ['text', 'reason'],
pdfOptions: ['toc', 'page'], pdfOptions: ['toc', 'page'],
metaInfo: ['submitters', 'state', 'recommendation', 'category', 'origin', 'tags', 'motion_block', 'polls', 'id'] metaInfo: ['submitters', 'state', 'recommendation', 'category', 'origin', 'tags', 'motion_block', 'polls']
}; };
/** /**
@ -96,6 +96,9 @@ export class MotionExportDialogComponent implements OnInit {
) { ) {
this.defaults.lnMode = this.configService.instant('motions_default_line_numbering'); this.defaults.lnMode = this.configService.instant('motions_default_line_numbering');
this.defaults.crMode = this.configService.instant('motions_recommendation_text_mode'); this.defaults.crMode = this.configService.instant('motions_recommendation_text_mode');
if (this.configService.instant('motions_show_sequential_numbers')) {
this.defaults.metaInfo.push('id');
}
// Get the export order, exclude everything that does not count as meta-data // Get the export order, exclude everything that does not count as meta-data
this.metaInfoExportOrder = motionImportExportHeaderOrder.filter(metaData => { this.metaInfoExportOrder = motionImportExportHeaderOrder.filter(metaData => {
return !noMetaData.some(noMeta => metaData === noMeta); return !noMetaData.some(noMeta => metaData === noMeta);