diff --git a/fec/data/templates/election-lookup.jinja b/fec/data/templates/election-lookup.jinja index 3ed6763b38..ed0cad1e1b 100644 --- a/fec/data/templates/election-lookup.jinja +++ b/fec/data/templates/election-lookup.jinja @@ -112,6 +112,6 @@ var context = { } }; - - + + {% endblock %} diff --git a/fec/data/templates/elections.jinja b/fec/data/templates/elections.jinja index 40c7bcd4b6..48521d1981 100644 --- a/fec/data/templates/elections.jinja +++ b/fec/data/templates/elections.jinja @@ -62,7 +62,7 @@ var context = { }; - - + + {% endblock %} diff --git a/fec/data/templates/landing.jinja b/fec/data/templates/landing.jinja index 8237d94d0a..06a139372b 100644 --- a/fec/data/templates/landing.jinja +++ b/fec/data/templates/landing.jinja @@ -301,6 +301,6 @@ {% endblock %} {% block scripts %} - - + + {% endblock %} diff --git a/fec/fec/static/js/modules/election-map.js b/fec/fec/static/js/modules/election-map.js index e908d2a6d3..c36cb9c509 100644 --- a/fec/fec/static/js/modules/election-map.js +++ b/fec/fec/static/js/modules/election-map.js @@ -234,8 +234,9 @@ ElectionMap.prototype.handleReset = function(e) { */ ElectionMap.prototype.hide = function() { this.elm.setAttribute('aria-hidden', 'true'); - this.mapMessage.setAttribute('aria-hidden', 'false'); - this.mapApproxMessage.setAttribute('aria-hidden', 'true'); + if (this.mapMessage) this.mapMessage.setAttribute('aria-hidden', 'false'); + if (this.mapApproxMessage) + this.mapApproxMessage.setAttribute('aria-hidden', 'true'); }; /** @@ -243,8 +244,9 @@ ElectionMap.prototype.hide = function() { */ ElectionMap.prototype.show = function() { this.elm.setAttribute('aria-hidden', 'false'); - this.mapMessage.setAttribute('aria-hidden', 'true'); - this.mapApproxMessage.setAttribute('aria-hidden', 'false'); + if (this.mapMessage) this.mapMessage.setAttribute('aria-hidden', 'true'); + if (this.mapApproxMessage) + this.mapApproxMessage.setAttribute('aria-hidden', 'false'); }; module.exports = { diff --git a/fec/fec/templates/base.html b/fec/fec/templates/base.html index f33bbc7004..951c63da53 100644 --- a/fec/fec/templates/base.html +++ b/fec/fec/templates/base.html @@ -161,8 +161,8 @@

Your browser is outdated

{# Global javascript #} - - + + - + + {% block extra_js %} diff --git a/fec/home/templates/home/home_page.html b/fec/home/templates/home/home_page.html index 68107c3594..2a05c7b599 100644 --- a/fec/home/templates/home/home_page.html +++ b/fec/home/templates/home/home_page.html @@ -18,7 +18,7 @@

Protecting the integrity of the campaign finance process - {% comment %} + {% comment %} Below is for featured icon+links in Wagtail html block only...for now. {% endcomment %} {% for block in self.body %} @@ -105,31 +105,42 @@

Commissioners

if (!canSkipPolyfills) { var pfScriptElem = document.createElement('script'); pfScriptElem.async = false; + pfScriptElem.defer = false; pfScriptElem.src = "{% asset_for_js 'polyfills.js' %}"; document.head.appendChild(pfScriptElem); } - - - - + + + {% endblock %}