You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*Inline JS: Here is the JS to preserve zebra-striping in some of the legacy pages above that say "STAYS IN FullWidthPage TEMPLATE (AS-IS)". Only the ones that have multiple state election rows needed this.
Put this in html block below the table.
<script>
const dates_table = document.getElementsByClassName('election-dates-table')[0];
const bg = 'rgba(241,241,241,.5)';
const state_rows = dates_table.getElementsByTagName('tr');
let state_class = [];
for (const tr of state_rows) {
state_class.push(tr.classList.item(0));
}
let unique = [...new Set(state_class)];
for (let x = 0; x < unique.length; x += 2) {
const unique_row =dates_table.getElementsByClassName(unique[x]);
for (const un of unique_row) {
un.style.backgroundColor = bg;
}
}
</script>
Legacy reporting dates tables that use full_width_page.html template and reporting-dates-tables.js are converted to use reporting_dates_table.html and election-reporting-dates-tables.js (where necessary...when they have multiple footnotes and need JS)
Use the info tab of the page editor to see where that page is referenced (linked to) and make sure links work. Not sure, but may have to change links to external link with full url, or convert to html link with the same slug.
Add inline JS in html block to the three pages indicated in the. list above with "TODO" for zebra striping by state.
Remove reference to reporting-dates-tables.js in full_width_page.html and Delete reporting-dates-tables.js from filesystem (PR)
Summary
PR: #6512
What we're after:
Convert legacy Reporting dates tables to new template so we can remove redundant JS
full_width_page.html
template andreporting-dates-tables.js
reporting_dates_table.html
andelection-reporting-dates-tables.js
(renamed toreporting-dates-tables.js
)reporting-dates-tables.js
(full_width_page.html) in consultation with @djgarrreporting-dates-tables.js
and renameelection-reporting-dates-tables.js
to that name so that the template and the JS file have the same name.inventory of all pages using FullWidth page template:
Wagtail explorer list: https://www.fec.gov/admin/pages/usage/home/fullwidthpage/
Pages using FullWidth Template checklist:
Dates: 2020 reporting dates and deadlines 3 years ago Full width page Current page status:live
Dates: 2020 reporting dates and deadlines 3 years ago Full width page Current page status:live
Dates: 2020 reporting dates and deadlines 3 years ago Full width page Current page status:live
Dates: 2020 reporting dates and deadlines 3 years ago Full width page Current page status:live
Dates: 2020 reporting dates and deadlines 3 years ago Full width page Current page status:live
Dates: 2020 reporting dates and deadlines 3 years ago Full width page Current page status:live
Dates: 2020 reporting dates and deadlines 3 years ago Full width page Current page status:live
Dates: 2020 reporting dates and deadlines 3 years ago Full width page Current page status:live
Dates: 2020 reporting dates and deadlines 3 years ago Full width page Current page status:live
Dates: 2020 reporting dates and deadlines 3 years ago Full width page Current page status:live
Dates: 2020 reporting dates and deadlines 3 years ago Full width page Current page status:live
Dates: 2020 reporting dates and deadlines 3 years ago Full width page Current page status:live
Dates: 2020 reporting dates and deadlines 3 years ago Full width page Current page status:live
Dates: 2020 reporting dates and deadlines 3 years ago Full width page Current page status:live
Dates: 2020 reporting dates and deadlines 3 years ago Full width page Current page status:live
Dates: 2020 reporting dates and deadlines 3 years ago Full width page Current page status:live
Dates: 2020 reporting dates and deadlines 3 years ago Full width page Current page status:live
Dates: 2020 reporting dates and deadlines 3 years ago Full width page Current page status:live
Dates: 2021 reporting dates and deadlines 2 years ago Full width page Current page status:live
Dates: 2021 reporting dates and deadlines 2 years ago Full width page Current page status:live
Dates: 2021 reporting dates and deadlines 2 years ago Full width page Current page status:live
Dates: 2021 reporting dates and deadlines 2 years ago Full width page Current page status:live
Dates: 2022 reporting dates and deadlines 1 year ago Full width page Current page status:live
Dates: 2022 reporting dates and deadlines 2 years ago Full width page Current page status:live
Dates: 2022 reporting dates and deadlines 2 years ago Full width page Current page status:live
Dates: 2022 reporting dates and deadlines 2 years ago Full width page Current page status:live
Dates: 2022 reporting dates and deadlines 1 year ago Full width page Current page status:live
Dates: 2022 reporting dates and deadlines 1 year ago Full width page Current page status:live
Dates: 2022 reporting dates and deadlines 2 years ago Full width page Current page status:live
Dates: 2022 reporting dates and deadlines 2 years ago Full width page Current page status:live
Dates: 2022 reporting dates and deadlines 1 year ago Full width page Current page status:live
Dates: 2022 reporting dates and deadlines 2 years ago Full width page Current page status:live
Dates: 2022 reporting dates and deadlines 8 months ago Full width page Current page status:live
Dates: 2022 reporting dates and deadlines 8 months ago Full width page Current page status:live
Dates: 2023 reporting dates and deadlines 9 months ago Full width page Current page status:live
Dates: 2023 reporting dates and deadlines 9 months ago Full width page Current page status:live
Dates: 2023 reporting dates and deadlines 9 months ago Full width page Current page status:live
Dates: 2023 reporting dates and deadlines 9 months ago Full width page Current page status:live
Dates 2024 reporting dates and deadlines 8 months ago Full width page Current page status:live
Dates 2024 reporting dates and deadlines 1 month ago Full width page Current page status:live
Dates 2024 reporting dates and deadlines 8 months ago Full width page Current page status:live
Dates 2024 reporting dates and deadlines 1 month ago Full width page Current page status:live
Dates 2024 reporting dates and deadlines 8 months ago Full width page Current page status:live
Dates 2024 reporting dates and deadlines 8 months ago Full width page Current page status:live
Dates 2024 reporting dates and deadlines 1 month ago Full width page Current page status:live
- STAYS IN FullWidthPage TEMPLATE (AS-IS)
Dates 2024 reporting dates and deadlines 8 months ago Full width page Current page status:live
Dates 2024 reporting dates and deadlines 8 months ago Full width page Current page status:live
Dates 2024 reporting dates and deadlines 1 month ago Full width page Current page status:live
Dates 2024 reporting dates and deadlines 5 months ago Full width page Current page status:live
Put this in html block below the table.
Related issues/PRs
Issues:
#5153
PRs:
New:
#5786
#5798
Legacy: #3227
Removal:
#6512
Completion criteria
full_width_page.html
template andreporting-dates-tables.js
are converted to usereporting_dates_table.html
andelection-reporting-dates-tables.js
(where necessary...when they have multiple footnotes and need JS)reporting-dates-tables.js
infull_width_page.html
and Deletereporting-dates-tables.js
from filesystem (PR)data-init.js
in FullWidth template ? ( this was resolved by Add a11y modal dialog to global.js #6496)Tech steps or considerations (optional)
reporting-dates-tables.js
that is hardcoded into itFuture work
Other future work that may be needed following this issue's completion.
The text was updated successfully, but these errors were encountered: