diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-08-17 17:22:59 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-08-17 17:22:59 +0100 |
commit | a9be1c52445e4281311f7420ea514f1e7485b50d (patch) | |
tree | a692fa349ab9abbd505935d5b917db767bac2801 /web/cobrands/harrogate/js.js | |
parent | 5a8a8d05355295c185de55ec1bdddb6ca69b33e5 (diff) | |
parent | 3f21a9fa625c72dd756b66e385cf2f817d42200f (diff) |
Merge branch 'harrogate-zurich-fixes'
Diffstat (limited to 'web/cobrands/harrogate/js.js')
-rw-r--r-- | web/cobrands/harrogate/js.js | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/web/cobrands/harrogate/js.js b/web/cobrands/harrogate/js.js new file mode 100644 index 000000000..3c0e41d26 --- /dev/null +++ b/web/cobrands/harrogate/js.js @@ -0,0 +1,34 @@ +// we link to the informational articles rather than the forms, because in some +// cases the former have more information or links to track progress of faults +// etc.. + +(function() { + +var links = { + 'Bus stops': 'http://www.northyorks.gov.uk/article/25853/Bus-stops-and-shelters', + // Pavements/footpaths (multiple options) + 'Potholes': 'http://www.northyorks.gov.uk/article/25215/Roads---potholes', + // Roads/highways (multiple options) + 'Road traffic signs': 'http://www.northyorks.gov.uk/article/25667/Road-signs-and-bollards', + // Street lighting (not considered, as also a Harrogate category) + 'Traffic lights': 'http://www.northyorks.gov.uk/article/25626/Traffic-lights', + 'default': 'http://www.northyorks.gov.uk/article/28237/Report-it-online' +}; + +$(function () { + var notice = $('.nycc-notice'); + $("#problem_form").on("change.category", "select#form_category", function(){ + var cat = $(this).val(); + if (cat.search(/NYCC/) > 0) { + cat = cat.replace(' (NYCC)', ''); + var link = links[cat] || links ['default']; + notice.find('a').attr({ href: link }); + notice.show(); + } + else { + notice.hide(); + } + }); +}); + +})(); |