diff --git a/docs/BatchCodeSelectInitializer.js b/docs/BatchCodeSelectInitializer.js index 0090879e31d..ce7ec78dbbd 100644 --- a/docs/BatchCodeSelectInitializer.js +++ b/docs/BatchCodeSelectInitializer.js @@ -1,17 +1,21 @@ class BatchCodeSelectInitializer { - static initialize({ batchCodeSelectElement, batchCodeDetailsElement, batchCodeHeadingElement }) { + static initialize({ batchCodeSelectElement, urlSearchParam, batchCodeDetailsElement, batchCodeHeadingElement }) { const batchCodeDetailsView = new BatchCodeDetailsView(batchCodeDetailsElement); - batchCodeSelectElement.select2({ minimumInputLength: 4 }); - batchCodeSelectElement.on( - 'select2:select', - function (event) { - BatchCodeSelectInitializer.#onBatchCodeSelected( - { - batchcode: event.params.data.id, - batchCodeHeadingElement: batchCodeHeadingElement, - batchCodeDetailsView: batchCodeDetailsView - }); + Select2.initializeSelectElement( + { + selectElement: batchCodeSelectElement, + minimumInputLength: 4, + textOfOption2Select: urlSearchParam.get(), + onSelectOptionHavingValueAndText: (id, text) => { + BatchCodeSelectInitializer.#onBatchCodeSelected( + { + batchcode: id, + batchCodeHeadingElement: batchCodeHeadingElement, + batchCodeDetailsView: batchCodeDetailsView + }); + urlSearchParam.set(text); + } }); batchCodeSelectElement.select2('open'); } diff --git a/docs/HowBadIsMyBatch.html b/docs/HowBadIsMyBatch.html index 3ee1dafd298..220dce42cd5 100644 --- a/docs/HowBadIsMyBatch.html +++ b/docs/HowBadIsMyBatch.html @@ -1,47 +1,52 @@ + - - - - - -How Bad is My Batch? - - - + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + -
-
- -
-
- - -
-
-
-
-

How Bad is My Batch?

-
-
-
-

- Visit the main page How Bad is My Batch - -

-

- - -

-
-
-

-
-
-
-
-
-
-
-

Outcomes of Adverse Events

-
-
-
- -
-
-
-
-
-
-

Frequencies of Reported Symptoms

-
-
-
- - - - - - - -
SymptomFrequency
-
-
-
-
-
-
-
-
- - - -
- - - - - - - - - - - - - - + +
+ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/SymptomsCausedByDrugs/js/Select2.js b/docs/Select2.js similarity index 100% rename from docs/SymptomsCausedByDrugs/js/Select2.js rename to docs/Select2.js diff --git a/docs/SymptomsCausedByDrugs/index.html b/docs/SymptomsCausedByDrugs/index.html index 33ae913538a..0eb9d83444d 100644 --- a/docs/SymptomsCausedByDrugs/index.html +++ b/docs/SymptomsCausedByDrugs/index.html @@ -16,28 +16,28 @@ gtag('config', 'G-ERHYDH4P64'); - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - -
-Fork me on + + +
+

+ Data Source + +

+ Fork me on GitHub
diff --git a/docs/SymptomsCausedByDrugs/js/PageInitializer.js b/docs/SymptomsCausedByDrugs/js/PageInitializer.js index 7cb92e0faca..fe65134d0b5 100644 --- a/docs/SymptomsCausedByDrugs/js/PageInitializer.js +++ b/docs/SymptomsCausedByDrugs/js/PageInitializer.js @@ -5,29 +5,29 @@ class PageInitializer { PageInitializer.#configureVaccine(vaccine); } - static #configureSymptom({ symptomSelectElement, searchParam, prrByVaccineTableElement, downloadPrrByVaccineTableButton, keyColumnName }) { + static #configureSymptom({ symptomSelectElement, urlSearchParam, prrByVaccineTableElement, downloadPrrByVaccineTableButton, keyColumnName }) { const prrByVaccineTableView = new PrrByVaccineTableView(prrByVaccineTableElement, downloadPrrByVaccineTableButton, keyColumnName); Select2.initializeSelectElement( { selectElement: symptomSelectElement, - textOfOption2Select: searchParam.get(), + minimumInputLength: 0, + textOfOption2Select: urlSearchParam.get(), onSelectOptionHavingValueAndText: (id, text) => { prrByVaccineTableView.displayPrrByVaccineTable4Symptom(id, text); - searchParam.set(text); - }, - minimumInputLength: 0 + urlSearchParam.set(text); + } }); } - static #configureVaccine({ vaccineSelectElement, searchParam, prrBySymptomTableElement, downloadPrrBySymptomTableButton, valueName }) { + static #configureVaccine({ vaccineSelectElement, urlSearchParam, prrBySymptomTableElement, downloadPrrBySymptomTableButton, valueName }) { const prrBySymptomTableView = new PrrBySymptomTableView(prrBySymptomTableElement, downloadPrrBySymptomTableButton, valueName); Select2.initializeSelectElement( { selectElement: vaccineSelectElement, - textOfOption2Select: searchParam.get(), + textOfOption2Select: urlSearchParam.get(), onSelectOptionHavingValueAndText: (id, text) => { prrBySymptomTableView.displayPrrBySymptomTable4Vaccine(id, text); - searchParam.set(text); + urlSearchParam.set(text); }, minimumInputLength: 0 }); diff --git a/docs/SymptomsCausedByVaccines/index.html b/docs/SymptomsCausedByVaccines/index.html index ae54e5d9f1b..e18e21c2dec 100644 --- a/docs/SymptomsCausedByVaccines/index.html +++ b/docs/SymptomsCausedByVaccines/index.html @@ -16,28 +16,28 @@ gtag('config', 'G-ERHYDH4P64'); - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - -
-Fork me on + + +
+

+ Data Source + +

+ Fork me on GitHub
diff --git a/docs/SymptomsCausedByDrugs/js/SearchParam.js b/docs/URLSearchParam.js similarity index 90% rename from docs/SymptomsCausedByDrugs/js/SearchParam.js rename to docs/URLSearchParam.js index d22583d1bec..71df8ae03e0 100644 --- a/docs/SymptomsCausedByDrugs/js/SearchParam.js +++ b/docs/URLSearchParam.js @@ -1,4 +1,4 @@ -class SearchParam { +class URLSearchParam { #name; diff --git a/docs/UrlUtils.js b/docs/UrlUtils.js index eb84b60ebab..6b0fcfc828d 100644 --- a/docs/UrlUtils.js +++ b/docs/UrlUtils.js @@ -1,13 +1,13 @@ class UrlUtils { - static isSearchParamYES(urlParams, searchParam) { - return UrlUtils.#getSearchParam(urlParams, searchParam, 'NO').toUpperCase() == 'YES'; + static isSearchParamYES(urlParams, urlSearchParam) { + return UrlUtils.#getSearchParam(urlParams, urlSearchParam, 'NO').toUpperCase() == 'YES'; } - static getSearchParamOfCurrentUrl(searchParam) { + static getSearchParamOfCurrentUrl(urlSearchParam) { return UrlUtils.#getSearchParam( new URLSearchParams(window.location.search), - searchParam, + urlSearchParam, null) } @@ -25,9 +25,9 @@ class UrlUtils { a.click(); } - static #getSearchParam(urlParams, searchParam, defaultValue) { - return urlParams.has(searchParam) ? - urlParams.get(searchParam) : + static #getSearchParam(urlParams, urlSearchParam, defaultValue) { + return urlParams.has(urlSearchParam) ? + urlParams.get(urlSearchParam) : defaultValue; } diff --git a/src/help.txt b/src/help.txt index cd81f2509b8..f085baec496 100644 --- a/src/help.txt +++ b/src/help.txt @@ -4,8 +4,7 @@ Local: - http://www.howbadismybatch.info/VaccineDistributionByZipcode.html - http://www.howbadismybatch.info/SymptomsCausedByVaccines/index.html http://www.howbadismybatch.info/SymptomsCausedByVaccines/test/index.test.html -- http://www.howbadismybatch.info/SymptomsCausedByCOVIDLots/index.html - http://www.howbadismybatch.info/SymptomsCausedByCOVIDLots/test/index.test.html +- http://www.howbadismybatch.info/SymptomsCausedByDrugs/index.html Live: - https://knollfrank.github.io/HowBadIsMyBatch/batchCodeTable.html @@ -13,8 +12,7 @@ Live: - https://knollfrank.github.io/HowBadIsMyBatch/VaccineDistributionByZipcode.html - https://knollfrank.github.io/HowBadIsMyBatch/SymptomsCausedByVaccines/index.html https://knollfrank.github.io/HowBadIsMyBatch/SymptomsCausedByVaccines/test/index.test.html -- https://knollfrank.github.io/HowBadIsMyBatch/SymptomsCausedByCOVIDLots/index.html - https://knollfrank.github.io/HowBadIsMyBatch/SymptomsCausedByCOVIDLots/test/index.test.html +- https://knollfrank.github.io/HowBadIsMyBatch/SymptomsCausedByDrugs/index.html jupyter notebook