diff --git a/fec/data/templates/partials/browse-data/candidates.jinja b/fec/data/templates/partials/browse-data/candidates.jinja index 778ab2075..a2612369c 100644 --- a/fec/data/templates/partials/browse-data/candidates.jinja +++ b/fec/data/templates/partials/browse-data/candidates.jinja @@ -9,7 +9,7 @@

All candidates

Search candidates for president, Senate and House for all years by location, party and more.

- Download this data as .CSV to use on your own + Download this data as .CSV to use on your own
  • @@ -57,7 +57,7 @@ - Presidential candidate map exports + Presidential candidate map exports
  • @@ -112,7 +112,7 @@

    Most recent Statements of Candidacy (Form 2)

    Statements of Candidacy (Form 2) contain basic information about individuals running for federal office, including their names, addresses and authorized campaign committees.

    - Download this data as .CSV to use on your own + Download this data as .CSV to use on your own
  • diff --git a/fec/data/templates/partials/browse-data/filings-reports.jinja b/fec/data/templates/partials/browse-data/filings-reports.jinja index f5ad08a60..f34627f3d 100644 --- a/fec/data/templates/partials/browse-data/filings-reports.jinja +++ b/fec/data/templates/partials/browse-data/filings-reports.jinja @@ -38,7 +38,7 @@

    House and Senate committee reports

    Search financial disclosure reports filed by House and Senate committees on the Form 3. Search by committee name, candidate, amount of financial activity and report name.

    - Download this data as .CSV to use on your own + Download this data as .CSV to use on your own
  • @@ -51,7 +51,7 @@
  • False and fictitious filings

    - Download this data as .CSV to use on your own + Download this data as .CSV to use on your own
  • diff --git a/fec/data/templates/partials/browse-data/raising.jinja b/fec/data/templates/partials/browse-data/raising.jinja index 4cd1e49ea..2d381ffec 100644 --- a/fec/data/templates/partials/browse-data/raising.jinja +++ b/fec/data/templates/partials/browse-data/raising.jinja @@ -33,7 +33,7 @@

    Lobbyist bundled contributions

    - Download this data as .CSV to use on your own + Download this data as .CSV to use on your own
    diff --git a/fec/data/templates/partials/browse-data/spending.jinja b/fec/data/templates/partials/browse-data/spending.jinja index 420353054..af9770c89 100644 --- a/fec/data/templates/partials/browse-data/spending.jinja +++ b/fec/data/templates/partials/browse-data/spending.jinja @@ -18,7 +18,7 @@

    Independent expenditures

    Search independent expenditures to find specific spenders, candidates mentioned and transaction information.

    - Download this data as .CSV to use on your own + Download this data as .CSV to use on your own
  • @@ -51,7 +51,7 @@

    Electioneering communications

    Search electioneering communications by the spender, candidate mentioned, date, or amount spent.

    - Download this data as .CSV to use on your own + Download this data as .CSV to use on your own
  • @@ -59,7 +59,7 @@

    Communication costs

    Search communication costs for communications that support or oppose specific candidates. Search by date and amount spent.

    - Download this data as .CSV to use on your own + Download this data as .CSV to use on your own
  • diff --git a/fec/fec/static/js/pages/data-browse-data.js b/fec/fec/static/js/pages/data-browse-data.js index 557ad79d0..2ab3b1fbc 100644 --- a/fec/fec/static/js/pages/data-browse-data.js +++ b/fec/fec/static/js/pages/data-browse-data.js @@ -32,3 +32,23 @@ $(function() { new PlotChart('.js-spent-overview', 'spent', 2).init(); }); }); + +/** + * Add event listeners for buttons that want to remote trigger tabs and/or accordions + */ +const remoteEls = document.querySelectorAll('.js-remote-tabpanel, .js-remote-accordion'); +remoteEls.forEach((el) => { + el.addEventListener('click', handleRemoteClick.bind(this)); +}); + +function handleRemoteClick(e) { + e.preventDefault(); + + const targetHref = new URL(e.target.getAttribute('href')); + const targetTabId = targetHref.searchParams.get('tab'); + const targetAccordionId = targetHref.hash.substring(1); // (.hash also returns the #, so remove it) + + $(`[role="tab"][data-name="${targetTabId}"]`).trigger('click'); // trigger the tab click + $(`[aria-controls="${targetAccordionId}"][aria-expanded="false"]`).trigger('click'); // trigger the accordion click + if (targetAccordionId) location.hash = `#${targetAccordionId}`; // Jump to the accordion +} diff --git a/tasks.py b/tasks.py index b47d95abc..d6cc61ea6 100644 --- a/tasks.py +++ b/tasks.py @@ -76,7 +76,6 @@ def _detect_space(repo, branch=None, yes=False): ('dev', lambda _, branch: branch == 'develop'), # Uncomment below and adjust branch name to deploy desired feature branch to the feature space # ('feature', lambda _, branch: branch == '[BRANCH NAME]'), - ('feature', lambda _, branch: branch == 'feature/6338-7097-bulk-downloads'), )