diff options
42 files changed, 293 insertions, 745 deletions
diff --git a/.cypress/cypress/integration/isleofwight.js b/.cypress/cypress/integration/isleofwight.js index daa69f36a..ab7039a5f 100644 --- a/.cypress/cypress/integration/isleofwight.js +++ b/.cypress/cypress/integration/isleofwight.js @@ -20,16 +20,4 @@ describe('When you look at the Island Roads site', function() { cy.get('select:eq(4)').select('Extra'); cy.contains('Help Island Roads'); }); - - it('displays nearby roadworks', function() { - cy.fixture('iow_roadworks.json'); - cy.route('/data/**', 'fixture:iow_roadworks.json').as('roadworks'); - cy.visit('http://isleofwight.localhost:3001/'); - cy.get('[name=pc]').type('PO30 5XJ'); - cy.get('[name=pc]').parents('form').submit(); - cy.get('#map_box').click(); - cy.wait('@report-ajax'); - cy.wait('@roadworks'); - cy.contains('Roadworks are scheduled near this location'); - }); }); diff --git a/templates/web/bathnes/footer_extra_js.html b/templates/web/bathnes/footer_extra_js.html index 240767d48..6ab4c70a0 100644 --- a/templates/web/bathnes/footer_extra_js.html +++ b/templates/web/bathnes/footer_extra_js.html @@ -6,8 +6,6 @@ IF bodyclass.match('mappage'); scripts.push( version('/vendor/OpenLayers.Projection.OrdnanceSurvey.js'), version('/cobrands/fixmystreet/assets.js'), - version('/cobrands/fixmystreet-uk-councils/roadworks.js'), - version('/cobrands/bathnes/js.js'), version('/cobrands/bathnes/assets.js'), ); END diff --git a/templates/web/bristol/footer_extra_js.html b/templates/web/bristol/footer_extra_js.html index 644576b72..deff4e395 100644 --- a/templates/web/bristol/footer_extra_js.html +++ b/templates/web/bristol/footer_extra_js.html @@ -6,8 +6,6 @@ IF bodyclass.match('mappage'); scripts.push( version('/vendor/OpenLayers.Projection.OrdnanceSurvey.js'), version('/cobrands/fixmystreet/assets.js'), - version('/cobrands/fixmystreet-uk-councils/roadworks.js'), - version('/cobrands/bristol/js.js'), version('/cobrands/bristol/assets.js'), version('/cobrands/highways/assets.js'), ); diff --git a/templates/web/buckinghamshire/footer_extra_js.html b/templates/web/buckinghamshire/footer_extra_js.html index 6080f5e4f..760722bcd 100644 --- a/templates/web/buckinghamshire/footer_extra_js.html +++ b/templates/web/buckinghamshire/footer_extra_js.html @@ -6,8 +6,6 @@ IF bodyclass.match('mappage'); scripts.push( version('/vendor/OpenLayers.Projection.OrdnanceSurvey.js'), version('/cobrands/fixmystreet/assets.js'), - version('/cobrands/fixmystreet-uk-councils/roadworks.js'), - version('/cobrands/buckinghamshire/js.js'), version('/cobrands/buckinghamshire/assets.js'), ); END diff --git a/templates/web/cheshireeast/footer_extra_js.html b/templates/web/cheshireeast/footer_extra_js.html index 10ac9a152..674763338 100644 --- a/templates/web/cheshireeast/footer_extra_js.html +++ b/templates/web/cheshireeast/footer_extra_js.html @@ -6,9 +6,7 @@ IF bodyclass.match('mappage'); scripts.push( version('/vendor/OpenLayers.Projection.OrdnanceSurvey.js'), version('/cobrands/fixmystreet/assets.js'), - version('/cobrands/fixmystreet-uk-councils/roadworks.js'), version('/cobrands/cheshireeast/assets.js'), - version('/cobrands/cheshireeast/js.js'), ); END %] diff --git a/templates/web/eastherts/footer_extra.html b/templates/web/eastherts/footer_extra.html index de0a9fab0..3722ea99f 100644 --- a/templates/web/eastherts/footer_extra.html +++ b/templates/web/eastherts/footer_extra.html @@ -1,36 +1,29 @@ -<div class="footer clearfix"> +<footer class="eh-footer"> <div class="container"> - <div class="footer__left"><img src="https://www.eastherts.gov.uk/image/29958/EastHertsLogo-Footer/original.png" width="250" height="75" alt="EastHertsLogo-Footer" title="EastHertsLogo-Footer" class="footer__logo" /> - <div class="footer__socialmedia"> - - <a href="https://www.facebook.com" rel="external" title="Facebook"><img src="https://www.eastherts.gov.uk/image/29956/Facebook/original.png" width="40" height="40" alt="Facebook" title="Facebook" /> - </a> - - <a href="https://www.twitter.com" rel="external" title="Twitter"><img src="https://www.eastherts.gov.uk/image/29959/Twitter/original.png" width="40" height="40" alt="Twitter" title="Twitter" /> - </a><img src="https://www.eastherts.gov.uk/image/29957/RSS/original.png" width="40" height="40" alt="RSS" title="RSS" /> - </div> - </div> - <div class="footer__right"> - <div class="footer__navigation"> + + <p class="eh-footer__copyright">© East Herts District Council</p> + + <nav role="navigation" aria-labelledby="block-eastherts-footer-menu" class="eh-footer__nav"> + <h2 class="visuallyhidden" id="block-eastherts-footer-menu">Footer menu</h2> <ul> - <li class="footer__navitem"><a href="https://www.eastherts.gov.uk/article/34224/Site-map" class="footer__navlink">Site map</a> - </li> - <li class="footer__navitem"><a href="/article/34226/Terms--Conditions" class="footer__navlink">Terms & Conditions</a> - </li> - <li class="footer__navitem"><a href="https://www.eastherts.gov.uk/article/34230/Privacy--Cookies" class="footer__navlink">Privacy & Cookies</a> - </li> - <li class="footer__navitem"><a href="https://www.eastherts.gov.uk/article/34378/Privacy-Data-Protection-and-Fraud-Prevention" class="footer__navlink">Privacy, Data Protection and Fraud Prevention</a> - </li> - <li class="footer__navitem"><a href="https://www.eastherts.gov.uk/article/34376/Comments-Compliments-and-Complaints" class="footer__navlink" accesskey="7">Comments, Compliments and Complaints</a> - </li> + <li> + <a href="https://www.eastherts.gov.uk/accessibility">Accessibility</a> + </li> + <li> + <a href="https://www.eastherts.gov.uk/contactus">Contact Us</a> + </li> + <li> + <a href="https://www.eastherts.gov.uk/information-requests/data-protection">Data Protection</a> + </li> + <li> + <a href="https://www.eastherts.gov.uk/information-requests/data-protection/privacy-cookies">Privacy & Cookies</a> + </li> </ul> + </nav> + + <a href="https://www.eastherts.gov.uk" title="Home" rel="home" class="eh-footer__logo"> + <img src="https://www.eastherts.gov.uk/themes/custom/eastherts/logo.svg" alt="Home"> + </a> + </div> - <div class="footer__copyright"> - <p>© 2017 mySociety</p> - </div> - <div class="footer__goss"> - <a href="https://www.fixmystreet.com/pro/">Powered by FixMyStreet</a> - </div> - </div> - </div> -</div> +</footer> diff --git a/templates/web/eastherts/header_site.html b/templates/web/eastherts/header_site.html index 5f1f4965e..2271dc259 100644 --- a/templates/web/eastherts/header_site.html +++ b/templates/web/eastherts/header_site.html @@ -1,37 +1,10 @@ -<div class="toputils"> +<header class="eh-header"> <div class="container"> - <a href="[% c.cobrand.base_url IF admin %]/" id="report-cta" title="[%- loc('Report a problem') -%]">[%- loc('Report') -%]</a> - <a href="#main-nav" id="nav-link">Main Navigation</a> - <!-- <a href="https://www.eastherts.gov.uk/article/34246/Search">Search</a> --> - - <div class="toputils__right desk-only"> - <div class="toputils__nav"> - <ul class="toputils__navlist"> - <li><a href="/article/34210/Accessibility" class="toputils__navitem">Accessibility</a> - </li> - <li><a href="/article/34212/A-Z-of-Services" class="toputils__navitem">A-Z of Services</a> - </li> - <li><a href="/article/34377/Contact-us" class="toputils__navitem">Contact us</a> - </li> - </ul> - </div> - </div> - </div> -</div> - -<header id="site-header" role="banner"> - <div class="container"> - <a href="[% c.cobrand.base_url IF admin %]/" id="site-logo">[% site_name %]</a> - <div class="mainmenu desk-only"> - <ul class="mainmenu__list"> - <li class="footer__navitem"><a href="http://www.eastherts.gov.uk/residents" class="mainmenu__item">Residents</a></li> - <li class="footer__navitem"><a href="http://www.eastherts.gov.uk/business" class="mainmenu__item">Business</a></li> - <li class="footer__navitem"><a href="http://www.eastherts.gov.uk/council" class="mainmenu__item">Your Council</a></li> - <li class="footer__navitem"><a href="http://www.eastherts.gov.uk/news" class="mainmenu__item">News</a></li> - </ul> - </div> - <div class="searchcontrol desk-only"> - <a href="https://www.eastherts.gov.uk/article/34246/Search" class="searchcontrol__expandtoggle">Search</a> - </div> + <a href="https://www.eastherts.gov.uk/" class="eh-header__logo">East Herts District Council</a> + <a href="#main-nav" class="eh-header__nav-link">Main Navigation</a> + <form class="eh-header__form" action="https://www.eastherts.gov.uk/search/content" method="get"> + <input class="eh-header__search" type="text" placeholder="Search and discover help, advice and information" name="search" size="30" maxlength="128"> + <button class="eh-header__button" type="submit" value="Search"><i></i> <span>Search</span></button> + </form> </div> </header> diff --git a/templates/web/hounslow/footer_extra_js.html b/templates/web/hounslow/footer_extra_js.html index 1ff386231..f0b01419e 100644 --- a/templates/web/hounslow/footer_extra_js.html +++ b/templates/web/hounslow/footer_extra_js.html @@ -5,7 +5,6 @@ IF bodyclass.match('mappage'); scripts.push( version('/vendor/OpenLayers.Projection.OrdnanceSurvey.js'), - version('/cobrands/fixmystreet-uk-councils/roadworks.js'), version('/cobrands/fixmystreet/assets.js'), version('/cobrands/highways/assets.js'), version('/cobrands/hounslow/js.js'), diff --git a/templates/web/isleofwight/footer_extra_js.html b/templates/web/isleofwight/footer_extra_js.html index 0ad3525e6..563da86b6 100644 --- a/templates/web/isleofwight/footer_extra_js.html +++ b/templates/web/isleofwight/footer_extra_js.html @@ -2,7 +2,6 @@ scripts.push( version('/vendor/OpenLayers.Projection.OrdnanceSurvey.js'), version('/cobrands/fixmystreet/assets.js'), - version('/cobrands/fixmystreet-uk-councils/roadworks.js'), version('/cobrands/fixmystreet-uk-councils/js.js'), version('/cobrands/isleofwight/js.js'), version('/cobrands/isleofwight/assets.js'), diff --git a/templates/web/lincolnshire/footer_extra_js.html b/templates/web/lincolnshire/footer_extra_js.html index 946bddfdc..78b25b0c9 100644 --- a/templates/web/lincolnshire/footer_extra_js.html +++ b/templates/web/lincolnshire/footer_extra_js.html @@ -5,9 +5,7 @@ IF bodyclass.match('mappage'); scripts.push( version('/vendor/OpenLayers.Projection.OrdnanceSurvey.js'), - version('/cobrands/fixmystreet-uk-councils/roadworks.js'), version('/cobrands/fixmystreet/assets.js'), - version('/cobrands/lincolnshire/roadworks.js'), version('/cobrands/lincolnshire/assets.js'), ); END diff --git a/templates/web/northamptonshire/footer_extra_js.html b/templates/web/northamptonshire/footer_extra_js.html index dc87babce..c17d2777e 100644 --- a/templates/web/northamptonshire/footer_extra_js.html +++ b/templates/web/northamptonshire/footer_extra_js.html @@ -4,8 +4,6 @@ IF bodyclass.match('mappage'); version('/cobrands/fixmystreet/assets.js'), version('/cobrands/fixmystreet-uk-councils/alloy.js'), version('/vendor/OpenLayers.Projection.OrdnanceSurvey.js'), - version('/cobrands/fixmystreet-uk-councils/roadworks.js'), - version('/cobrands/northamptonshire/js.js'), version('/cobrands/northamptonshire/assets.js'), version('/cobrands/highways/assets.js'), version('/cobrands/fixmystreet-uk-councils/council_validation_rules.js'), diff --git a/templates/web/westminster/footer_extra_js.html b/templates/web/westminster/footer_extra_js.html index f89cee3d4..ec25926c5 100644 --- a/templates/web/westminster/footer_extra_js.html +++ b/templates/web/westminster/footer_extra_js.html @@ -3,8 +3,6 @@ IF bodyclass.match('mappage'); scripts.push( version('/vendor/OpenLayers.Projection.OrdnanceSurvey.js'), version('/cobrands/fixmystreet/assets.js'), - version('/cobrands/fixmystreet-uk-councils/roadworks.js'), - version('/cobrands/westminster/roadworks.js'), version('/cobrands/westminster/assets.js'), ); END diff --git a/web/cobrands/bathnes/base.scss b/web/cobrands/bathnes/base.scss index 611f71094..0b59469fa 100644 --- a/web/cobrands/bathnes/base.scss +++ b/web/cobrands/bathnes/base.scss @@ -72,18 +72,3 @@ color: #fff; } } - -.js-roadworks-message { - margin: 1em -1em; - padding: 1em; - background-color: #00aeef; - color: #fff; - dt { - float: left; - margin-right: 0.25em; - } - - p:last-child { - font-weight: bold; - } -} diff --git a/web/cobrands/bathnes/js.js b/web/cobrands/bathnes/js.js deleted file mode 100644 index 51c8bcfed..000000000 --- a/web/cobrands/bathnes/js.js +++ /dev/null @@ -1,38 +0,0 @@ -(function(){ - -if (!fixmystreet.maps) { - return; -} - -fixmystreet.roadworks.config = { - tag_top: 'h3', - colon: true, - skip_delays: true, - text_after: "<p>If you think this issue needs immediate attention you can continue your report below</p>" -}; - -fixmystreet.roadworks.filter = function(feature) { - var category = $('select#form_category').val(), - parts = feature.attributes.symbol.split(''), - valid_types = ['h', 'n', 'l', 'w'], - valid_subtypes = ['15', '25'], - type = parts[2], - sub_type = parts[4] + parts[5], - categories = ['Damage to pavement', 'Damage to road', 'Faded road markings', 'Damaged Railing, manhole, or drain cover']; - return OpenLayers.Util.indexOf(categories, category) != -1 && - ( OpenLayers.Util.indexOf(valid_types, type) != -1 || - ( type === 'o' && OpenLayers.Util.indexOf(valid_subtypes, sub_type) != -1 ) ); -}; - -var org_id = '114'; -var body = "Bath and North East Somerset Council"; -fixmystreet.assets.add(fixmystreet.roadworks.layer_future, { - http_options: { params: { organisation_id: org_id } }, - body: body -}); -fixmystreet.assets.add(fixmystreet.roadworks.layer_planned, { - http_options: { params: { organisation_id: org_id } }, - body: body -}); - -})(); diff --git a/web/cobrands/bristol/js.js b/web/cobrands/bristol/js.js deleted file mode 100644 index c2431607f..000000000 --- a/web/cobrands/bristol/js.js +++ /dev/null @@ -1,24 +0,0 @@ -(function(){ - -if (!fixmystreet.maps) { - return; -} - -var org_id = '1015'; -var body = "Bristol City Council"; -fixmystreet.assets.add(fixmystreet.roadworks.layer_future, { - http_options: { params: { organisation_id: org_id } }, - body: body -}); -fixmystreet.assets.add(fixmystreet.roadworks.layer_planned, { - http_options: { params: { organisation_id: org_id } }, - body: body -}); - -fixmystreet.roadworks.config = { - summary_heading_text: 'Location', - extra_dates_text: '<small>Please note that dates are updated by the contractor carrying out the works and the finish date may be incorrect in cases of unauthorised or overrunning works</small>', - skip_delays: true -}; - -})(); diff --git a/web/cobrands/buckinghamshire/js.js b/web/cobrands/buckinghamshire/js.js deleted file mode 100644 index 6be03f91f..000000000 --- a/web/cobrands/buckinghamshire/js.js +++ /dev/null @@ -1,18 +0,0 @@ -(function(){ - -if (!fixmystreet.maps) { - return; -} - -var org_id = '1016'; -var body = "Buckinghamshire County Council"; -fixmystreet.assets.add(fixmystreet.roadworks.layer_future, { - http_options: { params: { organisation_id: org_id } }, - body: body -}); -fixmystreet.assets.add(fixmystreet.roadworks.layer_planned, { - http_options: { params: { organisation_id: org_id } }, - body: body -}); - -})(); diff --git a/web/cobrands/cheshireeast/js.js b/web/cobrands/cheshireeast/js.js deleted file mode 100644 index 499a3903b..000000000 --- a/web/cobrands/cheshireeast/js.js +++ /dev/null @@ -1,18 +0,0 @@ -(function(){ - -if (!fixmystreet.maps) { - return; -} - -var org_id = '1451'; -var body = "Cheshire East Council"; -fixmystreet.assets.add(fixmystreet.roadworks.layer_future, { - http_options: { params: { organisation_id: org_id } }, - body: body -}); -fixmystreet.assets.add(fixmystreet.roadworks.layer_planned, { - http_options: { params: { organisation_id: org_id } }, - body: body -}); - -})(); diff --git a/web/cobrands/eastherts/_colours.scss b/web/cobrands/eastherts/_colours.scss index 50c68f51c..84ef39bd1 100644 --- a/web/cobrands/eastherts/_colours.scss +++ b/web/cobrands/eastherts/_colours.scss @@ -1,11 +1,15 @@ /* COLOURS */ -$eh_dark_grey: #555; -$eh_green: #00843d; +$eh_green: #006633; +$eh_yellow: #fedd33; +$eh_blue: #007FA3; +$eh_light_grey: #EBEBEB; +$eh_mid_grey: #4A4A4A; +$eh_dark_grey: #262626; -$primary: $eh_green; -$primary_b: #000000; -$primary_text: #fff; +$primary: $eh_light_grey; +$primary_b: #000; +$primary_text: #000; $base_bg: white; $base_fg: $eh_dark_grey; @@ -26,4 +30,8 @@ $body-font: 'Open Sans', sans-serif; $meta-font: $body-font; $heading-font: $body-font; -$mappage-header-height: 178px; +$container-max-width: 70.5em; // match 1128px row width in East Herts template + +$eh-header-height: 84px + 16px + 16px; +$eh-nav-height: 48px; +$mappage-header-height: $eh-header-height + $eh-nav-height; diff --git a/web/cobrands/eastherts/base.scss b/web/cobrands/eastherts/base.scss index aa654c48c..fb013e11b 100644 --- a/web/cobrands/eastherts/base.scss +++ b/web/cobrands/eastherts/base.scss @@ -3,76 +3,161 @@ @import "../sass/mixins"; @import "../sass/base"; -#site-header { - background-image: url('https://www.eastherts.gov.uk/media/29966/Website_background/image/panorama-lomoesque-compressor.jpg'); - background-repeat: no-repeat; - background-size: cover; +.eh-header { + background-color: $eh_green; + color: #fff; + padding: 1em 0; + position: relative; } -#site-logo { - margin: 0 auto; - background: url('https://www.eastherts.gov.uk/image/29967/site_logo/original.png'); - width: 150px; - height: 138px; +a:focus, +input:focus, +button:focus { + outline: 3px dotted red; } -// Seemed easiest to have a little bar above the header +.eh-header__logo, +.eh-footer__logo { + display: block; + overflow: hidden; + width: 91px; + height: 0; + padding-top: 84px; + @include svg-background-image('/cobrands/eastherts/logo'); + background-size: 91px 84px; +} -.toputils { - background-color: #000; - position: relative; - height: 40px; +.eh-header__form { + @include flex-container(); + margin-top: 1em; } -// Footer styles from their stylesheet +.eh-header__search { + font-family: inherit; + border-radius: 0.25em 0 0 0.25em; + color: #495057; + border: none; -.footer { - padding: 2em 0.75em 1em; - color: #fff; - background-color: #000; - .container { - padding: 0; - margin: 0 auto; + // override input[type="text"] { width: 100% } in core + &[type="text"] { + width: 80%; + font-size: 1.2em; + line-height: 1.4em; + padding: 6px 12px; } } -.footer__logo { - display: block; - margin: 0 auto 1em; -} -.footer__socialmedia { + +.eh-header__button { + background-color: $eh_yellow; + color: $eh_mid_grey; + border-radius: 0 0.25em 0.25em 0; + padding: 6px 12px; + border: none; + + width: 20%; + + @include flex-container(); + @include flex-align(center); + @include justify-content(center); text-align: center; - a { - text-decoration: none; + + i { + display: inline-block; + width: 16px; + height: 16px; + @include svg-background-image('/cobrands/eastherts/search'); + background-size: 16px 16px; + margin: 0 auto; + } + + span { + // .visuallyhidden + clip: rect(0 0 0 0); + height: 1px; + width: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; } } -.footer__navigation { + +.eh-header__nav-link { + position: absolute; + right: 1em; + top: 40px; // vertically centre alongside logo + display: block; overflow: hidden; - margin-bottom: 1em; - & > ul { - margin: 0; - padding: 0; - li { - list-style: none; + width: 40px; + height: 0; + padding-top: 40px; + @include svg-background-image('/cobrands/eastherts/menu'); + background-position: center center; + background-repeat: no-repeat; +} + +.eh-footer { + background-color: $eh_dark_grey; + color: #fff; + padding: 2em 0; + margin: 0; + box-shadow: 0 1000px 0 1000px $eh_dark_grey; + + ul { + overflow: auto; + margin: 1em 0; + } + + li { + list-style: none; + float: left; + + &:after { + content: '|'; + display: inline-block; + margin-left: 0.3em; + margin-right: 0.3em; + } + + &:last-child:after { + display: none; } } + + a { + color: inherit; + } } -.footer__navitem { - margin-bottom: 0; + +.nav-menu { + a, span, a:visited { + font-size: 1em; + background-color: #3B3B3B; + color: #fff; + border-bottom: 1px solid $eh_dark_grey; + } } -a.footer__navlink { - color: #fff; - display: block; - padding: 0.5em 0; - text-align: center; + +#front-main { + text-align: left; + color: inherit; + + h1 { + font-size: 1.75em; + } + + #postcodeForm { + margin-top: 1em; + } } -.footer__copyright { - text-align: center; - clear: both; + +a#geolocate_link { + color: $eh_green; } -.footer__goss > a { - display: block; - text-align: center; - font-size: 14px; - color: #ccc; - clear: both; + +.map-fullscreen { + .eh-header, + .eh-footer { + display: none; + } } diff --git a/web/cobrands/eastherts/img/consultationd1.gif b/web/cobrands/eastherts/img/consultationd1.gif Binary files differdeleted file mode 100644 index d7e1ffd5e..000000000 --- a/web/cobrands/eastherts/img/consultationd1.gif +++ /dev/null diff --git a/web/cobrands/eastherts/img/contactusd1.gif b/web/cobrands/eastherts/img/contactusd1.gif Binary files differdeleted file mode 100644 index 38a6ed5ef..000000000 --- a/web/cobrands/eastherts/img/contactusd1.gif +++ /dev/null diff --git a/web/cobrands/eastherts/img/footer.gif b/web/cobrands/eastherts/img/footer.gif Binary files differdeleted file mode 100644 index b324dc9c5..000000000 --- a/web/cobrands/eastherts/img/footer.gif +++ /dev/null diff --git a/web/cobrands/eastherts/img/header_mid.jpg b/web/cobrands/eastherts/img/header_mid.jpg Binary files differdeleted file mode 100644 index 2712c01e1..000000000 --- a/web/cobrands/eastherts/img/header_mid.jpg +++ /dev/null diff --git a/web/cobrands/eastherts/img/paymentsd1.gif b/web/cobrands/eastherts/img/paymentsd1.gif Binary files differdeleted file mode 100644 index eceaf413c..000000000 --- a/web/cobrands/eastherts/img/paymentsd1.gif +++ /dev/null diff --git a/web/cobrands/eastherts/img/reportd1.gif b/web/cobrands/eastherts/img/reportd1.gif Binary files differdeleted file mode 100644 index 20bc4db21..000000000 --- a/web/cobrands/eastherts/img/reportd1.gif +++ /dev/null diff --git a/web/cobrands/eastherts/img/toplogo.gif b/web/cobrands/eastherts/img/toplogo.gif Binary files differdeleted file mode 100644 index b51183702..000000000 --- a/web/cobrands/eastherts/img/toplogo.gif +++ /dev/null diff --git a/web/cobrands/eastherts/img/toplogo.jpg b/web/cobrands/eastherts/img/toplogo.jpg Binary files differdeleted file mode 100644 index bfa111a04..000000000 --- a/web/cobrands/eastherts/img/toplogo.jpg +++ /dev/null diff --git a/web/cobrands/eastherts/img/welcome_mid.gif b/web/cobrands/eastherts/img/welcome_mid.gif Binary files differdeleted file mode 100644 index 430b4e95c..000000000 --- a/web/cobrands/eastherts/img/welcome_mid.gif +++ /dev/null diff --git a/web/cobrands/eastherts/layout.scss b/web/cobrands/eastherts/layout.scss index cf01b9db3..d54a6d968 100644 --- a/web/cobrands/eastherts/layout.scss +++ b/web/cobrands/eastherts/layout.scss @@ -1,194 +1,152 @@ @import "_colours"; @import "../sass/layout"; -#site-logo { - margin: 0; // Left aligned again -} +// give .eh-header a set height (like 8em) and a thick grey border-bottom -// Put the nav underneath the East Herts nav +// give .nav-wrapper { top: 6em } and remove all the { float: right } +// so that it sits in front of the grey border-bottom from .eh-header -#main-nav { - display: block; +.eh-header { + @include box-sizing(border-box); + height: $eh-header-height + $eh-nav-height; + border-bottom: $eh-nav-height solid $eh_light_grey; +} + +.eh-header__form { + width: 70%; + max-width: 40em; position: absolute; - top: 124px; // 80px + 40px + 4px gap - left: 0; - width: 100%; - float: none; - min-height: 0; + top: 0.5em; // Note: this is relative to .container, not .eh-header! + right: 1em; - .ie9 & > * { - -ms-transform: none; + body.mappage & { + top: 1.5em; // Relative to .eh-header again. } } -// And make it look the same +.eh-header__button { + font-family: inherit; -.nav-menu { - background-color: $eh_dark_grey; - margin-right: calc(40px - -0.75em); - span { - color: #fff; - background-color: $eh_green; + i { + margin: 0 0.5em 0 0; } -} -.nav-menu--main { - a, span { - padding: 0.5em; - margin: 0.25em; - @include border-radius(0.25em); - } - a.report-a-problem-btn { - background-color: transparent; - padding: 0.5em; - margin: 0.25em; + span { + clip: auto; + height: auto; + width: auto; + margin: 0; + overflow: visible; + position: static; + + font-size: 1.1em; } } -// Front page, light background bar - -#front-main { - background-color: #f6f6f6; +.nav-wrapper { + top: $eh-header-height; } -.content, #front-main { - color: $eh_dark_grey; +#main-nav { + min-height: 0; + height: auto; + display: block; + float: none; + margin: 0 -0.75em; // compensate for 0.75em padding on nav links } -// Extra height needed -body.twothirdswidthpage .content .sticky-sidebar aside { - top: 16em; -} +.nav-menu { + float: none; -body.mappage { - #site-header { - top: 40px; - height: 138px; + a, span, a:visited { + color: $eh_green; + font-size: 1em; } -} -// Header bits from their stylesheet, tweaked for simpler display - -.toputils__right { - float: right; -} -.toputils__nav { - float: left; - padding: 0 0.25em; - li { - float: left; - list-style: none; + span, + span.report-a-problem-btn { + cursor: default; } -} -.toputils__navlist { - margin: 0; - padding: 0; -} -a.toputils__navitem { - display: block; - color: #fff; - line-height: 2.5rem; - padding: 0 0.5em; - font-size: 0.875rem; -} -.mainmenu { - background-color: #00843d; -} - -.mainmenu { - position:absolute; - display: block; - right: calc(40px - -0.75em); - top: 20px; -} - -a.mainmenu__item { - font-size: 1.125rem; - line-height: normal; - display: block; - padding: 1em; - color: #fff -} - -.mainmenu__list { - margin: 0; - padding: 0; -} + a:hover, + a:focus { + color: #000; + background: transparent; + text-decoration: underline; + } -.mainmenu__list > li { - list-style: none; - float: left; - position: relative + a.report-a-problem-btn, + span.report-a-problem-btn { + padding: 0.75em; + margin: 0; + color: $eh_green; + background: transparent; + border-radius: 0; + + &:hover, + &:focus { + color: #000; + background: transparent; + text-decoration: underline; + } + } } -.searchcontrol { - background-color: #fff; - font-size: .875rem; - position:absolute; - display: block; - top: 0; - right: 0; - width: 40px; - height: 40px; - overflow: hidden; - margin-top: 30px; - background-color: transparent +.eh-header__nav-link { + display: none; } -.searchcontrol__expandtoggle { - display:block; - width: 40px; - height: 40px; - background-image: url("https://www.eastherts.gov.uk/themes/cruise/images/searchbutton-transparent.png"); +.eh-footer__logo { position: absolute; - right: 0; - text-indent: -99999px; + top: 0; + right: 1em; } -// Footer bits from their stylesheet, tweaked for smaller widths - -.footer__left { - float: left; - width: 266px; -} -.footer__right { - float: right; - width: 450px; -} +#front-main { + background-color: white; + text-align: left; + padding-top: 40px; + color: inherit; -.footer__logo { - margin:0 0 1em 0 -} + #postcodeForm { + margin-top: 0; + div { + margin: 0; + } + } -.footer__socialmedia { - text-align:left -} + a#geolocate_link { + color: $eh_green; + } -.footer__socialmedia img { - margin: 0 1em 1em 0 -} + h1 { + font-size: 2.5em; + } -a.footer__navlink { - padding:0; - padding-right: .5em; - margin-right: .5em; - border-right: 1px solid #fff; - text-align: left + h1 + p { + font-size: 1.5em; + line-height: 1.25em; + max-width: 640px; + } } -.footer__navitem:last-child a.footer__navlink { - border-right: 0 +body.mappage { + .eh-footer { + display: none; + } } -.footer__navitem { - float:left +body.frontpage { + .content { + padding: 2em 0; + margin: 2em 0 0 0; + border-top: 2px solid $eh_light_grey; + } } -.footer__copyright { - text-align:left -} -.footer__goss > a { - text-align:left +body.twothirdswidthpage { + .content .sticky-sidebar aside { + top: 12em; // up from 7em, because of the taller header + } } diff --git a/web/cobrands/eastherts/logo.png b/web/cobrands/eastherts/logo.png Binary files differnew file mode 100644 index 000000000..322450389 --- /dev/null +++ b/web/cobrands/eastherts/logo.png diff --git a/web/cobrands/eastherts/logo.svg b/web/cobrands/eastherts/logo.svg new file mode 100644 index 000000000..0511aa957 --- /dev/null +++ b/web/cobrands/eastherts/logo.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="91" height="84"><g fill="#FFF"><path d="M57.7 22.7h2.5l.7-2.8 4.7-1.3-1 4h3l-.8 3.2h-3.2l-1 3.6c-.2 1-.4 1.7-.4 2.3-.1.9.4 1.4 1.3 1.4.5 0 1-.2 1.4-.3l-.6 3-2.8.2c-2.2 0-4-1.1-3.7-3.9 0-.6.1-1.3.5-2.6l1-3.7h-2.4l.8-3.1zM35.7 33c-1 0-1.5-.7-1.4-1.3 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1.1-2.8a.8.8 0 0 0-.9 1.5c.2.1.4.2.3 1-.2 1.4 0 1.9.5 2.5l.1.2c.5.6 1 1.3 2.6 2.6 1.7 1.4 3.7-.4 4.9-1.4l.4-.3c1-.9 1.6-1 2.6-.9 1.5.3 2.1-.4 2.8-1.2l.7-.8s1.9-1.4 2.7-2.2c.3-.4.8-.5 1.3-.3 1.8.5 3.6-.3 5-2.4a30.4 30.4 0 0 1 3.6-3.2c.5-.2 3.1-.3 4.2 0 1.5.3 3.5-.7 4-2.1.4-1 .8-2.8 0-4.5v.1c0-.4 1.2-2 1.6-2.3h-.1c1.2-.6 1-2 .8-3v-.5a.8.8 0 0 0-1.7.2m-14.2-31l.8-.5c.7 0 1.9.4 2.4 1.1l.3.4c.6 1 1.6 2.5 3.3 2.4l2.3-.3 2.5-.3c.6 0 1.2-.2 1.7-.4l.8-.3a.2.2 0 0 1-.2 0l.7 1c.8 1.4 1.6 2.6 2.2 4 .4.9 0 2.2-.3 3.5a.8.8 0 1 0 1.7.4c.4-1.6.7-3.2.2-4.5-.7-1.5-1.5-2.9-2.3-4.2l-.7-1.1c-.7-1.2-2-.7-2.8-.4-.3.2-.7.3-1 .3l-2.8.3-2.1.3c-.7 0-1.3-.9-1.8-1.6l-.4-.5a4.9 4.9 0 0 0-3.9-1.8c-.5 0-1 .3-1.6.7-.4.3-.4.9-.2 1.2.3.4.9.5 1.2.2"/><path d="M18.3 14.7a38.6 38.6 0 0 1 57 2.2c.8-.3 2-.6 3-.7A42.2 42.2 0 0 0 45.7.6c-20.8 0-38 15.3-41 35.2h2.7c1.3-8 5-15.3 10.8-21.1M83.8 50a39 39 0 0 1-73.6 7.7h-3a41.5 41.5 0 0 0 68 13.8 41.2 41.2 0 0 0 11.7-23.1 6 6 0 0 1-3 1.6"/></g></svg>
\ No newline at end of file diff --git a/web/cobrands/eastherts/menu.png b/web/cobrands/eastherts/menu.png Binary files differnew file mode 100644 index 000000000..6cac0eaba --- /dev/null +++ b/web/cobrands/eastherts/menu.png diff --git a/web/cobrands/eastherts/menu.svg b/web/cobrands/eastherts/menu.svg new file mode 100644 index 000000000..62f1e9d82 --- /dev/null +++ b/web/cobrands/eastherts/menu.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="40" height="35"><path fill="#FFF" d="M1.4 6.4h37.2c.8 0 1.4-.6 1.4-1.4V1.4c0-.8-.6-1.4-1.4-1.4H1.4C.6 0 0 .6 0 1.4V5c0 .8.6 1.4 1.4 1.4zm0 14.3h37.2c.8 0 1.4-.6 1.4-1.4v-3.6c0-.8-.6-1.4-1.4-1.4H1.4c-.8 0-1.4.6-1.4 1.4v3.6c0 .8.6 1.4 1.4 1.4zm0 14.3h37.2c.8 0 1.4-.6 1.4-1.4V30c0-.8-.6-1.4-1.4-1.4H1.4c-.8 0-1.4.6-1.4 1.4v3.6c0 .8.6 1.4 1.4 1.4z"/></svg>
\ No newline at end of file diff --git a/web/cobrands/eastherts/search.png b/web/cobrands/eastherts/search.png Binary files differnew file mode 100644 index 000000000..77131b755 --- /dev/null +++ b/web/cobrands/eastherts/search.png diff --git a/web/cobrands/eastherts/search.svg b/web/cobrands/eastherts/search.svg new file mode 100644 index 000000000..d0b2b05c5 --- /dev/null +++ b/web/cobrands/eastherts/search.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill="#4A4A4A" d="M15.8 13.8l-3.1-3a.7.7 0 0 0-.6-.3h-.5a6.5 6.5 0 1 0-1.1 1.1v.5c0 .2 0 .4.2.6l3.1 3c.3.4.8.4 1 0l1-.8c.3-.3.3-.8 0-1zm-9.3-3.3a4 4 0 1 1 0-8 4 4 0 0 1 0 8z"/></svg>
\ No newline at end of file diff --git a/web/cobrands/fixmystreet-uk-councils/roadworks.js b/web/cobrands/fixmystreet-uk-councils/roadworks.js deleted file mode 100644 index 2b0de306a..000000000 --- a/web/cobrands/fixmystreet-uk-councils/roadworks.js +++ /dev/null @@ -1,225 +0,0 @@ -/* Using this file, you also need to include the JavaScript file - * OpenLayers.Projection.OrdnanceSurvey.js for the 27700 conversion, and an - * OpenLayers build that includes OpenLayers.Layer.SphericalMercator and - * OpenLayers.Format.GeoJSON. - */ - -(function(){ - -var industry = { 'l': 4, 'n': 4, 'h': 4, 'e': 2, 't': 5, 'w': 6, 'g': 3, 'r': 17, 'm': 18, 'x': 19, 'p': 19 }; -var industry_other = { '08': 7, '11': 19, '12': 8, '13': 14, '14': 12, '15': 20, '90': 4 }; -var traffic_management = { 'n': 0, 'l': 1, 's': 2, 'p': 3, 'a': 4, 'r': 5, 'g': 6, 'c': 7 }; -var impact = { 'g': 2, 'y': 1, 'r': 0 }; - -// 0-indexed -function getRow(symbol, promoter_org_ref) { - if (promoter_org_ref == 7347) { return 24-1; } - if (promoter_org_ref == 11 || promoter_org_ref == 15) { return 23-1; } - var r = industry[symbol.substr(2, 1)] || industry_other[symbol.substr(4, 2)] || 4; - return r-1; -} - -// 0-indexed -function getColumn(symbol) { - var tm = traffic_management[symbol.substr(3, 1)] || 0; - if (symbol.substr(1, 1) == 'p') { - return 28 + tm - 1; - } - return 1 + impact[symbol.substr(0, 1)] + tm * 3 - 1; -} - -OpenLayers.Format.RoadworksForwardPlanning = OpenLayers.Class(OpenLayers.Format.GeoJSON, { - read: function(json, type, filter) { - type = (type) ? type : "FeatureCollection"; - var results = null; - var obj = null; - if (typeof json == "string") { - try { - obj = OpenLayers.Format.JSON.prototype.read.apply(this, [json, filter]); - } catch (error) { - OpenLayers.Console.error("Bad JSON: " + error); - return; - } - } else { - obj = json; - } - if(!obj || !obj.query) { - OpenLayers.Console.error("Bad JSON: " + json); - return; - } - - // Convert what we're given into GeoJSON - var data = obj.query.data; - obj = { - 'type': 'FeatureCollection', - 'features': [] - }; - for (var i = 0, l=data.longitude.length; i<l; i++) { - var feature = { - 'id': data.se_id[i], - 'type': 'Feature', - 'properties': { - 'symbol': data.gsymbol_id[i], - 'symbol_num': getRow(data.gsymbol_id[i]) * 36 + getColumn(data.gsymbol_id[i]), - 'tooltip': data.tooltip[i], - 'org': data.org_name_disp[i], - 'promoter': data.promoter[i], - 'works_desc': data.works_desc[i], - 'start': data.start_date[i], - 'end': data.end_date[i], - } - }; - // var geojson = false; - var geojson = data.geojson_wgs84[i]; - if (geojson) { - feature.geometry = OpenLayers.Format.JSON.prototype.read.apply(this, [geojson]); - } else { - feature.geometry = { - 'type': 'Point', - 'coordinates': [data.longitude[i], data.latitude[i]] - }; - } - obj.features.push(feature); - } - return OpenLayers.Format.GeoJSON.prototype.read.apply(this, [obj, type, filter]); - }, - - CLASS_NAME: "OpenLayers.Format.RoadworksForwardPlanning" -}); - -// --- - -function format_date(date) { - var day = ('0' + date.getDate()).slice(-2); - var month = ('0' + (date.getMonth() + 1)).slice(-2); - var year = date.getFullYear(); - return day + '/' + month + '/' + year; -} - -var stylemap = new OpenLayers.StyleMap({ - 'default': new OpenLayers.Style({ - fillOpacity: 0, - strokeOpacity: 0, -/* - fillOpacity: 1, - fillColor: "#FFFF00", - strokeColor: "#000000", - strokeOpacity: 0.8, - strokeWidth: 2, - pointRadius: 6, - graphicWidth: 34, - graphicHeight: 42, - graphicXOffset: -17, - graphicYOffset: -42, - graphicOpacity: 1, - externalGraphic: '/cobrands/fixmystreet-uk-councils/roadworks/${symbol_num}.png' -*/ - }) -}); - -var roadworks_defaults = { - http_options: { - url: "https://portal.roadworks.org/data/", - // url: "/data/", - params: { - get: 'Points', - userid: '1', - organisation_id: '', // Cobrand JS should extend and override this. - filterimpact: '1,2,3,4', - extended_func_id: '14', - }, - filterToParams: function(filter, params) { - params = params || {}; - filter.value.transform('EPSG:4326', 'EPSG:27700'); - params.b = filter.value.toArray(); - var date = new Date(); - params.filterstartdate = format_date(date); - date.setMonth(date.getMonth() + 3); - params.filterenddate = format_date(date); - params.mapzoom = fixmystreet.map.getZoom() + fixmystreet.zoomOffset; - return params; - } - }, - srsName: "EPSG:4326", - format_class: OpenLayers.Format.RoadworksForwardPlanning, - strategy_class: OpenLayers.Strategy.FixMyStreet, - stylemap: stylemap, - body: "", // Cobrand JS should extend and override this. - non_interactive: true, - always_visible: true, - nearest_radius: 100, - road: true, - all_categories: true, - actions: { - found: function(layer, feature) { - $(".js-roadworks-message-" + layer.id).remove(); - if (!fixmystreet.roadworks.filter || fixmystreet.roadworks.filter(feature)) { - fixmystreet.roadworks.display_message(feature); - return true; - } - }, - not_found: function(layer) { - $(".js-roadworks-message-" + layer.id).remove(); - } - } -}; - -fixmystreet.roadworks = {}; - -fixmystreet.roadworks.layer_planned = $.extend(true, {}, roadworks_defaults, { - http_options: { params: { t: 'fp' } } -}); - -fixmystreet.roadworks.layer_future = $.extend(true, {}, roadworks_defaults, { - http_options: { params: { t: 'cw' } } -}); - -// fixmystreet.map.layers[5].getNearestFeature(new OpenLayers.Geometry.Point(-0.835614, 51.816562).transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:3857")), 10) - -fixmystreet.roadworks.config = {}; - -fixmystreet.roadworks.display_message = function(feature) { - var attr = feature.attributes, - start = new Date(attr.start.replace(/{ts '([^ ]*).*/, '$1')).toDateString(), - end = new Date(attr.end.replace(/{ts '([^ ]*).*/, '$1')).toDateString(), - tooltip = attr.tooltip.replace(/\\n/g, '\n'), - desc = attr.works_desc.replace(/\\n/g, '\n'); - - var config = this.config, - summary_heading_text = config.summary_heading_text || 'Summary', - tag_top = config.tag_top || 'p', - colon = config.colon ? ':' : ''; - - var $msg = $('<div class="js-roadworks-message js-roadworks-message-' + feature.layer.id + ' box-warning"><' + tag_top + '>Roadworks are scheduled near this location, so you may not need to report your issue.</' + tag_top + '></div>'); - var $dl = $("<dl></dl>").appendTo($msg); - $dl.append("<dt>Dates" + colon + "</dt>"); - var $dates = $("<dd></dd>").appendTo($dl); - $dates.text(start + " until " + end); - if (config.extra_dates_text) { - $dates.append('<br>' + config.extra_dates_text); - } - $dl.append("<dt>" + summary_heading_text + colon + "</dt>"); - var $summary = $("<dd></dd>").appendTo($dl); - tooltip.split("\n").forEach(function(para) { - if (para.match(/^(\d{2}\s+\w{3}\s+(\d{2}:\d{2}\s+)?\d{4}( - )?){2}/)) { - // skip showing the date again - return; - } - if (config.skip_delays && para.match(/^delays/)) { - // skip showing traffic delay information - return; - } - $summary.append(para).append("<br />"); - }); - if (desc) { - $dl.append("<dt>Description" + colon + "</dt>"); - $dl.append($("<dd></dd>").text(desc)); - } - if (config.text_after) { - $dl.append(config.text_after); - } - - $msg.prependTo('#js-post-category-messages'); -}; - -})(); diff --git a/web/cobrands/hounslow/js.js b/web/cobrands/hounslow/js.js index 7bd9fb91c..237ce0c2e 100644 --- a/web/cobrands/hounslow/js.js +++ b/web/cobrands/hounslow/js.js @@ -4,17 +4,6 @@ if (!fixmystreet.maps) { return; } -var org_id = '5540'; -var body = "Hounslow Borough Council"; -fixmystreet.assets.add($.extend(true, {}, fixmystreet.roadworks.layer_future, { - http_options: { params: { organisation_id: org_id } }, - body: body -})); -fixmystreet.assets.add($.extend(true, {}, fixmystreet.roadworks.layer_planned, { - http_options: { params: { organisation_id: org_id } }, - body: body -})); - if (fixmystreet.cobrand == 'hounslow') { // We want the cobranded site to always display "Hounslow Highways" // as the destination for reports in the "Public details" section. diff --git a/web/cobrands/isleofwight/js.js b/web/cobrands/isleofwight/js.js index d43006fd5..0afd2eee7 100644 --- a/web/cobrands/isleofwight/js.js +++ b/web/cobrands/isleofwight/js.js @@ -19,15 +19,4 @@ if (fixmystreet.cobrand == 'isleofwight') { }; } -var org_id = '1062'; -var body = "Isle of Wight Council"; -fixmystreet.assets.add(fixmystreet.roadworks.layer_future, { - http_options: { params: { organisation_id: org_id } }, - body: body -}); -fixmystreet.assets.add(fixmystreet.roadworks.layer_planned, { - http_options: { params: { organisation_id: org_id } }, - body: body -}); - })(); diff --git a/web/cobrands/lincolnshire/base.scss b/web/cobrands/lincolnshire/base.scss index edae2baec..727a0837d 100644 --- a/web/cobrands/lincolnshire/base.scss +++ b/web/cobrands/lincolnshire/base.scss @@ -129,10 +129,6 @@ body.mappage .big-green-banner { padding: 2em 0 3em; } -.js-roadworks-message dd:last-child { - margin-bottom: 0; -} - // Certain categories have linear assets so hide the spot marker in the guidance #category_meta_message_Missingsafetyfence, #category_meta_message_Roadsidesafetybarrier { .asset-spot:before { diff --git a/web/cobrands/lincolnshire/roadworks.js b/web/cobrands/lincolnshire/roadworks.js deleted file mode 100644 index 0e8923607..000000000 --- a/web/cobrands/lincolnshire/roadworks.js +++ /dev/null @@ -1,29 +0,0 @@ -(function(){ - -if (!fixmystreet.maps) { - return; -} - -fixmystreet.assets.add(fixmystreet.roadworks.layer_future, { - http_options: { params: { organisation_id: '1070' } }, - body: "Lincolnshire County Council" -}); -// NB Lincs don't want forward planning works displayed, so -// fixmystreet.roadworks.layer_planned is deliberately missing here. - - -// Lincs want to also display the responsible party in roadworks messages -var original_display_message = fixmystreet.roadworks.display_message; -fixmystreet.roadworks.display_message = function(feature) { - var retval = original_display_message.apply(this, arguments); - - if (feature.attributes.promoter) { - var $dl = $(".js-roadworks-message-" + feature.layer.id + " dl"); - $dl.append("<dt>Responsibility</dt>"); - $dl.append($("<dd></dd>").text(feature.attributes.promoter)); - } - - return retval; -}; - -})(); diff --git a/web/cobrands/northamptonshire/js.js b/web/cobrands/northamptonshire/js.js deleted file mode 100644 index 286b24551..000000000 --- a/web/cobrands/northamptonshire/js.js +++ /dev/null @@ -1,19 +0,0 @@ -(function(){ - -if (!fixmystreet.maps) { - return; -} - -var org_id = '1089'; -var body = "Northamptonshire County Council"; - -fixmystreet.assets.add(fixmystreet.roadworks.layer_future, { - http_options: { params: { organisation_id: org_id } }, - body: body -}); -fixmystreet.assets.add(fixmystreet.roadworks.layer_planned, { - http_options: { params: { organisation_id: org_id } }, - body: body -}); - -})(); diff --git a/web/cobrands/westminster/roadworks.js b/web/cobrands/westminster/roadworks.js deleted file mode 100644 index d7a30b63d..000000000 --- a/web/cobrands/westminster/roadworks.js +++ /dev/null @@ -1,32 +0,0 @@ -(function(){ - -if (!fixmystreet.maps) { - return; -} - -var org_id = '1160'; -var body = "Westminster City Council"; -fixmystreet.assets.add(fixmystreet.roadworks.layer_future, { - http_options: { params: { organisation_id: org_id } }, - body: body -}); -fixmystreet.assets.add(fixmystreet.roadworks.layer_planned, { - http_options: { params: { organisation_id: org_id } }, - body: body -}); - -// Westminster want to also display the responsible party in roadworks messages -var original_display_message = fixmystreet.roadworks.display_message; -fixmystreet.roadworks.display_message = function(feature) { - var retval = original_display_message.apply(this, arguments); - - if (feature.attributes.promoter) { - var $dl = $(".js-roadworks-message-" + feature.layer.id + " dl"); - $dl.append("<dt>Responsibility</dt>"); - $dl.append($("<dd></dd>").text(feature.attributes.promoter)); - } - - return retval; -}; - -})(); |