styling pdf document
This commit is contained in:
@@ -70,6 +70,7 @@
|
|||||||
},
|
},
|
||||||
pdf: {
|
pdf: {
|
||||||
pdfButton: document.querySelector("#PDF"),
|
pdfButton: document.querySelector("#PDF"),
|
||||||
|
heading: document.querySelector("#heading").textContent,
|
||||||
valueName: 'Drugs'
|
valueName: 'Drugs'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -90,7 +91,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="page-title">
|
<div class="page-title">
|
||||||
<div class="title_left">
|
<div class="title_left">
|
||||||
<h1>EU Safety Signal (All drugs)</h1>
|
<h1 id="heading">EU Safety Signal (All drugs)</h1>
|
||||||
<div class="alert alert-danger alert-dismissible" role="alert">
|
<div class="alert alert-danger alert-dismissible" role="alert">
|
||||||
<button aria-label="Close" class="close" data-dismiss="alert" type="button">
|
<button aria-label="Close" class="close" data-dismiss="alert" type="button">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
|
|||||||
@@ -47,11 +47,11 @@ class PageInitializer {
|
|||||||
return prrBySymptomTableView;
|
return prrBySymptomTableView;
|
||||||
}
|
}
|
||||||
|
|
||||||
static #configurePDFButton({ pdf: { pdfButton, valueName }, symptom, vaccine }) {
|
static #configurePDFButton({ pdf: { pdfButton, heading, valueName }, symptom, vaccine }) {
|
||||||
pdfButton.addEventListener(
|
pdfButton.addEventListener(
|
||||||
'click',
|
'click',
|
||||||
() => PdfCreator
|
() => PdfCreator
|
||||||
.createPdf({ symptom, vaccine, valueName })
|
.createPdf({ symptom, vaccine, heading, valueName })
|
||||||
.open());
|
.open());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
class PdfCreator {
|
class PdfCreator {
|
||||||
|
|
||||||
static createPdf({ symptom, vaccine, valueName }) {
|
static createPdf({ symptom, vaccine, heading, valueName }) {
|
||||||
const documentDefinition = {
|
const documentDefinition = {
|
||||||
content: [
|
content: [
|
||||||
{
|
{
|
||||||
text: 'EU Safety Signal (All drugs)',
|
text: heading,
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
alignment: 'center',
|
alignment: 'center',
|
||||||
margin: [0, 0, 0, 20],
|
margin: [0, 0, 0, 20],
|
||||||
|
|||||||
@@ -70,6 +70,7 @@
|
|||||||
},
|
},
|
||||||
pdf: {
|
pdf: {
|
||||||
pdfButton: document.querySelector("#PDF"),
|
pdfButton: document.querySelector("#PDF"),
|
||||||
|
heading: document.querySelector("#heading").textContent,
|
||||||
valueName: 'Vaccines'
|
valueName: 'Vaccines'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -90,7 +91,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="page-title">
|
<div class="page-title">
|
||||||
<div class="title_left">
|
<div class="title_left">
|
||||||
<h1>VAERS Safety Signal</h1>
|
<h1 id="heading">VAERS Safety Signal</h1>
|
||||||
<div class="alert alert-danger alert-dismissible" role="alert">
|
<div class="alert alert-danger alert-dismissible" role="alert">
|
||||||
<button aria-label="Close" class="close" data-dismiss="alert" type="button">
|
<button aria-label="Close" class="close" data-dismiss="alert" type="button">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user