Skip to content
Snippets Groups Projects
Verified Commit 9ebbcc1a authored by Florian Azizian's avatar Florian Azizian
Browse files

FEAT #14484 TIME 2:15 Implrove trafficRecord displaying in pdf + remove...

FEAT #14484 TIME 2:15 Implrove trafficRecord displaying in pdf + remove tinymce in OnDestroy  + add source code button
parent 80eb0f0a
No related branches found
No related tags found
No related merge requests found
......@@ -724,8 +724,7 @@ class SummarySheetController
$pdf->SetFont('', '', 9);
$parameter = ParameterModel::getById(['select' => ['param_value_string'], 'id' => 'traffic_record_summary_sheet']);
$pdf->writeHTMLCell(575, 0, 25, $pdf->GetY(), $parameter['param_value_string']);
// $pdf->writeHTML($parameter['param_value_string']);
$pdf->writeHTMLCell($widthNoMargins + $dimensions['lm'], 0, $dimensions['lm'] - 2, $pdf->GetY(), $parameter['param_value_string']);
}
}
}
......
......@@ -87,7 +87,7 @@ export class ParametersCustomizationComponent implements OnInit, OnDestroy {
tap(() => this.saveParameter('traffic_record_summary_sheet'))
).subscribe();
this.initMce();
}, 0);
}, 100);
}),
catchError((err: any) => {
this.notify.handleSoftErrors(err);
......@@ -118,18 +118,19 @@ export class ParametersCustomizationComponent implements OnInit, OnDestroy {
statusbar: false,
readonly: readonly,
plugins: [
'autolink', 'table'
'autolink', 'table', 'code'
],
external_plugins: {
'maarch_b64image': '../../src/frontend/plugins/tinymce/maarch_b64image/plugin.min.js'
},
table_toolbar: '',
table_sizing_mode: 'relative',
table_resize_bars: false,
toolbar_sticky: true,
toolbar_drawer: 'floating',
toolbar: !readonly ? 'undo redo | fontselect fontsizeselect | bold italic underline strikethrough forecolor | table maarch_b64image | \
alignleft aligncenter alignright alignjustify \
bullist numlist outdent indent | removeformat' : ''
bullist numlist outdent indent | removeformat code' : ''
});
}
......
import { Component, OnInit, Inject } from '@angular/core';
import { Component, OnInit, Inject, OnDestroy } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { TranslateService } from '@ngx-translate/core';
import { NotificationService } from '../../../service/notification/notification.service';
......@@ -13,7 +13,7 @@ declare var tinymce: any;
templateUrl: 'summary-sheet.component.html',
styleUrls: ['summary-sheet.component.scss']
})
export class SummarySheetComponent implements OnInit {
export class SummarySheetComponent implements OnInit, OnDestroy {
loading: boolean = false;
withQrcode: boolean = true;
......@@ -141,12 +141,16 @@ export class SummarySheetComponent implements OnInit {
});
setTimeout(() => {
this.initMce();
});
}, 200);
}
})
).subscribe();
}
ngOnDestroy() {
tinymce.remove('textarea');
}
initMce() {
tinymce.init({
selector: 'textarea',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment