aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2019-02-01 15:42:42 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2019-02-01 15:42:42 +0000
commitda683b48aac5e43321d097f127fa5e09b35badd6 (patch)
treedf93da94b9c9b5c63ed7ad3d2a946c380e977ced
parent5e946a60ac98c984ca21ba3203ccb03be17d9a39 (diff)
[UK Councils] Only load map JavaScript on map pages.
And load main assets script so highways script does not error.
-rw-r--r--templates/web/fixmystreet-uk-councils/footer_extra_js.html11
-rw-r--r--templates/web/oxfordshire/footer_extra_js.html8
2 files changed, 15 insertions, 4 deletions
diff --git a/templates/web/fixmystreet-uk-councils/footer_extra_js.html b/templates/web/fixmystreet-uk-councils/footer_extra_js.html
index 1742a55e2..76451344b 100644
--- a/templates/web/fixmystreet-uk-councils/footer_extra_js.html
+++ b/templates/web/fixmystreet-uk-councils/footer_extra_js.html
@@ -1,5 +1,12 @@
[% scripts.push(
- version('/vendor/OpenLayers.Projection.OrdnanceSurvey.js')
version('/cobrands/fixmystreet-uk-councils/js.js'),
- version('/cobrands/highways/assets.js'),
) %]
+[%~
+IF bodyclass.match('mappage');
+ scripts.push(
+ version('/vendor/OpenLayers.Projection.OrdnanceSurvey.js'),
+ version('/cobrands/fixmystreet/assets.js'),
+ version('/cobrands/highways/assets.js'),
+ );
+END
+%]
diff --git a/templates/web/oxfordshire/footer_extra_js.html b/templates/web/oxfordshire/footer_extra_js.html
index d95ed2c8e..24ec8486a 100644
--- a/templates/web/oxfordshire/footer_extra_js.html
+++ b/templates/web/oxfordshire/footer_extra_js.html
@@ -1,8 +1,12 @@
-[% scripts.push(
+[%
+IF bodyclass.match('mappage');
+ scripts.push(
version('/cobrands/fixmystreet/assets.js'),
version('/vendor/OpenLayers.Projection.OrdnanceSurvey.js'),
version('/cobrands/oxfordshire/js.js'),
version('/cobrands/oxfordshire/assets.js'),
version('/cobrands/highways/assets.js'),
version('/cobrands/fixmystreet-uk-councils/council_validation_rules.js'),
-) %]
+ );
+END;
+%]