refactoring
This commit is contained in:
@@ -13835,12 +13835,12 @@
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<h3>Comparison of the PRRs of two Symptoms</h3>
|
||||
<h3>Comparison of PRRs of two Symptoms</h3>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="x_content">
|
||||
<div style="margin-bottom: 20px;">
|
||||
<label>Select Symptom for X axis:</label>
|
||||
<label>Symptom for X axis:</label>
|
||||
<select id="symptomSelectX" name="symptom">
|
||||
<option disabled="" hidden="" selected="" value="">Select Symptom</option>
|
||||
<option value="17-hydroxyprogesterone">17-hydroxyprogesterone</option>
|
||||
@@ -27015,7 +27015,7 @@
|
||||
</select>
|
||||
</div>
|
||||
<div style="margin-bottom: 20px;">
|
||||
<label>Select Symptom for Y axis:</label>
|
||||
<label>Symptom for Y axis:</label>
|
||||
<select id="symptomSelectY" name="symptom">
|
||||
<option disabled="" hidden="" selected="" value="">Select Symptom</option>
|
||||
<option value="17-hydroxyprogesterone">17-hydroxyprogesterone</option>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
class PageInitializer {
|
||||
|
||||
static #symptomVsSymptomChartView;
|
||||
static #symptomX = 'Immunosuppression';
|
||||
static #symptomY = 'Immunoglobulin therapy';
|
||||
static #symptomX = null;
|
||||
static #symptomY = null;
|
||||
|
||||
static initializePage({ symptom, vaccine, symptomVsSymptomChart }) {
|
||||
PageInitializer.#configureSymptom(symptom);
|
||||
@@ -37,7 +37,7 @@ class PageInitializer {
|
||||
selectElement: symptomSelectXElement,
|
||||
onValueSelected: symptomX => {
|
||||
PageInitializer.#symptomX = symptomX;
|
||||
PageInitializer.#symptomVsSymptomChartView.loadAndDisplayChart(PageInitializer.#symptomX, PageInitializer.#symptomY);
|
||||
PageInitializer.#loadAndDisplayChart();
|
||||
},
|
||||
minimumInputLength: 4
|
||||
});
|
||||
@@ -46,11 +46,11 @@ class PageInitializer {
|
||||
selectElement: symptomSelectYElement,
|
||||
onValueSelected: symptomY => {
|
||||
PageInitializer.#symptomY = symptomY;
|
||||
PageInitializer.#symptomVsSymptomChartView.loadAndDisplayChart(PageInitializer.#symptomX, PageInitializer.#symptomY);
|
||||
PageInitializer.#loadAndDisplayChart();
|
||||
},
|
||||
minimumInputLength: 4
|
||||
});
|
||||
PageInitializer.#symptomVsSymptomChartView.loadAndDisplayChart(PageInitializer.#symptomX, PageInitializer.#symptomY);
|
||||
PageInitializer.#loadAndDisplayChart();
|
||||
}
|
||||
|
||||
static #initializeSelectElement({ selectElement, onValueSelected, minimumInputLength }) {
|
||||
@@ -62,4 +62,12 @@ class PageInitializer {
|
||||
onValueSelected(value);
|
||||
});
|
||||
}
|
||||
|
||||
static #loadAndDisplayChart() {
|
||||
if (PageInitializer.#symptomX != null && PageInitializer.#symptomY != null) {
|
||||
PageInitializer.#symptomVsSymptomChartView.loadAndDisplayChart(
|
||||
PageInitializer.#symptomX,
|
||||
PageInitializer.#symptomY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user