diff options
Diffstat (limited to 'web/cobrands')
116 files changed, 2408 insertions, 894 deletions
diff --git a/web/cobrands/bathnes/_colours.scss b/web/cobrands/bathnes/_colours.scss index 0340b3eda..9021a0562 100644 --- a/web/cobrands/bathnes/_colours.scss +++ b/web/cobrands/bathnes/_colours.scss @@ -18,9 +18,11 @@ $site-width: 60em; @import "pattern-lib/colours"; -$primary: #00728F; +$primary: $bathnes-primary; $primary_b: #0b0b0c; -$primary_text: #0b0c0c; +$primary_text: #fff; +$primary_link_color: $primary_text; +$primary_link_hover_color: rgba($primary_text, 0.8); $base_bg: white; $base_fg: #0b0c0c; @@ -40,3 +42,6 @@ $front_main_background: $bathnes-primary; $menu-image: 'menu-black'; $header-top-border: false; + +$search-help-background: #fff3f3; +$search-help-header-font-size-desktop: 1.25em; diff --git a/web/cobrands/bathnes/js.js b/web/cobrands/bathnes/js.js new file mode 100644 index 000000000..f76da5cd5 --- /dev/null +++ b/web/cobrands/bathnes/js.js @@ -0,0 +1,11 @@ +fixmystreet.roadworks.config = { + tag_top: 'h3', + colon: 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(), + categories = ['Damage to pavement', 'Damage to road', 'Faded road markings', 'Damaged Railing, manhole, or drain cover']; + return OpenLayers.Util.indexOf(categories, category) != -1; +}; diff --git a/web/cobrands/bexley/_colours.scss b/web/cobrands/bexley/_colours.scss index 615ef65a4..4b78a39f7 100644 --- a/web/cobrands/bexley/_colours.scss +++ b/web/cobrands/bexley/_colours.scss @@ -40,9 +40,9 @@ $primary_text: $text_black; $base_bg: $white; $base_fg: $text_black; -$nav_background_colour: $fuchsia; -$nav_colour: $white; -$nav_hover_background_colour: darken($fuchsia, 10%); +$nav_background_colour: $white; +$nav_colour: $text_black; +$nav_hover_background_colour: $fuchsia_lt; $col_click_map: $aqua; @@ -51,3 +51,5 @@ $header-top-border: false; $heading-font: Lato, sans-serif; $body-font: Lato, sans-serif; $meta-font: $body-font; + +$search-help-background: #fff3f3; diff --git a/web/cobrands/bexley/assets.js b/web/cobrands/bexley/assets.js index 541d47ea4..db2384195 100644 --- a/web/cobrands/bexley/assets.js +++ b/web/cobrands/bexley/assets.js @@ -21,18 +21,10 @@ var defaults = { strategy_class: OpenLayers.Strategy.FixMyStreet }; -var streetlight_select = $.extend({ - label: "${Unit_No}", - labelOutlineColor: "white", - labelOutlineWidth: 3, - labelYOffset: 65, - fontSize: '15px', - fontWeight: 'bold' -}, fixmystreet.assets.style_default_select.defaultStyle); - var streetlight_stylemap = new OpenLayers.StyleMap({ 'default': fixmystreet.assets.style_default, - 'select': new OpenLayers.Style(streetlight_select) + 'hover': fixmystreet.assets.style_default_hover, + 'select': fixmystreet.assets.construct_named_select_style("${Unit_No}") }); var labeled_defaults = $.extend(true, {}, defaults, { @@ -45,18 +37,8 @@ var labeled_defaults = $.extend(true, {}, defaults, { UnitID: 'Unit_ID' }, actions: { - asset_found: function(asset) { - var id = asset.attributes[this.fixmystreet.feature_code] || ''; - if (id !== '') { - var asset_name = this.fixmystreet.asset_item; - $('.category_meta_message').html('You have selected ' + asset_name + ' <b>' + id + '</b>'); - } else { - $('.category_meta_message').html(this.fixmystreet.asset_item_message); - } - }, - asset_not_found: function() { - $('.category_meta_message').html(this.fixmystreet.asset_item_message); - } + asset_found: fixmystreet.assets.named_select_action_found, + asset_not_found: fixmystreet.assets.named_select_action_not_found } }); diff --git a/web/cobrands/bexley/base.scss b/web/cobrands/bexley/base.scss index 7132f33ab..0f72a2e34 100644 --- a/web/cobrands/bexley/base.scss +++ b/web/cobrands/bexley/base.scss @@ -39,7 +39,7 @@ small { .mobile-map-banner { font-size: 0.89em; } -#front-main a#geolocate_link { +a#geolocate_link { font-size: 0.89em; } #front_stats div { diff --git a/web/cobrands/bexley/layout.scss b/web/cobrands/bexley/layout.scss index 948b01443..c18574bd5 100644 --- a/web/cobrands/bexley/layout.scss +++ b/web/cobrands/bexley/layout.scss @@ -6,6 +6,10 @@ body.twothirdswidthpage .content .sticky-sidebar aside { top: 10em; } +#site-header { + border-top: 7px solid $fuchsia; +} + #site-logo { width: 208px; height: 80px; @@ -18,10 +22,47 @@ body.twothirdswidthpage .content .sticky-sidebar aside { color: $fuchsia_lt; } +.frontpage { + .nav-menu--main { + margin: 3em 0 0 0; + } +} + .nav-menu--main { - span { - background-color: $nav_hover_background_colour; - } + a { + &:hover, + &:active, + &:focus { + color: $text_black; + } + } + a.report-a-problem-btn, + span.report-a-problem-btn, + span { + background-color: $nav_hover_background_colour; + color: $text_black; + border-radius: 0; + &:hover { + color: $fuchsia; + cursor: pointer; + } + } + a[href='/auth'] { + position: absolute; + top: 0; + right: 1em; + .frontpage & { + right: 0; + } + background-color: $fuchsia; + color: $white; + padding: 0 0.75em; + &:hover, + &:active, + &:focus { + color: $white; + } + } } .general-notes { diff --git a/web/cobrands/borsetshire/_colours.scss b/web/cobrands/borsetshire/_colours.scss index 45936ddb9..5cdda2401 100644 --- a/web/cobrands/borsetshire/_colours.scss +++ b/web/cobrands/borsetshire/_colours.scss @@ -34,3 +34,7 @@ $mappage-header-height: 5em; // 3em #site-logo plus 1em padding top and bottom $body-font: Cabin, "Calibri", "Gill Sans", "Gill Sans MT", sans-serif; $meta-font: $body-font; $heading-font: $body-font; + +$search-help-alignment: left; +$search-help-background: #fff3f3; +$search-help-header-font-size-desktop: 1.25em; diff --git a/web/cobrands/borsetshire/js.js b/web/cobrands/borsetshire/js.js index 2888a9548..6c0da398e 100644 --- a/web/cobrands/borsetshire/js.js +++ b/web/cobrands/borsetshire/js.js @@ -4,27 +4,8 @@ return; } - function set_redirect(form) { - var e = form.username.value; - if (e == 'inspector@example.org') { - form.r.value = 'my/planned'; - } else if (e == 'cs@example.org') { - form.r.value = 'reports'; - } else if (e == 'super@example.org') { - form.r.value = 'admin'; - } - } - - $('#demo-user-list button').click(function(){ - var form = document.forms.general_auth; - form.username.value = $(this).data('email'); - form.password_sign_in.value = 'password'; - set_redirect(form); - form.submit(); - }); - $('form[name=general_auth]').on('submit', function() { - set_redirect(this); + fixmystreet.borsetshire.set_redirect(this); }); })(); diff --git a/web/cobrands/bristol/_colours.scss b/web/cobrands/bristol/_colours.scss index cd87161a8..c4ff28f9f 100644 --- a/web/cobrands/bristol/_colours.scss +++ b/web/cobrands/bristol/_colours.scss @@ -33,3 +33,9 @@ $header-top-border: false; $col_click_map: $g1; $col_click_map_dark: darken($g1, 10%); + +$search-help-alignment: left; +$search-help-background: #fff3f3; +$search-help-header-font-weight: normal; +$search-help-header-font-size-desktop: 1.25em; +$search-help-margin-desktop: -1em -1em 0 -1em; diff --git a/web/cobrands/bristol/base.scss b/web/cobrands/bristol/base.scss index 836b27009..bce22f3a3 100644 --- a/web/cobrands/bristol/base.scss +++ b/web/cobrands/bristol/base.scss @@ -109,10 +109,6 @@ dl dt { } } -a#geolocate_link { - color: $b3; -} - label { @extend %bold-font; } @@ -122,3 +118,7 @@ label { color: $g7 !important; font-weight: bold !important; } + +b, strong { + @extend %bold-font; +} diff --git a/web/cobrands/bristol/layout.scss b/web/cobrands/bristol/layout.scss index 07b39b08b..c2ba57afe 100644 --- a/web/cobrands/bristol/layout.scss +++ b/web/cobrands/bristol/layout.scss @@ -54,10 +54,6 @@ body.frontpage, body.twothirdswidthpage, body.fullwidthpage, body.authpage { } } - a#geolocate_link { - color: $b3; - } - h1 { font-size: 3em; } diff --git a/web/cobrands/bromley/_colours.scss b/web/cobrands/bromley/_colours.scss index 9528f5403..1edec0e9b 100644 --- a/web/cobrands/bromley/_colours.scss +++ b/web/cobrands/bromley/_colours.scss @@ -9,6 +9,8 @@ $bromley_dark_green: #505050; $primary: $bromley_blue; $primary_b: #ffffff; $primary_text: #ffffff; +$primary_link_color: $primary_text; +$primary_link_hover_color: rgba($primary_text, 0.8); $link-color: $bromley_green; $link-hover-color: $bromley_green; @@ -28,3 +30,5 @@ $header-top-border-width: 4px; // Override the container width to match Bromley' site, which is wider $container-max-width: 1200px; + +$search-help-header-font-size-desktop: 1.25em; diff --git a/web/cobrands/bromley/_fonts.scss b/web/cobrands/bromley/_fonts.scss index b54d10542..cf3b85148 100644 --- a/web/cobrands/bromley/_fonts.scss +++ b/web/cobrands/bromley/_fonts.scss @@ -7,4 +7,4 @@ } $body-font: Arial,'Helvetica Neue',Helvetica,sans-serif; $meta-font: $body-font; -$heading-font: 'Gill Sans condensed', 'Gill Sans','Trebuchet MS',Calibri,sans-serif; +$heading-font: $body-font; diff --git a/web/cobrands/bromley/base.scss b/web/cobrands/bromley/base.scss index 3791f1d16..abb93d30b 100644 --- a/web/cobrands/bromley/base.scss +++ b/web/cobrands/bromley/base.scss @@ -14,6 +14,11 @@ text-indent: -999999px; z-index:2; } +body.waste #site-logo { + width: 129px; + background: none; + text-indent: 0; +} #nav-link { top: 7px; @@ -74,6 +79,15 @@ a:active { color: $link-visited-color; } +// Want main text links to be bold +.content a { + font-weight: bold; +} +// Except in list items +.item-list a { + font-weight: normal; +} + // The map page header looks a bit high for some reason .big-green-banner { top: 0; @@ -434,3 +448,84 @@ body.mappage { } } } + +@import "../sass/waste"; + +// Waste style overrides +.waste { + [class^="govuk-heading-"], + .govuk-fieldset__heading { + font-family: $heading-font; + color: darken($bromley_blue, 10%); + } + + .govuk-heading-xl { + font-size: 2.2em; + margin-bottom: 1em; + } + + .govuk-heading-l { + font-size: 1.4375em; + } + + .govuk-heading-m { + font-size: 1.125em; + } + + .govuk-summary-list { + border-top-color: $bromley_blue; + } + + .govuk-button { + background-color: $bromley_green; + box-shadow: 0 2px 0 darken($bromley_green, 10%); + &:hover { + //don't override focus as gov.uk is good at that + background-color: darken($bromley_green, 10%); + } + } + + .govuk-button--secondary { + background-color: $base_bg; + box-shadow: 0 2px 0 darken($base_bg, 10%); + &:hover { + background-color: darken($base_bg, 5%); + box-shadow: 0 2px 0 darken($base_bg, 15%); + } + } +} + +.bromley-waste-credits { + margin-top: 6em; + margin-bottom: 1em; + + p { + font-size: 0.875em; + color: #666; + margin-bottom: 0; + } + + a { + display: inline-block; + height: 0; + padding-top: 40px; + overflow: hidden; + margin-right: 1.5em; + margin-top: 0.5em; + + &[href*="veolia"] { + width: 160px; + background: transparent none 0 0 no-repeat; + @include svg-background-image('/cobrands/bromley/images/logo-veolia'); + background-size: 160px 40px; + } + + &[href*="societyworks"] { + width: 193px; + background: transparent none 0 0 no-repeat; + @include svg-background-image('/cobrands/bromley/images/logo-societyworks'); + background-size: 193px 40px; + vertical-align: -4px; + } + } +} diff --git a/web/cobrands/bromley/images/container-images/battery-bag.png b/web/cobrands/bromley/images/container-images/battery-bag.png Binary files differnew file mode 100644 index 000000000..8f9c75d74 --- /dev/null +++ b/web/cobrands/bromley/images/container-images/battery-bag.png diff --git a/web/cobrands/bromley/images/container-images/battery-bag@2x.png b/web/cobrands/bromley/images/container-images/battery-bag@2x.png Binary files differnew file mode 100644 index 000000000..16131bf35 --- /dev/null +++ b/web/cobrands/bromley/images/container-images/battery-bag@2x.png diff --git a/web/cobrands/bromley/images/container-images/electricals-batteries-textiles.png b/web/cobrands/bromley/images/container-images/electricals-batteries-textiles.png Binary files differnew file mode 100644 index 000000000..268726215 --- /dev/null +++ b/web/cobrands/bromley/images/container-images/electricals-batteries-textiles.png diff --git a/web/cobrands/bromley/images/container-images/electricals-batteries-textiles@2x.png b/web/cobrands/bromley/images/container-images/electricals-batteries-textiles@2x.png Binary files differnew file mode 100644 index 000000000..579295009 --- /dev/null +++ b/web/cobrands/bromley/images/container-images/electricals-batteries-textiles@2x.png diff --git a/web/cobrands/bromley/images/container-images/food-communal.png b/web/cobrands/bromley/images/container-images/food-communal.png Binary files differnew file mode 100644 index 000000000..51dc74042 --- /dev/null +++ b/web/cobrands/bromley/images/container-images/food-communal.png diff --git a/web/cobrands/bromley/images/container-images/food-communal@2x.png b/web/cobrands/bromley/images/container-images/food-communal@2x.png Binary files differnew file mode 100644 index 000000000..6720b14fd --- /dev/null +++ b/web/cobrands/bromley/images/container-images/food-communal@2x.png diff --git a/web/cobrands/bromley/images/container-images/food-green-caddy.png b/web/cobrands/bromley/images/container-images/food-green-caddy.png Binary files differnew file mode 100644 index 000000000..9483fe19c --- /dev/null +++ b/web/cobrands/bromley/images/container-images/food-green-caddy.png diff --git a/web/cobrands/bromley/images/container-images/food-green-caddy@2x.png b/web/cobrands/bromley/images/container-images/food-green-caddy@2x.png Binary files differnew file mode 100644 index 000000000..db3b71ed5 --- /dev/null +++ b/web/cobrands/bromley/images/container-images/food-green-caddy@2x.png diff --git a/web/cobrands/bromley/images/container-images/garden-waste-bin.png b/web/cobrands/bromley/images/container-images/garden-waste-bin.png Binary files differnew file mode 100644 index 000000000..3c88a9035 --- /dev/null +++ b/web/cobrands/bromley/images/container-images/garden-waste-bin.png diff --git a/web/cobrands/bromley/images/container-images/garden-waste-bin@2x.png b/web/cobrands/bromley/images/container-images/garden-waste-bin@2x.png Binary files differnew file mode 100644 index 000000000..3b5803d7b --- /dev/null +++ b/web/cobrands/bromley/images/container-images/garden-waste-bin@2x.png diff --git a/web/cobrands/bromley/images/container-images/kerbside-black-box-paper.png b/web/cobrands/bromley/images/container-images/kerbside-black-box-paper.png Binary files differnew file mode 100644 index 000000000..b9befa604 --- /dev/null +++ b/web/cobrands/bromley/images/container-images/kerbside-black-box-paper.png diff --git a/web/cobrands/bromley/images/container-images/kerbside-black-box-paper@2x.png b/web/cobrands/bromley/images/container-images/kerbside-black-box-paper@2x.png Binary files differnew file mode 100644 index 000000000..a01ef8a9a --- /dev/null +++ b/web/cobrands/bromley/images/container-images/kerbside-black-box-paper@2x.png diff --git a/web/cobrands/bromley/images/container-images/kerbside-green-box-mix.png b/web/cobrands/bromley/images/container-images/kerbside-green-box-mix.png Binary files differnew file mode 100644 index 000000000..108cf0d59 --- /dev/null +++ b/web/cobrands/bromley/images/container-images/kerbside-green-box-mix.png diff --git a/web/cobrands/bromley/images/container-images/kerbside-green-box-mix@2x.png b/web/cobrands/bromley/images/container-images/kerbside-green-box-mix@2x.png Binary files differnew file mode 100644 index 000000000..764f26f7b --- /dev/null +++ b/web/cobrands/bromley/images/container-images/kerbside-green-box-mix@2x.png diff --git a/web/cobrands/bromley/images/container-images/large-communal-black.png b/web/cobrands/bromley/images/container-images/large-communal-black.png Binary files differnew file mode 100644 index 000000000..d9e030038 --- /dev/null +++ b/web/cobrands/bromley/images/container-images/large-communal-black.png diff --git a/web/cobrands/bromley/images/container-images/large-communal-black@2x.png b/web/cobrands/bromley/images/container-images/large-communal-black@2x.png Binary files differnew file mode 100644 index 000000000..4f06dc47b --- /dev/null +++ b/web/cobrands/bromley/images/container-images/large-communal-black@2x.png diff --git a/web/cobrands/bromley/images/container-images/refuse-black-sack.png b/web/cobrands/bromley/images/container-images/refuse-black-sack.png Binary files differnew file mode 100644 index 000000000..0ecd7956b --- /dev/null +++ b/web/cobrands/bromley/images/container-images/refuse-black-sack.png diff --git a/web/cobrands/bromley/images/container-images/refuse-black-sack@2x.png b/web/cobrands/bromley/images/container-images/refuse-black-sack@2x.png Binary files differnew file mode 100644 index 000000000..e880b1c4e --- /dev/null +++ b/web/cobrands/bromley/images/container-images/refuse-black-sack@2x.png diff --git a/web/cobrands/bromley/images/container-images/small-communal-mix.png b/web/cobrands/bromley/images/container-images/small-communal-mix.png Binary files differnew file mode 100644 index 000000000..f19b7991d --- /dev/null +++ b/web/cobrands/bromley/images/container-images/small-communal-mix.png diff --git a/web/cobrands/bromley/images/container-images/small-communal-mix@2x.png b/web/cobrands/bromley/images/container-images/small-communal-mix@2x.png Binary files differnew file mode 100644 index 000000000..0118142ba --- /dev/null +++ b/web/cobrands/bromley/images/container-images/small-communal-mix@2x.png diff --git a/web/cobrands/bromley/images/container-images/small-communal-paper.png b/web/cobrands/bromley/images/container-images/small-communal-paper.png Binary files differnew file mode 100644 index 000000000..28da47315 --- /dev/null +++ b/web/cobrands/bromley/images/container-images/small-communal-paper.png diff --git a/web/cobrands/bromley/images/container-images/small-communal-paper@2x.png b/web/cobrands/bromley/images/container-images/small-communal-paper@2x.png Binary files differnew file mode 100644 index 000000000..17790b663 --- /dev/null +++ b/web/cobrands/bromley/images/container-images/small-communal-paper@2x.png diff --git a/web/cobrands/bromley/images/container-images/textile-bag.png b/web/cobrands/bromley/images/container-images/textile-bag.png Binary files differnew file mode 100644 index 000000000..f89fda6a7 --- /dev/null +++ b/web/cobrands/bromley/images/container-images/textile-bag.png diff --git a/web/cobrands/bromley/images/container-images/textile-bag@2x.png b/web/cobrands/bromley/images/container-images/textile-bag@2x.png Binary files differnew file mode 100644 index 000000000..0b69f2d0c --- /dev/null +++ b/web/cobrands/bromley/images/container-images/textile-bag@2x.png diff --git a/web/cobrands/bromley/images/container-images/weee-bag.png b/web/cobrands/bromley/images/container-images/weee-bag.png Binary files differnew file mode 100644 index 000000000..1837fbecc --- /dev/null +++ b/web/cobrands/bromley/images/container-images/weee-bag.png diff --git a/web/cobrands/bromley/images/container-images/weee-bag@2x.png b/web/cobrands/bromley/images/container-images/weee-bag@2x.png Binary files differnew file mode 100644 index 000000000..adbdd963d --- /dev/null +++ b/web/cobrands/bromley/images/container-images/weee-bag@2x.png diff --git a/web/cobrands/bromley/images/logo-societyworks.png b/web/cobrands/bromley/images/logo-societyworks.png Binary files differnew file mode 100644 index 000000000..e6cdde1d1 --- /dev/null +++ b/web/cobrands/bromley/images/logo-societyworks.png diff --git a/web/cobrands/bromley/images/logo-societyworks.svg b/web/cobrands/bromley/images/logo-societyworks.svg new file mode 100644 index 000000000..baf03d2dc --- /dev/null +++ b/web/cobrands/bromley/images/logo-societyworks.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="193" height="40" viewBox="0 0 193 40"><g fill="none"><path fill="#3B3F44" d="M53.036 10.658c-.097.17-.227.32-.382.439a.824.824 0 01-.512.146 1.241 1.241 0 01-.597-.175l-.728-.4a5.945 5.945 0 00-.93-.396 3.675 3.675 0 00-1.183-.175 2.536 2.536 0 00-1.707.507c-.378.338-.585.83-.562 1.34-.007.333.12.655.353.892.258.257.56.464.89.61.409.187.829.345 1.259.472.47.142.954.3 1.445.474.494.177.976.384 1.445.618.457.23.875.53 1.24.89.378.384.68.839.888 1.338.245.602.365 1.249.353 1.9a6.238 6.238 0 01-.424 2.31 5.328 5.328 0 01-1.226 1.874 5.706 5.706 0 01-1.983 1.26 7.4 7.4 0 01-2.678.458 8.441 8.441 0 01-1.675-.172 10.009 10.009 0 01-1.654-.482 9.454 9.454 0 01-1.494-.739 6.45 6.45 0 01-1.223-.953l1.212-1.932a.972.972 0 01.375-.357c.158-.09.337-.136.519-.135.261.006.515.088.731.235.248.154.523.325.834.51.338.204.693.376 1.06.515.454.162.933.24 1.414.232a2.676 2.676 0 001.728-.496c.44-.394.67-.976.618-1.568a1.488 1.488 0 00-.353-1.014 2.63 2.63 0 00-.89-.65 7.721 7.721 0 00-1.252-.45 37.316 37.316 0 01-1.438-.435 10.218 10.218 0 01-1.438-.586 4.54 4.54 0 01-1.254-.917 4.327 4.327 0 01-.887-1.428 5.662 5.662 0 01-.354-2.096 5.053 5.053 0 011.572-3.653 5.758 5.758 0 011.898-1.192 6.977 6.977 0 012.576-.447 9.553 9.553 0 011.58.129 8.14 8.14 0 012.745.978c.382.222.738.486 1.06.79l-.971 1.93zm8.774 1.375c.9-.012 1.794.14 2.639.448a5.677 5.677 0 013.37 3.328 7.3 7.3 0 01.473 2.696 7.413 7.413 0 01-.474 2.72 5.858 5.858 0 01-1.326 2.058 5.831 5.831 0 01-2.043 1.302 7.346 7.346 0 01-2.639.455 7.458 7.458 0 01-2.656-.455 6.008 6.008 0 01-2.062-1.302 5.833 5.833 0 01-1.337-2.058 7.412 7.412 0 01-.47-2.72 7.3 7.3 0 01.47-2.696c.295-.765.75-1.46 1.337-2.037a5.983 5.983 0 012.062-1.29c.85-.308 1.75-.46 2.656-.449zm0 10.209a2.158 2.158 0 001.943-.91c.416-.616.62-1.544.62-2.795 0-1.252-.204-2.177-.62-2.788a2.157 2.157 0 00-1.943-.918 2.226 2.226 0 00-1.975.91c-.416.612-.624 1.542-.624 2.788 0 1.252.208 2.18.624 2.795.45.629 1.2.977 1.975.918zm17.731-7.03a2.062 2.062 0 01-.328.331.715.715 0 01-.453.121.98.98 0 01-.506-.135l-.507-.298a3.96 3.96 0 00-.66-.296 2.74 2.74 0 00-.938-.135 2.628 2.628 0 00-1.201.256 2.23 2.23 0 00-.838.711c-.235.354-.4.749-.489 1.163-.11.51-.162 1.03-.157 1.55 0 1.21.232 2.134.713 2.788a2.249 2.249 0 001.933.974 2.71 2.71 0 001.045-.163 3.11 3.11 0 00.653-.356l.496-.355a.911.911 0 01.567-.171.782.782 0 01.68.327l1.1 1.351c-.357.42-.771.786-1.231 1.088a6.07 6.07 0 01-1.327.658c-.44.156-.896.267-1.359.33-.44.06-.885.09-1.33.09a5.722 5.722 0 01-2.215-.438 5.396 5.396 0 01-1.858-1.273 6.106 6.106 0 01-1.27-2.048 7.649 7.649 0 01-.466-2.777 7.83 7.83 0 01.406-2.55c.257-.76.669-1.46 1.21-2.054a5.567 5.567 0 011.978-1.37 6.908 6.908 0 012.725-.497 6.672 6.672 0 012.614.473c.76.324 1.449.796 2.026 1.387l-1.013 1.319zm6.638-6.497c.002.291-.06.578-.182.843a2.226 2.226 0 01-.498.707c-.215.2-.464.36-.736.474a2.312 2.312 0 01-.896.174 2.144 2.144 0 01-.865-.174 2.427 2.427 0 01-.711-.474 2.193 2.193 0 01-.487-.707 2.033 2.033 0 01-.178-.843c-.002-.295.059-.588.178-.86a2.24 2.24 0 01.487-.707c.205-.201.446-.362.711-.474a2.19 2.19 0 01.865-.17 2.336 2.336 0 011.632.644c.21.202.38.442.498.708.121.27.183.563.182.86zm-.438 3.44v12.56h-3.774v-12.56h3.774zm8.194-.122c.772-.01 1.54.12 2.267.388a4.924 4.924 0 011.749 1.13 5.174 5.174 0 011.147 1.818c.287.779.427 1.605.413 2.436.004.238-.007.475-.035.71a1.11 1.11 0 01-.13.427.52.52 0 01-.258.22 1.224 1.224 0 01-.413.06h-7.157c.119 1.066.434 1.819.948 2.291.542.487 1.25.742 1.973.71.378.008.754-.045 1.116-.156a5.93 5.93 0 00.829-.355l.671-.355c.198-.103.418-.157.64-.156a.765.765 0 01.672.327l1.078 1.35a5.51 5.51 0 01-1.239 1.086 6.279 6.279 0 01-1.367.657 7.336 7.336 0 01-1.4.33c-.443.059-.89.089-1.336.09a6.901 6.901 0 01-2.449-.43 5.667 5.667 0 01-1.997-1.283 6.081 6.081 0 01-1.354-2.13 7.98 7.98 0 01-.497-2.942c-.003-.818.141-1.629.427-2.394a5.78 5.78 0 013.148-3.331 6.238 6.238 0 012.554-.498zm.074 2.6a2.223 2.223 0 00-1.655.615 3.22 3.22 0 00-.79 1.776h4.638c0-.297-.038-.592-.116-.877a2.087 2.087 0 00-.37-.757 1.887 1.887 0 00-.676-.543 2.275 2.275 0 00-1.031-.214zm12.009 10.407a4.602 4.602 0 01-1.605-.256 3.076 3.076 0 01-1.888-1.88 4.399 4.399 0 01-.244-1.501V14.97h-1.077a.728.728 0 01-.503-.186.693.693 0 01-.212-.547v-1.452l2.029-.386.75-3.037a.756.756 0 01.836-.575h1.99v3.637h3.097v2.546h-3.098v6.18c-.007.25.069.496.216.702.145.19.378.295.62.28a1.245 1.245 0 00.607-.137l.198-.094a.505.505 0 01.212-.042.442.442 0 01.276.077.9.9 0 01.215.245l1.156 1.754a5.258 5.258 0 01-1.658.835 6.647 6.647 0 01-1.917.27zm10.825 3.483a1.063 1.063 0 01-1.19.73h-2.815l2.424-5.095-5.018-11.473h3.324c.241-.014.48.055.677.194.16.117.283.277.355.461l2.062 5.421c.19.49.349.993.475 1.503.078-.259.167-.51.266-.762.1-.252.188-.507.28-.765l1.868-5.397a.939.939 0 01.379-.468c.182-.121.395-.186.613-.187h3.034l-6.734 15.838z"/><path fill="#9E9A98" d="M125.203 7.163h1.954c.187-.007.371.05.522.161.134.1.232.24.28.4l3.593 12.2c.064.222.125.458.178.716.053.258.103.519.152.795.054-.276.11-.544.167-.802.053-.242.118-.48.195-.716l4.094-12.2a.876.876 0 01.283-.382.776.776 0 01.515-.18h.68a.807.807 0 01.519.162c.13.103.229.242.283.4l4.069 12.207c.159.479.288.966.387 1.46.05-.271.092-.53.134-.772.037-.233.09-.462.156-.688l3.608-12.2a.751.751 0 01.273-.39.79.79 0 01.514-.17h1.834l-5.427 17.552h-2.11l-4.41-13.387a7.207 7.207 0 01-.24-.884c-.043.164-.079.322-.118.472-.039.15-.074.286-.113.412l-4.43 13.387h-2.129l-5.413-17.553zm28.956 4.87a6.309 6.309 0 012.428.449c.7.285 1.328.722 1.841 1.279.52.58.917 1.26 1.165 2a8.662 8.662 0 010 5.249 5.669 5.669 0 01-1.165 1.994c-.512.555-1.14.99-1.84 1.272a6.914 6.914 0 01-4.858 0 5.111 5.111 0 01-1.848-1.272 5.637 5.637 0 01-1.175-1.994 8.52 8.52 0 010-5.248 5.64 5.64 0 011.175-2.001 5.172 5.172 0 011.848-1.28 6.309 6.309 0 012.429-.447zm0 10.995c1.21 0 2.115-.407 2.715-1.222.6-.815.898-1.952.896-3.411 0-1.467-.3-2.61-.896-3.43-.597-.82-1.502-1.229-2.715-1.229a3.772 3.772 0 00-1.6.316c-.447.206-.837.52-1.133.914-.32.433-.55.926-.68 1.45a8.738 8.738 0 000 3.908 4.09 4.09 0 00.669 1.482c.3.388.689.7 1.133.906.507.223 1.057.33 1.61.316zm8.117 1.688V12.24h1.185a.651.651 0 01.465.137.864.864 0 01.173.468l.139 1.946a5.638 5.638 0 011.493-2.036 3.163 3.163 0 012.084-.72 3.18 3.18 0 01.883.115c.256.075.503.185.733.328l-.268 1.637a.345.345 0 01-.36.31 1.69 1.69 0 01-.5-.12 3.064 3.064 0 00-.94-.115 2.565 2.565 0 00-1.808.666 5.039 5.039 0 00-1.212 1.932v7.93h-2.067zM173.865 6.83v10.525h.556c.136.004.271-.018.399-.064.133-.068.253-.16.352-.273l3.878-4.165c.105-.118.224-.224.353-.315a.849.849 0 01.483-.124h1.953l-4.527 4.82a3.28 3.28 0 01-.331.355 1.958 1.958 0 01-.37.28c.143.095.275.207.391.334.123.132.234.276.331.429l4.78 6.084h-1.931a.894.894 0 01-.451-.107 1.176 1.176 0 01-.353-.319l-4.019-5.04a.937.937 0 00-.352-.334 1.43 1.43 0 00-.543-.078h-.6v5.878h-2.157V6.83h2.158zm17.01 7.747a.477.477 0 01-.449.266.853.853 0 01-.416-.131c-.152-.087-.34-.187-.566-.298a5.53 5.53 0 00-.796-.304 3.867 3.867 0 00-1.096-.139 3.26 3.26 0 00-.985.139 2.373 2.373 0 00-.751.382c-.197.151-.359.344-.473.564-.113.219-.17.462-.167.708-.01.288.088.57.274.79.202.224.443.409.711.546.329.164.672.3 1.025.404.38.117.771.244 1.173.376.402.13.794.283 1.174.442.368.156.712.36 1.025.606.296.246.538.55.711.893.194.394.288.83.274 1.269a4.008 4.008 0 01-.302 1.57c-.202.478-.51.905-.904 1.247a4.273 4.273 0 01-1.458.832 6.034 6.034 0 01-2 .301 6.25 6.25 0 01-2.336-.418 5.967 5.967 0 01-1.779-1.063l.509-.822a.77.77 0 01.23-.244.667.667 0 01.357-.085.82.82 0 01.462.17c.16.113.356.237.59.375.267.154.548.28.84.376.4.124.816.181 1.234.17.377.008.752-.047 1.11-.163.29-.094.559-.244.79-.443.203-.175.364-.395.47-.641a2.04 2.04 0 00.152-.776 1.293 1.293 0 00-.273-.843 2.325 2.325 0 00-.712-.57 5.744 5.744 0 00-1.028-.412c-.384-.117-.779-.24-1.18-.354a12.417 12.417 0 01-1.182-.443 4.035 4.035 0 01-1.017-.663 2.797 2.797 0 01-.712-.928 3.009 3.009 0 01-.274-1.34 3.252 3.252 0 01.292-1.353 3.31 3.31 0 01.854-1.137 4.18 4.18 0 011.376-.783 5.48 5.48 0 011.86-.29 5.894 5.894 0 012.185.382c.623.24 1.193.602 1.675 1.063l-.498.772z"/><path fill="#FFD877" d="M33.792 25.93V19.094l.03-.032-.03-.028-3.364-15.645L14.442 0 0 14.052V20.978l3.365 15.644L19.343 40l14.453-14.052-.029-.028.025.01zM11.53 21.356l4.477-4.352 6.291 1.333.101.473-4.467 4.352-6.29-1.333-.112-.473z"/><path fill="#3B3F44" d="M16.013 10.211l-5.694 5.606 1.326 6.256 6.293 1.348 5.693-5.605-1.325-6.256-6.293-1.349zM14.447 0l15.98 3.416 3.365 15.82.03.029-14.462 14.23L3.376 30.08.011 14.26l.018-.018L0 14.213 14.447 0z"/></g></svg>
\ No newline at end of file diff --git a/web/cobrands/bromley/images/logo-veolia.png b/web/cobrands/bromley/images/logo-veolia.png Binary files differnew file mode 100644 index 000000000..c4fd283d3 --- /dev/null +++ b/web/cobrands/bromley/images/logo-veolia.png diff --git a/web/cobrands/bromley/images/logo-veolia.svg b/web/cobrands/bromley/images/logo-veolia.svg new file mode 100644 index 000000000..9bd4f073b --- /dev/null +++ b/web/cobrands/bromley/images/logo-veolia.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="160" height="40" viewBox="0 0 160 40"><path fill="#ED1C24" d="M17.555 39.304C9.293 37.994 2.9 31.937 1.203 23.816.87 22.224.76 19.277.973 17.65 2.112 8.888 8.634 2.19 17.426.746c1.705-.28 5.114-.202 6.743.155 6.965 1.524 12.409 6.38 14.608 13.028.666 2.015.967 3.9.967 6.07 0 9.139-6.26 16.941-15.27 19.033-1.424.33-5.531.492-6.92.272zm2.02-8.845c-1.019-1.188-2.58-3.67-3.057-4.86-.433-1.082-.48-1.342-.481-2.737-.003-1.394.038-1.63.421-2.461.755-1.635 2.129-2.549 3.845-2.559 2.51-.014 4.356 2.142 4.344 5.075-.007 1.922-1.011 4.17-3.006 6.73l-1.153 1.479 1.114-.101a13.75 13.75 0 008.563-4.073c1.233-1.256 1.86-2.15 2.614-3.723.992-2.075 1.292-3.433 1.298-5.873.003-1.643-.06-2.315-.32-3.348C32.085 7.335 25.645 2.84 18.862 3.611 13.14 4.262 8.37 8.432 6.972 14.008c-.464 1.855-.459 4.888.013 6.651 1.42 5.304 5.643 9.247 10.934 10.207.578.105 1.308.197 1.62.204l.57.013-.535-.624zm77.501.988c-1.414-.26-3.139-.84-4.028-1.354-2.125-1.227-3.51-3.533-3.988-6.644-.214-1.39-.082-4.44.247-5.726.582-2.275 1.778-4.058 3.512-5.234 1.731-1.175 5.331-1.84 8.31-1.537 3.045.311 4.882 1.06 6.428 2.623 1.153 1.165 1.77 2.33 2.246 4.233.438 1.755.47 5.459.062 7.036-.89 3.441-2.936 5.51-6.329 6.398-1.56.41-4.795.512-6.46.205zm4.984-3.72c1.103-.49 1.595-.935 2.116-1.913.634-1.189.897-2.527.897-4.567 0-4.752-1.672-6.824-5.5-6.818-1.768.003-2.768.315-3.704 1.157-1.26 1.133-1.8 2.83-1.8 5.66 0 3.922 1.222 6.107 3.776 6.75.988.249 3.395.095 4.215-.27zM54.445 30.92c-.075-.193-1.993-4.54-4.262-9.66-2.269-5.121-4.125-9.366-4.125-9.434 0-.067.848-.122 1.885-.122 1.69 0 1.953.035 2.533.34.359.19.815.599 1.025.918.207.317 1.456 3.12 2.774 6.23 1.318 3.108 2.443 5.742 2.5 5.851.062.12 1.07-2.215 2.49-5.764 1.313-3.28 2.528-6.173 2.701-6.428.173-.256.606-.619.962-.806.59-.311.833-.341 2.736-.341h2.089l-4.032 8.919c-2.218 4.905-4.196 9.134-4.396 9.397-.617.81-1.372 1.091-3.164 1.176-1.56.074-1.581.071-1.716-.276zm20.756-.009c-2.753-.52-5.079-2.952-5.972-6.244-.458-1.69-.456-4.94.004-6.569.712-2.519 2.165-4.531 3.963-5.49 1.664-.887 2.22-.958 7.584-.968l4.845-.01v3.524l-4.188.073-4.188.074-.967.476c-.675.332-1.09.654-1.377 1.068-.405.584-.805 1.802-.805 2.45v.333l5.542.039 5.542.038v3.377l-5.542.038-5.542.039v.319c0 .175.108.704.24 1.174.325 1.161 1.12 2.052 2.223 2.49.79.312 1.09.336 4.987.387l4.148.055v3.5l-4.882-.017c-2.685-.01-5.212-.08-5.615-.156zm43.288-.12c-.578-.15-1.33-.417-1.672-.592-.884-.45-2.006-1.63-2.427-2.547-.662-1.446-.712-2.093-.718-9.268l-.005-6.754h1.541c1.333 0 1.611.044 2.056.322.982.616.946.366 1.027 7.24l.074 6.239.367.653c.264.47.572.758 1.096 1.027.714.367.806.376 4.295.423l3.565.049v3.5l-4.075-.008c-3.495-.007-4.223-.047-5.124-.283zm12.02-8.774c.04-8.624.055-9.086.32-9.477.465-.686 1.037-.889 2.694-.956l1.505-.06v9.053c0 9.99.032 9.635-.924 10.219-.39.237-.742.286-2.053.287h-1.583l.041-9.066zm6.944 8.894c.042-.107 1.783-4.126 3.871-8.93 4.25-9.783 4.284-9.842 5.738-10.217 1.023-.264 3.582-.28 3.787-.024.116.145 7.959 18.101 8.34 19.094.087.227-.08.25-1.834.25-2.857 0-3.311-.289-4.427-2.812l-.672-1.52-3.919-.039-3.918-.039-.15.396c-.083.217-.44.999-.795 1.736-.514 1.072-.768 1.429-1.265 1.773-.606.42-.672.432-2.726.478-1.7.039-2.09.01-2.03-.146zm13.68-7.94c-1.12-2.688-2.656-6.231-2.74-6.321-.089-.096-1.17 2.278-2.744 6.028l-.2.477h2.88c2.247 0 2.864-.04 2.804-.183z"/></svg>
\ No newline at end of file diff --git a/web/cobrands/bromley/images/waste.png b/web/cobrands/bromley/images/waste.png Binary files differnew file mode 100644 index 000000000..3ffef5ccb --- /dev/null +++ b/web/cobrands/bromley/images/waste.png diff --git a/web/cobrands/bromley/layout.scss b/web/cobrands/bromley/layout.scss index f2e6c41c8..dc4c361ab 100644 --- a/web/cobrands/bromley/layout.scss +++ b/web/cobrands/bromley/layout.scss @@ -11,6 +11,11 @@ body.fullwidthpage, body.twothirdswidthpage, body.authpage { float: left; } } +body.waste #site-logo { + width: 334px; + height: 114px; + float: left; +} body.mappage { .bromley-header { @@ -165,3 +170,7 @@ footer, } } } + +.bromley-waste-credits { + margin-bottom: 0; +} diff --git a/web/cobrands/bromley/map.js b/web/cobrands/bromley/map.js index 0753907cc..056dee0b9 100644 --- a/web/cobrands/bromley/map.js +++ b/web/cobrands/bromley/map.js @@ -1 +1 @@ -fixmystreet.maps.tile_base = [ [ "", "a-" ], "https://{S}fix.bromley.gov.uk/tilma" ]; +fixmystreet.maps.tile_base = '//{S}tilma.mysociety.org/bromley'; diff --git a/web/cobrands/buckinghamshire/_colours.scss b/web/cobrands/buckinghamshire/_colours.scss index cf328b673..7350e8f33 100644 --- a/web/cobrands/buckinghamshire/_colours.scss +++ b/web/cobrands/buckinghamshire/_colours.scss @@ -55,6 +55,10 @@ $col_click_map_dark: darken($bucks_charcoal, 10%); $header-top-border-width: 0; $header-top-border: 0; +$search-help-alignment: left; +$search-help-background: #fff3f3; +$search-help-header-font-size-desktop: 1.25em; + @mixin bucks-button { background-color: $bucks_button_bg; border: 0; diff --git a/web/cobrands/buckinghamshire/assets.js b/web/cobrands/buckinghamshire/assets.js index e11bf1a28..f15c78504 100644 --- a/web/cobrands/buckinghamshire/assets.js +++ b/web/cobrands/buckinghamshire/assets.js @@ -40,18 +40,10 @@ fixmystreet.assets.add(defaults, { asset_item: 'grit bin' }); -var streetlight_select = $.extend({ - label: "${feature_id}", - labelOutlineColor: "white", - labelOutlineWidth: 3, - labelYOffset: 65, - fontSize: '15px', - fontWeight: 'bold' -}, fixmystreet.assets.style_default_select.defaultStyle); - var streetlight_stylemap = new OpenLayers.StyleMap({ 'default': fixmystreet.assets.style_default, - 'select': new OpenLayers.Style(streetlight_select) + 'hover': fixmystreet.assets.style_default_hover, + 'select': fixmystreet.assets.construct_named_select_style("${feature_id}") }); var streetlight_code_to_type = { @@ -68,21 +60,15 @@ var streetlight_code_to_type = { var labeled_defaults = $.extend(true, {}, defaults, { select_action: true, + feature_code: 'feature_id', stylemap: streetlight_stylemap, + construct_asset_name: function(id) { + var code = id.replace(/[O0-9]+[A-Z]*/g, ''); + return {id: id, name: streetlight_code_to_type[code] || 'street light'}; + }, actions: { - asset_found: function(asset) { - var id = asset.attributes.feature_id || ''; - if (id !== '') { - var code = id.replace(/[0-9]/g, ''); - var asset_name = streetlight_code_to_type[code] || this.fixmystreet.asset_item; - $('.category_meta_message').html('You have selected ' + asset_name + ' <b>' + id + '</b>'); - } else { - $('.category_meta_message').html('You can pick a <b class="asset-spot">' + this.fixmystreet.asset_item + '</b> from the map »'); - } - }, - asset_not_found: function() { - $('.category_meta_message').html('You can pick a <b class="asset-spot">' + this.fixmystreet.asset_item + '</b> from the map »'); - } + asset_found: fixmystreet.assets.named_select_action_found, + asset_not_found: fixmystreet.assets.named_select_action_not_found } }); diff --git a/web/cobrands/buckinghamshire/base.scss b/web/cobrands/buckinghamshire/base.scss index 0c7bb4bc2..aefe76945 100644 --- a/web/cobrands/buckinghamshire/base.scss +++ b/web/cobrands/buckinghamshire/base.scss @@ -5,10 +5,6 @@ @import "../sass/base"; -.dev-site-notice { - display: none; -} - .container { padding: 0 20px; } @@ -106,26 +102,15 @@ dl dt { } #postcodeForm { - margin-top: 1em; + margin: 1em 0 0 0; + padding: 0; background: #fff; + div input#sub { @include bucks-button(); box-shadow: 0; } } - a#geolocate_link { - background: transparent; - color: $bucks_links; - padding: 0; - font-size: 1em; - &:hover, - &:active, - &:focus { - background: transparent; - color: $link-hover-color; - text-decoration: underline; - } - } } .btn-primary, .green-btn, .btn--primary { @@ -141,7 +126,13 @@ dl dt { } a#geolocate_link { - color: $b3; + color: $bucks_links; + + &:hover, + &:active, + &:focus { + color: $link-hover-color; + } } label { diff --git a/web/cobrands/buckinghamshire/layout.scss b/web/cobrands/buckinghamshire/layout.scss index 5df31f9e2..bea2fadc0 100644 --- a/web/cobrands/buckinghamshire/layout.scss +++ b/web/cobrands/buckinghamshire/layout.scss @@ -90,19 +90,14 @@ body.twothirdswidthpage .content .sticky-sidebar aside { background-color: white; text-align: left; padding-top: 40px; + padding-bottom: 0; #postcodeForm { - margin-top: 0; - div { margin: 0; } } - a#geolocate_link { - color: $b3; - } - h1 { font-size: 2.5em; } diff --git a/web/cobrands/cheshireeast/_colours.scss b/web/cobrands/cheshireeast/_colours.scss index 363214bd0..2dbc353c9 100644 --- a/web/cobrands/cheshireeast/_colours.scss +++ b/web/cobrands/cheshireeast/_colours.scss @@ -27,6 +27,7 @@ $col_button_hover: $green; $primary: $white; $primary_b: $green; $primary_text: $text_black; +$primary_link_decoration: none; $base_bg: $white; $base_fg: $text_black; @@ -42,3 +43,8 @@ $header-top-border: false; $heading-font: 'Open Sans', sans-serif; $body-font: 'Open Sans', sans-serif; $meta-font: $body-font; + +$search-help-alignment: left; +$search-help-background: #fff3f3; +$search-help-header-font-size-desktop: 1.25em; +$search-help-margin-desktop: 0; diff --git a/web/cobrands/cheshireeast/assets.js b/web/cobrands/cheshireeast/assets.js index bca654af7..f54af471f 100644 --- a/web/cobrands/cheshireeast/assets.js +++ b/web/cobrands/cheshireeast/assets.js @@ -20,18 +20,10 @@ var defaults = { strategy_class: OpenLayers.Strategy.FixMyStreet }; -var streetlight_select = $.extend({ - label: "${feature_id}", - labelOutlineColor: "white", - labelOutlineWidth: 3, - labelYOffset: 65, - fontSize: '15px', - fontWeight: 'bold' -}, fixmystreet.assets.style_default_select.defaultStyle); - var streetlight_stylemap = new OpenLayers.StyleMap({ 'default': fixmystreet.assets.style_default, - 'select': new OpenLayers.Style(streetlight_select) + 'hover': fixmystreet.assets.style_default_hover, + 'select': fixmystreet.assets.construct_named_select_style("${feature_id}") }); var labeled_defaults = $.extend(true, {}, defaults, { @@ -39,19 +31,10 @@ var labeled_defaults = $.extend(true, {}, defaults, { stylemap: streetlight_stylemap, asset_type: 'spot', asset_id_field: 'central_as', + feature_code: 'feature_id', actions: { - asset_found: function(asset) { - var id = asset.attributes.feature_id || ''; - if (id !== '') { - var asset_name = this.fixmystreet.asset_item; - $('.category_meta_message').html('You have selected ' + asset_name + ' <b>' + id + '</b>'); - } else { - $('.category_meta_message').html(this.fixmystreet.asset_item_message); - } - }, - asset_not_found: function() { - $('.category_meta_message').html(this.fixmystreet.asset_item_message); - } + asset_found: fixmystreet.assets.named_select_action_found, + asset_not_found: fixmystreet.assets.named_select_action_not_found } }); @@ -60,8 +43,7 @@ fixmystreet.assets.add(labeled_defaults, { filter_key: 'feature_gr', filter_value: 'LCOL', asset_group: 'Street lights', - asset_item: 'street light', - asset_item_message: 'You can pick a <b class="asset-spot">street light</b> from the map »' + asset_item: 'street light' }); fixmystreet.assets.add(defaults, { diff --git a/web/cobrands/cheshireeast/base.scss b/web/cobrands/cheshireeast/base.scss index 8e771f0ad..b4174c100 100644 --- a/web/cobrands/cheshireeast/base.scss +++ b/web/cobrands/cheshireeast/base.scss @@ -90,15 +90,12 @@ a, background-color: #ecf3ec; } -#front-main a#geolocate_link { - color: #2e3191; - background: transparent; +a#geolocate_link { border-bottom: 1px solid #a6a7da; - padding: 0; - margin-top: 0.5em; - font-size: inherit; + padding: 0; // remove padding so that border-bottom looks like an underline + margin: 0 0 1em 0; + &:hover { - background: transparent; border-bottom: 1px solid #2e3191; transition: border-color 0.5s; } @@ -115,6 +112,10 @@ a, } } +.search-help__header { + line-height: 1.3; +} + /* Header/footer */ #site-logo { diff --git a/web/cobrands/cheshireeast/layout.scss b/web/cobrands/cheshireeast/layout.scss index 71861e13f..ad5c6580b 100644 --- a/web/cobrands/cheshireeast/layout.scss +++ b/web/cobrands/cheshireeast/layout.scss @@ -29,11 +29,9 @@ body.frontpage .content { margin: 0; width: 30em; } -#front-main a#geolocate_link { - color: #2e3191; - &:hover { - text-decoration: none; - } + +a#geolocate_link { + margin-top: 1em; } .ce-footer { diff --git a/web/cobrands/eastherts/_colours.scss b/web/cobrands/eastherts/_colours.scss index 84ef39bd1..f365c28e6 100644 --- a/web/cobrands/eastherts/_colours.scss +++ b/web/cobrands/eastherts/_colours.scss @@ -35,3 +35,8 @@ $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; + +$search-help-alignment: left; +$search-help-background: #fff3f3; +$search-help-header-font-size-desktop: 1.25em; +$search-help-margin-desktop: 0; diff --git a/web/cobrands/eastherts/layout.scss b/web/cobrands/eastherts/layout.scss index 964feb5ca..d5fb3fc0d 100644 --- a/web/cobrands/eastherts/layout.scss +++ b/web/cobrands/eastherts/layout.scss @@ -116,10 +116,6 @@ } } - a#geolocate_link { - color: $eh_green; - } - h1 { font-size: 2.5em; } diff --git a/web/cobrands/eastsussex/assets.js b/web/cobrands/eastsussex/assets.js index 296c8ede4..6f5304cd0 100644 --- a/web/cobrands/eastsussex/assets.js +++ b/web/cobrands/eastsussex/assets.js @@ -72,18 +72,10 @@ fixmystreet.assets.add(defaults, { asset_item: 'street light', asset_category: ["Burning By Day", "Intermittent", "Lamp Dim", "Lamp Flashing", "Lamp Obscured", "Lamp Out", "Missing Number", "Noisy Column", "Vandalism" ], select_action: true, + feature_code: 'Name', actions: { - asset_found: function(asset) { - var id = asset.attributes.Name || ''; - if (id !== '') { - $('.category_meta_message').html('You have selected <b>' + id + '</b>'); - } else { - $('.category_meta_message').html('You can pick a <b class="asset-spot">' + this.fixmystreet.asset_item + '</b> from the map »'); - } - }, - asset_not_found: function() { - $('.category_meta_message').html('You can pick a <b class="asset-spot">' + this.fixmystreet.asset_item + '</b> from the map »'); - } + asset_found: fixmystreet.assets.named_select_action_found, + asset_not_found: fixmystreet.assets.named_select_action_not_found } }); @@ -106,22 +98,19 @@ fixmystreet.assets.add(defaults, { asset_item: 'drain', asset_category: ["Blocked Drain", "Culvert", "Broken Drain Cover", "Smell", "Sunken Drain", "Missing Drain Cover"], select_action: true, + construct_selected_asset_message: function(asset) { + var last_clean = asset.attributes.Gully_Last_Clean_Date__c || ''; + var next_clean = asset.attributes.Gully_Next_Clean_Date__c || ''; + if (last_clean !== '' || next_clean !== '') { + var message = ''; + if (last_clean) { message += '<b>Last Cleaned</b>: ' + last_clean; } + if (next_clean) { message += ' <b>Next Clean</b>: ' + next_clean; } + return message; + } + }, actions: { - asset_found: function(asset) { - var last_clean = asset.attributes.Gully_Last_Clean_Date__c || ''; - var next_clean = asset.attributes.Gully_Next_Clean_Date__c || ''; - if (last_clean !== '' || next_clean !== '') { - var message = ''; - if (last_clean) { message += '<b>Last Cleaned</b>: ' + last_clean; } - if (next_clean) { message += ' <b>Next Clean</b>: ' + next_clean; } - $('.category_meta_message').html(message); - } else { - $('.category_meta_message').html('You can pick a <b class="asset-spot">' + this.fixmystreet.asset_item + '</b> from the map »'); - } - }, - asset_not_found: function() { - $('.category_meta_message').html('You can pick a <b class="asset-spot">' + this.fixmystreet.asset_item + '</b> from the map »'); - } + asset_found: fixmystreet.assets.named_select_action_found, + asset_not_found: fixmystreet.assets.named_select_action_not_found } }); diff --git a/web/cobrands/fiksgatami/_colours.scss b/web/cobrands/fiksgatami/_colours.scss index 907065d36..cd5ed0c47 100644 --- a/web/cobrands/fiksgatami/_colours.scss +++ b/web/cobrands/fiksgatami/_colours.scss @@ -7,6 +7,8 @@ $bg: #1a4f7f; $primary: #99bfe1; $primary_b: #000000; $primary_text: #222222; +$primary_link_color: $primary_text; +$primary_link_hover_color: rgba($primary_text, 0.8); $base_bg: $bg; $base_fg: #fff; diff --git a/web/cobrands/fixamingata/_colours.scss b/web/cobrands/fixamingata/_colours.scss index dbdd92e5b..74f39c9f6 100644 --- a/web/cobrands/fixamingata/_colours.scss +++ b/web/cobrands/fixamingata/_colours.scss @@ -2,19 +2,24 @@ $menu-image: 'menu-black'; -$primary: #00b1da; -$primary_b: #0087a6; +$primary: #087FA0; +$primary_b: #087FA0; $primary_text: #222; +$primary_link_color: $primary_text; +$primary_link_hover_color: rgba($primary_text, 0.8); $base_bg: #eee url(images/tile.jpg) 0 0 repeat; $base_fg: $primary_text; $nav_background_colour: #eee; $nav_colour: $primary_text; -$nav_hover_background_colour: #20bbdf; +$nav_hover_background_colour: $nav_background_colour; $header-top-border: false; $col_click_map: #00BD08; $high-dpi-screen: '-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi'; + +$link-color: #0000CC; +$link-hover-color: #0000CC; diff --git a/web/cobrands/fixamingata/base.scss b/web/cobrands/fixamingata/base.scss index a708483bc..eeba74951 100644 --- a/web/cobrands/fixamingata/base.scss +++ b/web/cobrands/fixamingata/base.scss @@ -37,3 +37,26 @@ margin: 1em 0 0.5em; } } + +#pc-hint { + color: #444; +} + +/* This together with resp-iframe below gives us a responsive + iframe for the video on the councils page that keeps the + correct width/height ratio when the page is resized. +*/ +.resp-iframe-container { + position: relative; + overflow: hidden; + padding-top: 56.25%; +} + +.resp-iframe { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + border: 0; +} diff --git a/web/cobrands/fixamingata/layout.scss b/web/cobrands/fixamingata/layout.scss index 6cf0dd47e..a0d5622fb 100644 --- a/web/cobrands/fixamingata/layout.scss +++ b/web/cobrands/fixamingata/layout.scss @@ -122,26 +122,23 @@ body.mappage { .content footer .tablewrapper { background: #fff; } -#front-main { - a#geolocate_link { +a#geolocate_link { + background: url(images/locate-me.png) $left 0 no-repeat; + height: 34px; + padding-#{$left}: 24px; + margin-top: 0.25em; + @media ($high-dpi-screen) { + background-image: url(images/locate-me@2.png); + background-size: 22px 34px; + } + &:hover { + text-decoration:underline; background: url(images/locate-me.png) $left 0 no-repeat; - height: 34px; - padding-#{$left}: 24px; - margin-top: 0.25em; - font-size: 1em; + @media ($high-dpi-screen) { background-image: url(images/locate-me@2.png); background-size: 22px 34px; } - &:hover { - text-decoration:underline; - background: url(images/locate-me.png) $left 0 no-repeat; - - @media ($high-dpi-screen) { - background-image: url(images/locate-me@2.png); - background-size: 22px 34px; - } - } } } @@ -149,4 +146,36 @@ body.mappage { a { border-radius: 5px; } + span { + color: $primary_text; + font-weight: bold; + } + span.report-a-problem-btn { + display: none; + } + a.report-a-problem-btn { + display: none; + } +} + +.mappage { + .nav-menu--main { + span.report-a-problem-btn { + display: block; + } + a.report-a-problem-btn { + display: block; + border-width: 1px; + border-color: $primary_text; + border-style: solid; + } + } +} + +body.twothirdswidthpage { + .content { + aside { + background:#fff; + } + } } diff --git a/web/cobrands/fixmystreet-uk-councils/alloy.js b/web/cobrands/fixmystreet-uk-councils/alloy.js index ace0062de..a06c197fe 100644 --- a/web/cobrands/fixmystreet-uk-councils/alloy.js +++ b/web/cobrands/fixmystreet-uk-councils/alloy.js @@ -3,6 +3,8 @@ OpenLayers.Protocol.Alloy = OpenLayers.Class(OpenLayers.Protocol.HTTP, { currentRequests: [], + tileSize: 512, + resolution: 2.388657133579254, abort: function() { if (this.currentRequests.length) { for (var j = 0; j < this.currentRequests.length; j++) { @@ -55,16 +57,13 @@ OpenLayers.Protocol.Alloy = OpenLayers.Class(OpenLayers.Protocol.HTTP, { getTileCoord: function(bounds, maxExtent, map, reverse) { var origin = new OpenLayers.LonLat(maxExtent.left, maxExtent.top); - // hard code this number as we want to avoid fetching asset groups - // which happens at more zoomed out levels - var resolution = 2.388657133579254; var adjustX = reverse ? 0.5 : 0; var adjustY = reverse ? 0 : 0.5; - var xFromOrigin = Math.floor((bounds[0] - origin.lon) / resolution + adjustX); - var yFromOrigin = Math.floor((bounds[1] - origin.lat) / resolution + adjustY); - var tileCoordX = Math.floor(xFromOrigin / 512); - var tileCoordY = Math.floor(yFromOrigin / 512) * -1; + var xFromOrigin = Math.floor((bounds[0] - origin.lon) / this.resolution + adjustX); + var yFromOrigin = Math.floor((bounds[1] - origin.lat) / this.resolution + adjustY); + var tileCoordX = Math.floor(xFromOrigin / this.tileSize); + var tileCoordY = Math.floor(yFromOrigin / this.tileSize) * -1; if (reverse) { tileCoordX -= 1; @@ -88,13 +87,18 @@ OpenLayers.Strategy.Alloy = OpenLayers.Class(OpenLayers.Strategy.FixMyStreet, { this.failCount = 0; this.layer.destroyFeatures(); }, + // allow sub classes to override the remote projection for converting the geometry + // of the features + getRemoteProjection: function() { + return this.layer.projection; + }, merge: function(resp) { this.count++; // This if/else clause lifted from OpenLayers.Strategy.BBOX if (resp.success()) { var features = resp.features; if(features && features.length > 0) { - var remote = this.layer.projection; + var remote = this.getRemoteProjection(); var local = this.layer.map.getProjectionObject(); if(!local.equals(remote)) { var geom; @@ -133,4 +137,88 @@ fixmystreet.alloy_defaults = { strategy_class: OpenLayers.Strategy.Alloy }; +/* for Alloy V2 */ +OpenLayers.Format.AlloyV2 = OpenLayers.Class(OpenLayers.Format.GeoJSON, { + read: function(json, type, filter) { + var results = null; + var obj = null; + if (typeof json == "string") { + obj = OpenLayers.Format.JSON.prototype.read.apply(this, [json, filter]); + } else { + obj = json; + } + + if(!obj) { + OpenLayers.Console.error("Bad JSON: " + json); + } else { + results = []; + for(var i=0, len=obj.results.length; i<len; ++i) { + try { + results.push(this.parseFeature(obj.results[i])); + } catch(err) { + results = null; + OpenLayers.Console.error(err); + } + } + } + return results; + } +}); + +OpenLayers.Protocol.AlloyV2 = OpenLayers.Class(OpenLayers.Protocol.Alloy, { + tileSize: 128, + resolution: 4.777314267158508, + getURL: function(coords, options) { + return OpenLayers.String.format(options.base, {'layerid': options.layerid, 'styleid': options.styleid, 'z': 16, 'x': coords[0], 'y': coords[1]}); + } +}); + +OpenLayers.Strategy.AlloyV2 = OpenLayers.Class(OpenLayers.Strategy.Alloy, { + initialize: function(name, options) { + this.remote = new OpenLayers.Projection("EPSG:4326"); + OpenLayers.Strategy.Alloy.prototype.initialize.apply(this, arguments); + }, + // the layer uses EPSG:3857 for generating the tile location but the features + // use EPSG:4326 + getRemoteProjection: function() { + return this.remote; + } +}); + +fixmystreet.alloyv2_defaults = { + format_class: OpenLayers.Format.AlloyV2, + srsName: "EPSG:3857", + strategy_class: OpenLayers.Strategy.AlloyV2 +}; + +fixmystreet.alloy_add_layers = function(defaults, layers) { + $.each(layers, function(index, layer) { + if ( layer.categories ) { + var options = { + http_options: { + layerid: layer.layerid || layer.layer + }, + asset_type: layer.asset_type || "spot", + asset_category: layer.categories, + asset_item: layer.item_name || layer.layer_name.toLowerCase() + }; + // Alloy v2 + if (layer.styleid) { + options.http_options.styleid = layer.styleid; + } + // Alloy v1 + if (layer.version) { + options.http_options.layerVersion = layer.version; + } + if (layer.max_resolution) { + options.max_resolution = layer.max_resolution; + } + if (layer.snap_threshold || layer.snap_threshold === 0) { + options.snap_threshold = layer.snap_threshold; + } + fixmystreet.assets.add(defaults, options); + } + }); +}; + })(); diff --git a/web/cobrands/fixmystreet-uk-councils/council_validation_rules.js b/web/cobrands/fixmystreet-uk-councils/council_validation_rules.js index 171f200ff..98a3a68a5 100644 --- a/web/cobrands/fixmystreet-uk-councils/council_validation_rules.js +++ b/web/cobrands/fixmystreet-uk-councils/council_validation_rules.js @@ -23,6 +23,8 @@ body_validation_rules = { 'Buckinghamshire Council': confirm_validation_rules, 'Cheshire East Council': confirm_validation_rules, 'Hounslow Borough Council': confirm_validation_rules, + 'Isle of Wight Council': confirm_validation_rules, + 'Island Roads': confirm_validation_rules, 'Lincolnshire County Council': confirm_validation_rules, 'Northamptonshire County Council': { title: { diff --git a/web/cobrands/fixmystreet-uk-councils/roadworks.js b/web/cobrands/fixmystreet-uk-councils/roadworks.js new file mode 100644 index 000000000..a3eec7b1f --- /dev/null +++ b/web/cobrands/fixmystreet-uk-councils/roadworks.js @@ -0,0 +1,82 @@ +/* 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 roadworks_defaults = { + http_options: { + url: "https://tilma.mysociety.org/streetmanager.php" + }, + srsName: "EPSG:27700", + format_class: OpenLayers.Format.GeoJSON, + strategy_class: OpenLayers.Strategy.FixMyStreet, + stylemap: fixmystreet.assets.stylemap_invisible, + 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.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_date).toDateString(), + end = new Date(attr.end_date).toDateString(), + summary = attr.summary, + desc = attr.description; + + 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>"); + $dl.append($("<dd></dd>").text(summary)); + if (desc) { + $dl.append("<dt>Description" + colon + "</dt>"); + $dl.append($("<dd></dd>").text(desc)); + } + if (attr.promoter) { + $dl.append("<dt>Responsibility</dt>"); + $dl.append($("<dd></dd>").text(attr.promoter)); + } + + if (config.text_after) { + $dl.append(config.text_after); + } + + $msg.prependTo('#js-post-category-messages'); +}; + +fixmystreet.assets.add(roadworks_defaults); + +})(); diff --git a/web/cobrands/fixmystreet.com/_colours.scss b/web/cobrands/fixmystreet.com/_colours.scss index d28cf11e2..b0de8eacb 100644 --- a/web/cobrands/fixmystreet.com/_colours.scss +++ b/web/cobrands/fixmystreet.com/_colours.scss @@ -3,6 +3,8 @@ $primary: #FFD000; $primary_b: #F3B11E; // For the box around the front page postcode form only $primary_text: #222; +$primary_link_color: $primary_text; +$primary_link_hover_color: rgba($primary_text, 0.8); // Tiled main body background $base_bg: #272727 url(images/tile.jpg) 0 0 repeat; diff --git a/web/cobrands/fixmystreet.com/base.scss b/web/cobrands/fixmystreet.com/base.scss index f261e677d..475d4dc4e 100644 --- a/web/cobrands/fixmystreet.com/base.scss +++ b/web/cobrands/fixmystreet.com/base.scss @@ -176,7 +176,6 @@ svg|g.site-logo__svg { border-bottom: none; } - $mysoc-footer-background-color: #222; $mysoc-footer-text-color: #acacac; $mysoc-footer-site-name-text-color: #fff; diff --git a/web/cobrands/fixmystreet.com/layout.scss b/web/cobrands/fixmystreet.com/layout.scss index f6d7c9096..852b0857f 100644 --- a/web/cobrands/fixmystreet.com/layout.scss +++ b/web/cobrands/fixmystreet.com/layout.scss @@ -152,23 +152,30 @@ body.fullwidthpage { } } } - a#geolocate_link { - font-family: $body-font; - background: url(images/locate-me.png) $left 0 no-repeat; - height: 34px; - padding-#{$left}: 24px; - margin-top: 0.25em; - @media ($high-dpi-screen) { - background-image: url(images/locate-me@2.png); - background-size: 22px 34px; - } - } - a#geolocate_link.loading { - background: url("/cobrands/fixmystreet/images/spinner-yellow.gif") 100% 33% no-repeat - } } } +a#geolocate_link { + font-family: $body-font; + background: url(images/locate-me.png) $left 0 no-repeat; + height: 34px; + padding-#{$left}: 24px; + margin-top: 0.25em; + + @media ($high-dpi-screen) { + background-image: url(images/locate-me@2.png); + background-size: 22px 34px; + } + + &.loading { + background: url("/cobrands/fixmystreet/images/spinner-yellow.gif") 100% 33% no-repeat + } +} + +.search-help__header { + font-family: inherit; +} + body.frontpage { #site-logo { margin: 2em 0; diff --git a/web/cobrands/fixmystreet/assets.js b/web/cobrands/fixmystreet/assets.js index 204ceb85d..00dec0542 100644 --- a/web/cobrands/fixmystreet/assets.js +++ b/web/cobrands/fixmystreet/assets.js @@ -24,12 +24,13 @@ OpenLayers.Layer.VectorAsset = OpenLayers.Class(OpenLayers.Layer.Vector, { $(fixmystreet).on('assets:unselected', this.checkSelected.bind(this)); $(fixmystreet).on('report_new:category_change', this.changeCategory.bind(this)); $(fixmystreet).on('report_new:category_change', this.update_layer_visibility.bind(this)); + $(fixmystreet).on('inspect_form:asset_change', this.update_layer_visibility.bind(this)); }, - relevant: function() { - var category = $('select#form_category').val(), - group = $('select#category_group').val(), - layer = this.fixmystreet, + relevant: function(category, group) { + category = category || $('#inspect_form_category').val() || $('#form_category').val(); + group = group || $('#inspect_category_group').val() || $('#category_group').val(); + var layer = this.fixmystreet, relevant; if (layer.relevant) { relevant = layer.relevant({category: category, group: group}); @@ -106,7 +107,13 @@ OpenLayers.Layer.VectorAsset = OpenLayers.Class(OpenLayers.Layer.Vector, { if (!this.inRange && this.resolutions) { var firstVisibleResolution = this.resolutions[0]; var zoomLevel = fixmystreet.map.getZoomForResolution(firstVisibleResolution); - fixmystreet.map.zoomTo(zoomLevel); + if (window.selected_problem_id) { + var feature = fixmystreet.maps.get_marker_by_id(window.selected_problem_id); + var center = feature.geometry.getBounds().getCenterLonLat(); + fixmystreet.map.setCenter(center, zoomLevel); + } else { + fixmystreet.map.zoomTo(zoomLevel); + } } }, @@ -119,6 +126,9 @@ OpenLayers.Layer.VectorAsset = OpenLayers.Class(OpenLayers.Layer.Vector, { if (!fixmystreet.map) { return; } + if (!this.getVisibility()) { + return; + } var feature = fixmystreet.assets.selectedFeature(); if (feature) { this.setAttributeFields(feature); @@ -130,13 +140,19 @@ OpenLayers.Layer.VectorAsset = OpenLayers.Class(OpenLayers.Layer.Vector, { return; } // Set the extra fields to the value of the selected feature + var $mobile_display = $('#change_asset_mobile').text(''); $.each(this.fixmystreet.attributes, function(field_name, attribute_name) { var $field = $("#form_" + field_name); + var $inspect_fields = $('[id^=category_][id$=form_' + field_name + ']'); + var value; if (typeof attribute_name === 'function') { - $field.val(attribute_name.apply(feature)); + value = attribute_name.apply(feature); } else { - $field.val(feature.attributes[attribute_name]); + value = feature.attributes[attribute_name]; } + $field.val(value); + $inspect_fields.val(value); + $mobile_display.append(field_name + ': ' + value + '<br>'); }); }, @@ -179,6 +195,18 @@ OpenLayers.Layer.VectorAsset = OpenLayers.Class(OpenLayers.Layer.Vector, { return (f1.attributes[asset_id_field] == f2.attributes[asset_id_field]); }, + construct_selected_asset_message: function(asset) { + var id = asset.attributes[this.fixmystreet.feature_code] || ''; + if (id === '') { + return; + } + var data = { id: id, name: this.fixmystreet.asset_item }; + if (this.fixmystreet.construct_asset_name) { + data = this.fixmystreet.construct_asset_name(id) || data; + } + return 'You have selected ' + data.name + ' <b>' + data.id + '</b>'; + }, + find_matching_feature: function(feature, layer) { if (!layer) { return false; @@ -308,7 +336,6 @@ var fault_popup = null; */ function init_asset_layer(layer, pins_layer) { layer.update_layer_visibility(); - fixmystreet.map.addLayer(layer); if (layer.fixmystreet.asset_category || layer.fixmystreet.asset_group) { fixmystreet.map.events.register( 'zoomend', layer, check_zoom_message_visibility); } @@ -372,6 +399,7 @@ function asset_selected(e) { // Keep track of selection in case layer is reloaded or hidden etc. selected_feature = feature.clone(); + selected_feature.layer = feature.layer; // Hide the normal markers layer to keep things simple, but // move the green marker to the point of the click to stop @@ -392,6 +420,11 @@ function asset_selected(e) { } function asset_unselected(e) { + if (selected_feature.layer !== this) { + // The selected feature has already changed to something in a different + // layer, so we don't want to mess that up by clearing it + return; + } fixmystreet.markers.setVisibility(true); selected_feature = null; this.clearAttributeFields(); @@ -402,14 +435,15 @@ function check_zoom_message_visibility() { if (this.fixmystreet.non_interactive && !this.fixmystreet.display_zoom_message) { return; } - var select = this.fixmystreet.asset_group ? 'category_group' : 'form_category'; - var category = $("select#" + select).val() || '', - prefix = category.replace(/[^a-z]/gi, ''), - id = "category_meta_message_" + prefix, - $p = $('#' + id); if (this.relevant()) { + var select = this.fixmystreet.asset_group ? 'category_group' : 'form_category', + category = $("select#" + select).val() || '', + prefix = category.replace(/[^a-z]/gi, ''), + id = "category_meta_message_" + prefix, + $p = $('.category_meta_message'), + message; if ($p.length === 0) { - $p = $("<p>").prop("id", id).prop('class', 'category_meta_message'); + $p = $("<p>").prop('class', 'category_meta_message'); if ($('html').hasClass('mobile')) { $p.click(function() { $("#mob_ok").trigger('click'); @@ -417,32 +451,56 @@ function check_zoom_message_visibility() { } $p.prependTo('#js-post-category-messages'); } + $p.prop('id', id); if (this.getVisibility() && this.inRange) { - if (typeof this.fixmystreet.asset_item_message !== 'undefined') { - $p.html(this.fixmystreet.asset_item_message); - } else { - $p.html('You can pick a <b class="asset-' + this.fixmystreet.asset_type + '">' + this.fixmystreet.asset_item + '</b> from the map »'); - } + message = get_asset_pick_message.call(this); } else { - $p.html('Zoom in to pick a ' + this.fixmystreet.asset_item + ' from the map'); + message = 'Zoom in to pick a ' + this.fixmystreet.asset_item + ' from the map'; } + $p.html(message); + } else { + update_message_display.call(this, null); + } +} - } else if (this.fixmystreet.asset_group) { - prefix = this.fixmystreet.asset_group.replace(/[^a-z]/gi, ''); - id = "category_meta_message_" + prefix; - $p = $('#' + id); - $p.remove(); +function get_asset_pick_message() { + var message; + if (typeof this.fixmystreet.asset_item_message !== 'undefined') { + message = this.fixmystreet.asset_item_message; + message = message.replace('ITEM', this.fixmystreet.asset_item); + } else { + message = 'You can pick a <b class="asset-' + this.fixmystreet.asset_type + '">' + this.fixmystreet.asset_item + '</b> from the map »'; + } + return message; +} + +/* This doesn't just use the class because e.g. an unselect event + * can fire after a category change event, and that would then + * update the new message using the text of the unselected layer. */ +function update_message_display(message) { + if (this.fixmystreet.asset_group) { + _update_message(message, this.fixmystreet.asset_group); } else { $.each(this.fixmystreet.asset_category, function(i, c) { - var prefix = c.replace(/[^a-z]/gi, ''), - id = "category_meta_message_" + prefix, - $p = $('#' + id); - $p.remove(); + _update_message(message, c); }); } } +function _update_message(message, c) { + var prefix = c.replace(/[^a-z]/gi, ''), + id = "category_meta_message_" + prefix, + $p = $('#' + id); + if (message) { + $p.html(message); + } else { + $p.remove(); + } +} + +var lastVisible = 0; + function layer_visibilitychanged() { if (this.fixmystreet.road) { if (!this.getVisibility()) { @@ -453,7 +511,7 @@ function layer_visibilitychanged() { } return; } else if (!this.getVisibility()) { - asset_unselected.call(this); + this.get_select_control().unselectAll(); this.asset_not_found(); // as trigger won't call on non-visible layers } @@ -477,12 +535,13 @@ function layer_visibilitychanged() { visible++; } } - if (visible === 2 || visible === 0) { - // We're either switching WFS layers (so going 1->2->1 or 1->0->1) - // or switching off WFS layer (so going 1->0). Either way, we want - // to show the marker again. + if (visible === 0 || visible > lastVisible) { + // We're either switching WFS layers (so going 1->2->1 or 1->0->1 or + // even 1->2->3->2) or switching off WFS layer (so going 1->0). + // Whichever way, we want to show the marker again. fixmystreet.markers.setVisibility(true); } + lastVisible = visible; if (!this.fixmystreet.non_interactive) { this.select_nearest_asset(); } @@ -514,15 +573,7 @@ function get_asset_stylemap() { return new OpenLayers.StyleMap({ 'default': fixmystreet.assets.style_default, 'select': fixmystreet.assets.style_default_select, - 'hover': new OpenLayers.Style({ - fillColor: "#55BB00", - fillOpacity: 0.8, - strokeColor: "#000000", - strokeOpacity: 1, - strokeWidth: 2, - pointRadius: 8, - cursor: 'pointer' - }) + 'hover': fixmystreet.assets.style_default_hover }); } @@ -789,6 +840,16 @@ fixmystreet.assets = { pointRadius: 6 }), + style_default_hover: new OpenLayers.Style({ + fillColor: "#55BB00", + fillOpacity: 0.8, + strokeColor: "#000000", + strokeOpacity: 1, + strokeWidth: 2, + pointRadius: 8, + cursor: 'pointer' + }), + style_default_select: new OpenLayers.Style({ externalGraphic: pin_prefix + "pin-spot.png", fillColor: "#55BB00", @@ -805,6 +866,30 @@ fixmystreet.assets = { graphicOpacity: 1.0 }), + construct_named_select_style: function(label) { + var f = $.extend({ + label: label, + labelOutlineColor: "white", + labelOutlineWidth: 3, + labelYOffset: 65, + fontSize: '15px', + fontWeight: 'bold' + }, fixmystreet.assets.style_default_select.defaultStyle); + return new OpenLayers.Style(f); + }, + named_select_action_found: function(asset) { + var fn = this.fixmystreet.construct_selected_asset_message || this.construct_selected_asset_message; + var message = fn.call(this, asset); + if (!message) { + message = get_asset_pick_message.call(this); + } + update_message_display.call(this, message); + }, + named_select_action_not_found: function() { + var message = get_asset_pick_message.call(this); + update_message_display.call(this, message); + }, + selectedFeature: function() { return selected_feature; }, @@ -815,6 +900,14 @@ fixmystreet.assets = { } options = $.extend(true, {}, default_options, options); + + var cls = construct_layer_class(options); + var staff_report_page = ((fixmystreet.page == 'report' || fixmystreet.page == 'reports') && fixmystreet.staff_set_up); + if (staff_report_page && cls === OpenLayers.Layer.VectorNearest) { + // Only care about asset layers on report page when staff + return; + } + var asset_layer = this.add_layer(options); this.add_controls([asset_layer], options); return asset_layer; @@ -860,8 +953,10 @@ fixmystreet.assets = { }, init: function() { - if (fixmystreet.page != 'new' && fixmystreet.page != 'around') { + var staff_report_page = ((fixmystreet.page == 'report' || fixmystreet.page == 'reports') && fixmystreet.staff_set_up); + if (fixmystreet.page != 'new' && fixmystreet.page != 'around' && !staff_report_page) { // We only want to show asset markers when making a new report + // or if an inspector is editing a report return; } @@ -884,13 +979,19 @@ fixmystreet.assets = { return hide_assets; })(fixmystreet.maps.display_around); - var pins_layer = fixmystreet.map.getLayersByName("Pins")[0]; + var asset_layer; for (var i = 0; i < fixmystreet.assets.layers.length; i++) { - var asset_layer = fixmystreet.assets.layers[i]; + asset_layer = fixmystreet.assets.layers[i]; var controls = asset_layer.controls || []; for (var j = 0; j < controls.length; j++) { fixmystreet.map.addControl(controls[j]); } + fixmystreet.map.addLayer(asset_layer); + } + + var pins_layer = fixmystreet.map.getLayersByName("Pins")[0]; + for (i = 0; i < fixmystreet.assets.layers.length; i++) { + asset_layer = fixmystreet.assets.layers[i]; init_asset_layer(asset_layer, pins_layer); } } diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js index cd98b233b..15856f4ce 100644 --- a/web/cobrands/fixmystreet/fixmystreet.js +++ b/web/cobrands/fixmystreet/fixmystreet.js @@ -316,7 +316,11 @@ $.extend(fixmystreet.set_up, { errorElement: 'div', errorClass: 'form-error', errorPlacement: function( error, element ) { - element.before( error ); + if (element.parent().hasClass('segmented-control')) { + element.parent().before( error ); + } else { + element.before( error ); + } }, submitHandler: function(form) { if (form.submit_problem) { @@ -470,7 +474,7 @@ $.extend(fixmystreet.set_up, { $.each(data.disable_form.questions, function(_, question) { if (question.message && question.code) { $('#form_' + question.code).on('change.category', function() { - $(fixmystreet).trigger('report_new:category_change'); + $(fixmystreet).trigger('report_new:category_change', { skip_duplicates: true } ); }); } }); @@ -655,11 +659,23 @@ $.extend(fixmystreet.set_up, { } else { fixmystreet.resize_to.desktop_page(); } + $('#form_service').val(type); last_type = type; }).resize(); }, dropzone: function($context) { + if ('Dropzone' in window) { + Dropzone.autoDiscover = false; + } else { + return; + } + + // we don't want to create this if we're offline (e.g using the inspector + // panel to add a photo) as the server side bit does not work. + if (!navigator.onLine) { + return; + } // Pass a jQuery element, eg $('.foobar'), into this function // to limit all the selectors to that element. Handy if you want @@ -670,12 +686,6 @@ $.extend(fixmystreet.set_up, { $context = $(document); } - if ('Dropzone' in window) { - Dropzone.autoDiscover = false; - } else { - return; - } - var forms = $('[for="form_photo"], .js-photo-label', $context).closest('form'); forms.each(function() { // Internal $context is the individual form with the photo upload inside @@ -705,7 +715,7 @@ $.extend(fixmystreet.set_up, { resizeWidth: 2048, resizeHeight: 2048, resizeQuality: 0.6, - acceptedFiles: 'image/jpeg,image/pjpeg,image/gif,image/tiff,image/png', + acceptedFiles: 'image/jpeg,image/pjpeg,image/gif,image/tiff,image/png,.png,.tiff,.tif,.gif,.jpeg,.jpg', dictDefaultMessage: default_message, dictCancelUploadConfirmation: translation_strings.upload_cancel_confirmation, dictInvalidFileType: translation_strings.upload_invalid_file_type, @@ -887,10 +897,16 @@ $.extend(fixmystreet.set_up, { .prependTo('#sub_map_links'); } - $('#toggle-fullscreen').off('click').on('click', function() { + $('#toggle-fullscreen').off('click').on('click', function(e) { + e.preventDefault(); var btnClass = $('html').hasClass('map-fullscreen') ? 'expand' : 'compress'; var text = $(this).data(btnClass + '-text'); + // Inspector form asset changing + if ($('html').hasClass('map-fullscreen') && $('.btn--change-asset').hasClass('asset-spot')) { + $('.btn--change-asset').click(); + } + $('html').toggleClass('map-fullscreen only-map'); $(this).html(text).attr('class', btnClass); @@ -1083,16 +1099,16 @@ $.extend(fixmystreet.set_up, { }); }, - reporting_hide_phone_email: function() { - $('#form_username_register').on('keyup change', function() { - var username = $(this).val(); - if (/^[^a-z]+$/i.test(username)) { - $('#js-hide-if-username-phone').hide(); - $('#js-hide-if-username-email').show(); - } else { - $('#js-hide-if-username-phone').show(); - $('#js-hide-if-username-email').hide(); - } + reporting_required_phone_email: function() { + var fem = $('#form_email'); + var fph = $('#form_phone'); + $('#update_method_email').on('change', function() { + fem.prop('required', true); + fph.prop('required', false); + }); + $('#update_method_phone').on('change', function() { + fem.prop('required', false); + fph.prop('required', true); }); }, @@ -1117,7 +1133,7 @@ $.extend(fixmystreet.set_up, { e.preventDefault(); var form = $('<form/>').attr({ method:'post', action:"/alert/subscribe" }); form.append($('<input name="alert" value="Subscribe me to an email alert" type="hidden" />')); - $(this).closest('.js-alert-list').find('input[type=email], input[type=text], input[type=hidden], input[type=radio]:checked').each(function() { + $(this).closest('.js-alert-list').find('textarea, input[type=email], input[type=text], input[type=hidden], input[type=radio]:checked').each(function() { var $v = $(this); $('<input/>').attr({ name:$v.attr('name'), value:$v.val(), type:'hidden' }).appendTo(form); }); @@ -1310,6 +1326,20 @@ fixmystreet.update_pin = function(lonlat, savePushState) { } }; +(function() { // fetch_reporting_data closure + +function re_select(group, category) { + var cat_in_group = $("#form_category optgroup[label=\"" + group + "\"] option[value=\"" + category + "\"]"); + if (cat_in_group.length) { + cat_in_group.prop({selected:true}); + return true; + } else if ($("#form_category option[value=\"" + category + "\"]").length) { + $("#form_category").val(category); + return true; + } + return false; +} + fixmystreet.fetch_reporting_data = function() { $.getJSON('/report/new/ajax', { latitude: $('#fixmystreet\\.latitude').val(), @@ -1364,16 +1394,12 @@ fixmystreet.fetch_reporting_data = function() { } $('#form_category_row').html(data.category); - var cat_in_group = $("#form_category optgroup[label=\"" + old_category_group + "\"] option[value=\"" + old_category + "\"]"); - if (cat_in_group.length) { - cat_in_group.prop({selected:true}); - } else if ($("#form_category option[value=\"" + old_category + "\"]").length) { - $("#form_category").val(old_category); - } else if (filter_category !== undefined && $("#form_category option[value='" + filter_category + "']").length) { + var reselected = re_select(old_category_group, old_category); + if (!reselected && filter_category !== undefined) { // If the category filter appears on the map and the user has selected // something from it, then pre-fill the category field in the report, // if it's a value already present in the drop-down. - $("#form_category").val(filter_category); + re_select(old_category_group, filter_category); } fixmystreet.set_up.category_groups(old_category_group); @@ -1408,6 +1434,8 @@ fixmystreet.fetch_reporting_data = function() { }); }; +})(); // fetch_reporting_data closure + fixmystreet.display = { begin_report: function(lonlat, saveHistoryState) { lonlat = fixmystreet.maps.begin_report(lonlat); @@ -1531,6 +1559,9 @@ fixmystreet.display = { $twoColReport = $reportPage.find('.two_column_sidebar'), $sideReport = $reportPage.find('#side-report'); + // Set this from report page in case change asset used and therefore relevant() function + fixmystreet.bodies = fixmystreet.utils.csv_to_array($reportPage.find('#js-map-data').data('bodies'))[0]; + if ($sideReport.length) { $('#side').hide(); // Hide the list of reports $('#side-form').hide(); // And the form diff --git a/web/cobrands/fixmystreet/offline.js b/web/cobrands/fixmystreet/offline.js index 908326a69..c6609fe1a 100644 --- a/web/cobrands/fixmystreet/offline.js +++ b/web/cobrands/fixmystreet/offline.js @@ -28,6 +28,23 @@ fixmystreet.offlineBanner = (function() { $('.top_banner--offline').slideUp(); } + // Compare two typed arrays for equality + function isEqual(view1, view2) { + for (var i=0; i != view1.byteLength; i++) { + if (view1[i] != view2[i]) return false; + } + return true; + } + + // Create a Uint8Array of a string + function makeView(str) { + var view = new Uint8Array(str.length); + for (var i=0; i<str.length; i++) { + view[i] = str.charCodeAt(i); + } + return view; + } + return { make: function(offline) { fixmystreet.offlineData.getFormsLength().then(function(num) { @@ -61,7 +78,13 @@ fixmystreet.offlineBanner = (function() { } function postForm(url, data) { - return $.ajax({ url: url, data: data, type: 'POST' }).done(nextForm); + return $.ajax({ + url: url, + contentType: data.contentType, + data: data.text, + type: 'POST', + processData: false + }).done(nextForm); } $(document).on('click', '#oFN', function(e) { @@ -83,8 +106,23 @@ fixmystreet.offlineBanner = (function() { if (!token) { return nextForm(); } - var param = form[1].replace(/&token=[^&]*/, '&token=' + token); - return postForm(form[0], param).fail(nextForm); + + var tokenView = makeView(token); + var tokenName = makeView('name="token"\r\n\r\n'); + + // Make a typed array to update the request body with + // This only works because tokens are always the same length + var curView = new Uint8Array(form[1].text); + + // Find the spot at which the token is in the buffer + var idxS = curView.findIndex(function isToken(element, i, array) { + var sl = array.slice(i, i+tokenName.byteLength); + return isEqual(sl, tokenName); + }); + // Replace the old token with the new one in the right spot + curView.set(tokenView, idxS + tokenName.byteLength); + + return postForm(form[0], form[1]).fail(nextForm); }); }); }); @@ -302,6 +340,14 @@ fixmystreet.offline = (function() { $('.moderate-display.segmented-control, .shadow-wrap, #update_form, #report-cta, .mysoc-footer, .nav-wrapper').hide(); $('.js-back-to-report-list').attr('href', '/my/planned'); + // On iOS we want to hide the photo fields on the offline inspector + // form because including a photo entirely breaks the form submission. + if (/iPad|iPhone|iPod/.test(navigator.platform) || + (/Mac/.test(navigator.userAgent) && 'ontouchend' in document)) // iPadOS 13 pretends to be a desktop Mac + { + $("#form_photos, label[for=form_photo]").hide(); + } + // Refill form with saved data if there is any fixmystreet.offlineData.getForms().then(function(forms) { var savedForm; diff --git a/web/cobrands/fixmystreet/staff.js b/web/cobrands/fixmystreet/staff.js index a504f641e..ec85dbb8d 100644 --- a/web/cobrands/fixmystreet/staff.js +++ b/web/cobrands/fixmystreet/staff.js @@ -1,4 +1,16 @@ fixmystreet.staff_set_up = { + action_scheduled_raise_defect: function() { + $("#report_inspect_form").find('[name=state]').on('change', function() { + if ($(this).val() !== "action scheduled") { + $("#js-inspect-action-scheduled").addClass("hidden"); + $('#raise_defect_yes').prop('required', false); + } else { + $("#js-inspect-action-scheduled").removeClass("hidden"); + $('#raise_defect_yes').prop('required', true); + } + }); + }, + list_item_actions: function() { $('#js-reports-list').on('click', ':submit', function(e) { e.preventDefault(); @@ -137,6 +149,10 @@ fixmystreet.staff_set_up = { document.getElementById('side-inspect').scrollIntoView(); } + // make sure dropzone is set up, otherwise loading problem with + // JS leaves this uninitialized. + fixmystreet.set_up.dropzone($inspect_form); + function updateTemplates(opts) { opts.category = opts.category || $inspect_form.find('[name=category]').val(); opts.state = opts.state || $inspect_form.find('[name=state]').val(); @@ -185,6 +201,7 @@ fixmystreet.staff_set_up = { populateSelect($priorities, priorities_data, 'priorities_type_format'); updateTemplates({'category': category}); $priorities.val(curr_pri); + update_change_asset_button(); }); function state_change(state) { @@ -212,9 +229,9 @@ fixmystreet.staff_set_up = { var $checkbox = $(this); var toggle_public_update = function() { if ($checkbox.prop('checked')) { - $('#public_update').parents('p').show(); + $('#public_update_form_fields').show(); } else { - $('#public_update').parents('p').hide(); + $('#public_update_form_fields').hide(); } }; $checkbox.on('change', function() { @@ -242,21 +259,60 @@ fixmystreet.staff_set_up = { // triage pages may not show geolocation button if (el) { fixmystreet.geolocate(el, function(pos) { - var latlon = new OpenLayers.LonLat(pos.coords.longitude, pos.coords.latitude); - var bng = latlon.clone().transform( - new OpenLayers.Projection("EPSG:4326"), - new OpenLayers.Projection("EPSG:27700") // TODO: Handle other projections - ); - $("#problem_northing").text(bng.lat.toFixed(1)); - $("#problem_easting").text(bng.lon.toFixed(1)); - $("#problem_latitude").text(latlon.lat.toFixed(6)); - $("#problem_longitude").text(latlon.lon.toFixed(6)); - $inspect_form.find("input[name=latitude]").val(latlon.lat); - $inspect_form.find("input[name=longitude]").val(latlon.lon); + var lonlat = new OpenLayers.LonLat(pos.coords.longitude, pos.coords.latitude); + fixmystreet.maps.update_pin_input_fields(lonlat); }); } } + function get_value_and_group(slr) { + var elt = $(slr)[0]; + var group = $(elt.options[elt.selectedIndex]).closest('optgroup').prop('label'); + return { 'value': $(elt).val(), 'group': group || '' }; + } + + function update_change_asset_button() { + var category = get_value_and_group('#category'); // The inspect form category dropdown only + var found = false; + if (fixmystreet.assets) { + for (var i = 0; i < fixmystreet.assets.layers.length; i++) { + var layer = fixmystreet.assets.layers[i]; + if ((layer.fixmystreet.asset_category || layer.fixmystreet.asset_group) && layer.relevant(category.value, category.group)) { + found = true; + break; + } + } + } + if (found) { + $('.btn--change-asset').show(); + } else { + $('.btn--change-asset').hide(); + } + } + if ( $('.btn--change-asset').length ) { + update_change_asset_button(); + } + + $('.btn--change-asset').on('click', function(e) { + e.preventDefault(); + $(this).toggleClass('asset-spot'); + if ($(this).hasClass('asset-spot')) { + var v = get_value_and_group('#category'); + $('#inspect_form_category').val(v.value); + $('#inspect_category_group').val(v.group); + if ($('html').hasClass('mobile')) { + $('#toggle-fullscreen').trigger('click'); + $('html, body').animate({ scrollTop: 0 }, 500); + $('#map_box').append('<div id="change_asset_mobile"/>'); + } + } else { + $('#inspect_form_category').val(''); + $('#inspect_category_group').val(''); + $('#change_asset_mobile').remove(); + } + $(fixmystreet).trigger('inspect_form:asset_change'); + }); + // Make the "Provide an update" form toggleable, hidden by default. // (Inspectors will normally just use the #public_update box instead). $('.js-provide-update').on('click', function(e) { @@ -335,6 +391,21 @@ fixmystreet.staff_set_up = { }); }, + open311_category_edit: function() { + var protect_input = document.getElementById('open311_protect'); + if (!protect_input) { + return; + } + protect_input.addEventListener('change', function() { + var cat = document.getElementById('category'); + cat.readOnly = !this.checked; + cat.required = this.checked; + if (!this.checked) { + cat.value = cat.getAttribute('value'); + } + }); + }, + shortlist_listener: function() { $('#fms_shortlist_all').on('click', function() { var features = []; @@ -364,6 +435,7 @@ $(fixmystreet).on('display:report', function() { fixmystreet.staff_set_up.response_templates(); if ($("#report_inspect_form").length) { fixmystreet.staff_set_up.report_page_inspect(); + fixmystreet.staff_set_up.action_scheduled_raise_defect(); } }); diff --git a/web/cobrands/greenwich/_colours.scss b/web/cobrands/greenwich/_colours.scss index 973767a2d..41c3891e3 100644 --- a/web/cobrands/greenwich/_colours.scss +++ b/web/cobrands/greenwich/_colours.scss @@ -24,3 +24,7 @@ $col_big_numbers: $primary; $col_click_map: $greenwich_red; $container-max-width: 990px; + +$search-help-alignment: left; +$search-help-background: #fff3f3; +$search-help-header-font-size-desktop: 1.25em; diff --git a/web/cobrands/greenwich/base.scss b/web/cobrands/greenwich/base.scss index 0f990c865..bfbb0a62a 100644 --- a/web/cobrands/greenwich/base.scss +++ b/web/cobrands/greenwich/base.scss @@ -28,6 +28,10 @@ background-color: $greenwich_light_grey; } +#front-main #postcodeForm { + margin-top: 1em; +} + label[for=pc] { color: $greenwich_dark_red; } diff --git a/web/cobrands/hackney/_colours.scss b/web/cobrands/hackney/_colours.scss new file mode 100644 index 000000000..464733a40 --- /dev/null +++ b/web/cobrands/hackney/_colours.scss @@ -0,0 +1,51 @@ +/* COLOURS */ + +$menu-image: 'menu-black'; + +// Primary +$white: #fff; +$green: #00b341; +$grey: #666664; + + +// Secondary +$yellow: #ffc845; +$blue: #0072ce; +$pale_green: #f2f7f0; +$alt_green: #328b15; +$light_green: #84bd00; +$dark_green: #00664f; +$teal :#1e98a7; +$black: #000; +$red: #be3a34; + +$primary: $green; +$primary_b: #000; +$primary_text: $black; + +$base_bg: $white; +$base_fg: $black; + +$link-color: $blue; +$link-visited_color: $dark-green; +$link-hover-color: $green; + +$nav_background_colour: $black; +$nav_colour: $white; +$nav_hover_background_colour: $black; + +$col_click_map: $green; + +$header-top-border: false; + +$montserrat: 'Montserrat', Arial, sans-serif; + +$heading-font: $montserrat; +$body-font: $montserrat; +$meta-font: $montserrat; + +$search-help-alignment: left; +$search-help-background: #fff3f3; +$search-help-header-font-size-desktop: 1.25em; +$search-help-margin: 0 -1em; +$search-help-margin-desktop: 0 -1em; diff --git a/web/cobrands/hackney/assets.js b/web/cobrands/hackney/assets.js new file mode 100644 index 000000000..9941594f0 --- /dev/null +++ b/web/cobrands/hackney/assets.js @@ -0,0 +1,246 @@ +(function(){ + +if (!fixmystreet.maps) { + return; +} + +/** These layers are from the Hackney WFS feed, for non-Alloy categories: */ +var wfs_defaults = { + http_options: { + url: "https://map.hackney.gov.uk/geoserver/wfs", + params: { + SERVICE: "WFS", + VERSION: "1.1.0", + REQUEST: "GetFeature", + SRSNAME: "urn:ogc:def:crs:EPSG::27700" + } +}, + asset_type: 'spot', + max_resolution: 2.388657133579254, + asset_id_field: 'id', + attributes: {}, + geometryName: 'geom', + srsName: "EPSG:27700", + strategy_class: OpenLayers.Strategy.FixMyStreet, + body: "Hackney Council", + asset_item: "item" +}; + + +fixmystreet.assets.add(wfs_defaults, { + http_options: { + params: { + TYPENAME: "greenspaces:park_bin", + } + }, + asset_category: "Overflowing bin", + attributes: {} +}); + +fixmystreet.assets.add(wfs_defaults, { + http_options: { + params: { + TYPENAME: "amenity:public_toilet", + } + }, + asset_category: ["Public toilets", "Toilets"], + attributes: {} +}); + +fixmystreet.assets.add(wfs_defaults, { + http_options: { + params: { + TYPENAME: "parking:pay_display_machine_liberator", + } + }, + asset_category: "Pay & Display Machines", + attributes: {} +}); + +fixmystreet.assets.add(wfs_defaults, { + http_options: { + params: { + TYPENAME: "recycling:estate_recycling_bin", + } + }, + asset_category: "Bin Contamination", + attributes: {} +}); + +fixmystreet.assets.add(wfs_defaults, { + http_options: { + params: { + TYPENAME: "amenity:sport_facility", + } + }, + asset_category: "Sport Area", + attributes: {} +}); + +fixmystreet.assets.add(wfs_defaults, { + http_options: { + params: { + TYPENAME: "greenspaces:park_bench", + } + }, + asset_category: "Park Furniture (bench)", + attributes: {} +}); + +fixmystreet.assets.add(wfs_defaults, { + http_options: { + params: { + TYPENAME: "greenspaces:park_bin", + } + }, + asset_category: "Park Furniture (bin)", + attributes: {} +}); + +fixmystreet.assets.add(wfs_defaults, { + http_options: { + params: { + TYPENAME: "greenspaces:park_picnic_bench", + } + }, + asset_category: "Park Furniture (picnic bench)", + attributes: {} +}); + +fixmystreet.assets.add(wfs_defaults, { + http_options: { + params: { + TYPENAME: "transport:bike_hangar_scheme", + } + }, + asset_category: "Cycle Hangars", + attributes: {} +}); + +fixmystreet.assets.add(wfs_defaults, { + http_options: { + params: { + TYPENAME: "greenspaces:park_bench", + } + }, + asset_category: "Benches", + attributes: {} +}); + + +/** These layers are served directly from Alloy: */ + +// View all layers with something like: +// curl https://tilma.staging.mysociety.org/resource-proxy/proxy.php\?https://hackney.assets/ | jq '.results[] | .layer.code, ( .layer.styles[] | { id, name } ) ' +var layers = [ + { + "categories": ["Street Lighting", "Lamposts"], + "item_name": "street light", + "layer_name": "Street Lights", + "styleid": "5d308d57fe2ad8046c67cdb5", + "layerid": "layers_streetLightingAssets" + }, + { + "categories": ["Illuminated Bollards", "Non-illuminated Bollards"], + "item_name": "bollard", + "layer_name": "Bollards", + "styleid": "5d308d57fe2ad8046c67cdb9", + "layerid": "layers_streetLightingAssets" + }, + { + "categories": ["Benches"], + "item_name": "bench", + "layer_name": "Bench", + "styleid": "5e8b16f0ca31500f60b3f589", + "layerid": "layers_bench_5e8b15f0ca31500f60b3f568" + }, + { + "categories": ["Potholes"], + "item_name": "road", + "layer_name": "Carriageway", + "styleid": "5d53d28bfe2ad80fc4573184", + "layerid": "layers_carriageway_5d53cc74fe2ad80c3403b77d" + }, + { + "categories": ["Road Markings / Lines"], + "item_name": "road", + "layer_name": "Markings", + "styleid": "5d308dd7fe2ad8046c67da33", + "layerid": "layers_highwayAssets" + }, + { + "categories": ["Pavement"], + "item_name": "pavement", + "layer_name": "Footways", + "styleid": "5d308dd6fe2ad8046c67da2a", + "layerid": "layers_highwayAssets" + }, + { + "categories": ["Cycle Tracks"], + "item_name": "cycle track", + "layer_name": "Cycle Tracks", + "styleid": "5d308dd6fe2ad8046c67da29", + "layerid": "layers_highwayAssets" + }, + { + "categories": ["Drains and gutters"], + "item_name": "drain", + "layer_name": "Gullies", + "styleid": "5d308dd6fe2ad8046c67da2e", + "layerid": "layers_highwayAssets" + }, + { + "categories": ["Verges"], + "item_name": "verge", + "layer_name": "Verges", + "styleid": "5d308dd7fe2ad8046c67da36", + "layerid": "layers_highwayAssets" + }, + { + "categories": ["Road Hump Fault / Damage"], + "item_name": "road hump", + "layer_name": "Traffic Calming", + "styleid": "5d308dd7fe2ad8046c67da35", + "layerid": "layers_highwayAssets" + }, + { + "categories": ["Broken or Faulty Barrier Gates"], + "item_name": "barrier gate", + "layer_name": "Gates", + "styleid": "5d308dd6fe2ad8046c67da2c", + "layerid": "layers_highwayAssets" + }, + { + "categories": ["Belisha Beacon"], + "item_name": "beacon", + "layer_name": "Belisha Beacon", + "styleid": "5d308d57fe2ad8046c67cdb6", + "layerid": "layers_streetLightingAssets" + }, + { + "categories": ["Loose or Damaged Kerb Stones"], + "item_name": "kerb", + "layer_name": "Kerbs", + "styleid": "5d308dd6fe2ad8046c67da30", + "layerid": "layers_highwayAssets" + } +]; + +var hackney_defaults = $.extend(true, {}, fixmystreet.alloyv2_defaults, { + class: OpenLayers.Layer.NCCVectorAsset, + protocol_class: OpenLayers.Protocol.AlloyV2, + http_options: { + base: "https://tilma.staging.mysociety.org/resource-proxy/proxy.php?https://hackney.assets/${layerid}/${x}/${y}/${z}/cluster?styleIds=${styleid}" + }, + non_interactive: false, + body: "Hackney Council", + attributes: { + asset_resource_id: function() { + return this.fid; + } + } +}); + +fixmystreet.alloy_add_layers(hackney_defaults, layers); + +})(); diff --git a/web/cobrands/hackney/base.scss b/web/cobrands/hackney/base.scss new file mode 100644 index 000000000..4bc3fc8b1 --- /dev/null +++ b/web/cobrands/hackney/base.scss @@ -0,0 +1,222 @@ +@import "../sass/h5bp"; +@import "./_colours"; +@import "../sass/mixins"; + +@import "../sass/base"; + + +#site-header { + box-shadow: + 0 0 0 6px $white, + 0 0 0 10px $dark-green, + 0 0 0 13px $white, + 0 0 0 16px $green, + 0 0 0 19px $white, + 0 0 0 21px $light-green; +} + +#site-logo { + background: transparent url('images/hackney-logo-white.png') 0 50% no-repeat; + background-size: 200px 36px; + width: 200px; + &:focus { + outline: 4px solid $yellow; + } +} + +.nav-menu--mysoc { + a { + color: $primary_text; + background-color: $primary; + } +} + +#front-main { + background-color: $white; + margin: 0; + padding: 1em; + text-align: inherit; + + h1 { + color: $black; + } + + #postcodeForm { + margin: 0; + padding: 0; + background: transparent; + color: inherit; + + div { + border: none; + background: transparent; + position: relative; + background: #fff; + box-shadow: 1px 1px 5px 1px rgba(104, 104, 104, 0.4); + + input#pc { + box-sizing: border-box; + padding: 10px 22px; + } + + input#sub { + width: 0; + padding-left: 50px; + overflow: hidden; + @include flex(0 0 auto); + background: $black url('hackney-search-icon.png') no-repeat 50% 50%; + background-size: 25px 25px; + color: $black; + &:hover, + &:focus { + background: $dark-green url('hackney-search-icon.png') no-repeat 50% 50%; + background-size: 25px 25px; + color: $dark_green; + } + &:focus { + outline: 4px solid $yellow; + } + } + } + } + + a#geolocate_link { + background: transparent; + display: block; + padding: 0; + margin-top: 0.5em; + font-family: inherit; + font-size: 1em; + border-radius: 0; + color: $dark_green; + + &:hover { + background: transparent; + text-decoration: underline; + } + } + + .form-hint { + color: inherit; + } +} + +.hackney-footer { + background-color: $dark_green; + color: #fff; + padding: 1em 0; +} + +.hackney-footer__logo { + background: transparent url('images/hackney-logo-white.png') 0 50% no-repeat; + background-size: 200px 36px; + width: 200px; + height: 54px; + text-indent: -999999px; + display: inline-block; + &:focus { + outline: 4px solid $yellow; + } +} + +a.platform-logo { + color: #fff; +} + +#front_stats { + background-color: $dark_green; + color: #fff; +} + +.green-btn, +.btn { + border-radius: 4px; + font-size: 1.1875em; + font-weight: 400; + line-height: 1.4375em; + vertical-align: top; + display: inline-block; + position: relative; + border: 1px solid $dark_green; + box-shadow: inset #003d2f 0 -2px 0 0; + &:hover { + background: none; + background-color: #005a30; + color: #fff !important; + } + + &:focus { + border-color:#ffdd00; + color:#0b0c0c !important; + background: none; + background-color:#ffdd00; + box-shadow: 0 2px 0#0b0c0c; + } +} + +.btn--primary, +.btn-primary, +.green-btn { + background: $dark_green; + border: 2px solid transparent; + color: #ffffff; + box-shadow: 0 2px 0 #002d18; +} + +textarea.form-control, +.dropzone, +input.form-control { + border: 2px solid #0b0c0c; + border-radius: 0; + box-shadow: none; + &:focus { + outline: 3px solid#ffdd00; + outline-offset: 0; + box-shadow: inset 0 0 0 2px; + } +} + +label, legend, .label { + font-weight: 300; +} + +.big-green-banner { + background-color: $dark_green; + text-transform: none; +} + +div.form-error, p.form-error { + color: $red; + background-color: transparent; + padding: 0; + width: 100%; + + a { + color: $red; + text-decoration: underline; + } +} + + +input.form-error, textarea.form-error, +select.form-error { + border-color: $red; + border-radius: 0 !important; +} + +.box-warning { + background-color: rgba(164, 214, 94, 0.5); +} + +.dz-clickable:hover, .dz-drag-hover { + border-color: $light-green; +} + +.dz-clickable:hover .dz-message u, .dz-drag-hover .dz-message u { + color: $green; +} + +.sso-staff-sign-in { + font-size: 0.9em; + margin: 1em 0; +} diff --git a/web/cobrands/hackney/hackney-search-icon.png b/web/cobrands/hackney/hackney-search-icon.png Binary files differnew file mode 100644 index 000000000..99305f24a --- /dev/null +++ b/web/cobrands/hackney/hackney-search-icon.png diff --git a/web/cobrands/hackney/images/hackney-logo-white.png b/web/cobrands/hackney/images/hackney-logo-white.png Binary files differnew file mode 100644 index 000000000..3a41df786 --- /dev/null +++ b/web/cobrands/hackney/images/hackney-logo-white.png diff --git a/web/cobrands/hackney/layout.scss b/web/cobrands/hackney/layout.scss new file mode 100644 index 000000000..8b6fa6278 --- /dev/null +++ b/web/cobrands/hackney/layout.scss @@ -0,0 +1,143 @@ +@import "_colours"; +@import "../sass/layout"; + +#main-nav { + display: block; // remove flex so nav touches top of parent + min-height: 0; // no vertical align, so no need for a height + margin-top: 0; // don't bother overlapping the border + height: auto; + margin-top: 0.5em; + .frontpage & { + margin-top: 1em; + } + .ie9 & { + position: static; + float: $right; + + & > * { + position: static; + -ms-transform: none; + } + } + + a { + font-weight: 600; + } +} + +.nav-menu--mysoc { + padding: 0em 0.5em; + margin-#{$left}: 0.25em; + background-color: $primary; + @include border-radius(0 0 0.375em 0.375em); + a { + background-color: transparent; + color: $primary_text; + text-transform: uppercase; + font-size: 0.6875em; + padding: 1.3em 0.7em 1em; + &:hover { + color: #fff; + background-color: transparent; + } + } +} + +body.frontpage { + #site-logo { + margin: 0.5em 0 0.5em; + width: 200px; + height: 54px; + background: transparent url('images/hackney-logo-white.png') 0 50% no-repeat; + background-size: 200px 36px; + } +} + +#site-header { + padding: 4px 0; + margin-bottom: 2em; + .mappage & { + margin-bottom: 0; + } +} + +#front-main { + background-color: $white; + padding: 50px 0; + border-bottom: 3px solid $light_green; + label { + font-size: 18px; + font-weight: 600; + } + + h1 { + font-size: 40px; + font-weight: 600; + } + + #postcodeForm { + overflow: visible; + margin: 0; + + div { + margin: 0; + } + } + + #front-main-container { + padding: 0 1em; + } +} + +ol.big-numbers>li:before { + color: $dark_green; +} + +.nav-menu--main span { + color: $light_green; + font-weight: 600; +} + +#front_stats { + border-color: $dark_green; + big { + color: $dark_green; + } +} + +.nav-menu--main a.report-a-problem-btn { + background-color: transparent; + color: white; + &:hover, + &:active, + &:focus { + background-color: transparent; + color: white; + } +} + +#front-howto h2, +#front-recently h2 { + font-weight: 600; +} + +#front_stats { + background-color: transparent; +} + +.big-green-banner { + background-color: $dark_green; +} + +.footer-powered-by { + position: relative; + top: -40px; + right: 0; + text-align: right; + +} + +a.platform-logo { + text-align: left; + +}
\ No newline at end of file diff --git a/web/cobrands/hart/_colours.scss b/web/cobrands/hart/_colours.scss index d79126bae..568ba66f1 100644 --- a/web/cobrands/hart/_colours.scss +++ b/web/cobrands/hart/_colours.scss @@ -8,6 +8,8 @@ $col_fixed_label: $hart_primary; $primary_b: #000000; $primary_text: #ffffff; +$primary_link_color: $primary_text; +$primary_link_hover_color: rgba($primary_text, 0.8); $link-color: #369; $link-hover-color: #369; @@ -24,3 +26,6 @@ $mappage-header-height: 173px + 32px; $header-top-border: false; $container-max-width: 60em; + +$search-help-background: #fff3f3; +$search-help-header-font-size-desktop: 1.25em; diff --git a/web/cobrands/highwaysengland/_colours.scss b/web/cobrands/highwaysengland/_colours.scss index 4b7d46453..d8b30aed6 100644 --- a/web/cobrands/highwaysengland/_colours.scss +++ b/web/cobrands/highwaysengland/_colours.scss @@ -40,3 +40,9 @@ $mappage-header-height: 5.75em; $body-font: "proxima-nova", "Proxima Nova", Montserrat, Arial, sans-serif; $heading-font: $body-font; $meta-font: $body-font; + +$search-help-alignment: left; +$search-help-background: #fff3f3; +$search-help-header-font-size-desktop: 1.25em; +$search-help-margin: 0 -1em; +$search-help-margin-desktop: 0 -1em; diff --git a/web/cobrands/highwaysengland/assets.js b/web/cobrands/highwaysengland/assets.js index 8e50ed396..5943cdffd 100644 --- a/web/cobrands/highwaysengland/assets.js +++ b/web/cobrands/highwaysengland/assets.js @@ -61,9 +61,9 @@ fixmystreet.assets.add(defaults, { no_asset_msg_id: '#js-not-he-road', actions: { found: function(layer, feature) { - // If the road isn't in area 7 then we want to show the not found message. + // If the road is a DBFO road then we want to show the not found message. fixmystreet.message_controller.road_found(layer, feature, function(feature) { - if (feature.attributes.area_name === 'Area 7') { + if (feature.attributes.area_name.indexOf('DBFO') === -1) { $('#js-top-message').show(); $('#form_category_row').show(); return true; @@ -72,7 +72,7 @@ fixmystreet.assets.add(defaults, { $('#form_category_row').hide(); return false; } - }, '#js-not-area7-road'); + }, '#js-dbfo-road'); }, not_found: function(layer) { fixmystreet.message_controller.road_not_found(layer); diff --git a/web/cobrands/highwaysengland/base.scss b/web/cobrands/highwaysengland/base.scss index 839c53ad8..72879d64a 100644 --- a/web/cobrands/highwaysengland/base.scss +++ b/web/cobrands/highwaysengland/base.scss @@ -201,5 +201,4 @@ p.form-error { .olLayerGrid, .olBackBuffer { opacity: 0.3; - filter: grayscale(1); } diff --git a/web/cobrands/hounslow/_colours.scss b/web/cobrands/hounslow/_colours.scss index 0a4476720..0fb3d985a 100644 --- a/web/cobrands/hounslow/_colours.scss +++ b/web/cobrands/hounslow/_colours.scss @@ -21,6 +21,8 @@ $primary: $purple; //$primary: #dce6f2; // From bexley.gov.uk/services $primary_b: #222; $primary_text: $white; +$primary_link_color: $primary_text; +$primary_link_hover_color: rgba($primary_text, 0.8); $base_bg: $white; $base_fg: #222; @@ -36,3 +38,7 @@ $header-top-border: false; $heading-font: InfoText, Frutiger, Arial, sans-serif; $body-font: Frutiger, Arial, sans-serif; $meta-font: $body-font; + +$search-help-background: #fff3f3; +$search-help-header-background: $red; +$search-help-header-font-size-desktop: 1.25em;
\ No newline at end of file diff --git a/web/cobrands/hounslow/assets.js b/web/cobrands/hounslow/assets.js index 603a56e85..2c7f5b754 100644 --- a/web/cobrands/hounslow/assets.js +++ b/web/cobrands/hounslow/assets.js @@ -114,20 +114,11 @@ fixmystreet.assets.add($.extend(true, {}, defaults, { // asset_item: 'gulley' // })); -var streetlight_select = $.extend({ - label: "${FeatureId}", - labelOutlineColor: "white", - labelOutlineWidth: 3, - labelYOffset: 65, - fontSize: '15px', - fontWeight: 'bold' -}, fixmystreet.assets.style_default_select.defaultStyle); - // The label for street light markers should be everything after the final // '/' in the feature's FeatureId attribute. // This seems to be the easiest way to perform custom processing // on style attributes in OpenLayers... -var select_style = new OpenLayers.Style(streetlight_select); +var select_style = fixmystreet.assets.construct_named_select_style("${FeatureId}"); select_style.createLiterals = function() { var literals = Object.getPrototypeOf(this).createLiterals.apply(this, arguments); if (literals.label && literals.label.split) { @@ -138,6 +129,7 @@ select_style.createLiterals = function() { var streetlight_stylemap = new OpenLayers.StyleMap({ 'default': fixmystreet.assets.style_default, + 'hover': fixmystreet.assets.style_default_hover, 'select': select_style }); @@ -145,19 +137,15 @@ var labeled_defaults = $.extend(true, {}, defaults, { select_action: true, stylemap: streetlight_stylemap, feature_code: 'FeatureId', - actions: { - asset_found: function(asset) { - var id = asset.attributes[this.fixmystreet.feature_code] || ''; - if (id !== '' && id.split) { - var code = id.split("/").slice(-1)[0]; - $('.category_meta_message').html('You have selected column <b>' + code + '</b>'); - } else { - $('.category_meta_message').html('You can pick a <b class="asset-spot">' + this.fixmystreet.asset_item + '</b> from the map »'); - } - }, - asset_not_found: function() { - $('.category_meta_message').html('You can pick a <b class="asset-spot">' + this.fixmystreet.asset_item + '</b> from the map »'); + construct_asset_name: function(id) { + if (id.split) { + var code = id.split("/").slice(-1)[0]; + return {id: code, name: 'column'}; } + }, + actions: { + asset_found: fixmystreet.assets.named_select_action_found, + asset_not_found: fixmystreet.assets.named_select_action_not_found } }); diff --git a/web/cobrands/isleofwight/_colours.scss b/web/cobrands/isleofwight/_colours.scss index 688eb66e0..e1334bcb1 100644 --- a/web/cobrands/isleofwight/_colours.scss +++ b/web/cobrands/isleofwight/_colours.scss @@ -11,9 +11,11 @@ $green: #75c044; //Any 20% tint of the above -$primary_text: #fff; $primary: $cyan; $primary_b: #222; +$primary_text: #fff; +$primary_link_color: $primary_text; +$primary_link_hover_color: rgba($primary_text, 0.8); $base_bg: #fff; $base_fg: #222; @@ -29,3 +31,6 @@ $header-top-border: false; $body-font: Helvetica, Arial, sans-serif; $heading-font: $body-font; $meta-font: $body-font; + +$search-help-background: #fff3f3; +$search-help-header-font-size-desktop: 1.25em; diff --git a/web/cobrands/isleofwight/assets.js b/web/cobrands/isleofwight/assets.js index 2710a9de7..cedd2293c 100644 --- a/web/cobrands/isleofwight/assets.js +++ b/web/cobrands/isleofwight/assets.js @@ -31,41 +31,10 @@ var defaults = { var pin_prefix = fixmystreet.pin_prefix || document.getElementById('js-map-data').getAttribute('data-pin_prefix'); -var labeled_default = { - fillColor: "#FFFF00", - fillOpacity: 0.6, - strokeColor: "#000000", - strokeOpacity: 0.8, - strokeWidth: 2, - pointRadius: 6 -}; - -var labeled_select = { - externalGraphic: pin_prefix + "pin-spot.png", - fillColor: "#55BB00", - graphicWidth: 48, - graphicHeight: 64, - graphicXOffset: -24, - graphicYOffset: -56, - backgroundGraphic: pin_prefix + "pin-shadow.png", - backgroundWidth: 60, - backgroundHeight: 30, - backgroundXOffset: -7, - backgroundYOffset: -22, - popupYOffset: -40, - graphicOpacity: 1.0, - - label: "${asset_id}", - labelOutlineColor: "white", - labelOutlineWidth: 3, - labelYOffset: 65, - fontSize: '15px', - fontWeight: 'bold' -}; - var labeled_stylemap = new OpenLayers.StyleMap({ - 'default': new OpenLayers.Style(labeled_default), - 'select': new OpenLayers.Style(labeled_select) + 'default': fixmystreet.assets.style_default, + 'hover': fixmystreet.assets.style_default_hover, + 'select': fixmystreet.assets.construct_named_select_style("${asset_id}") }); fixmystreet.assets.add($.extend(true, {}, defaults, { diff --git a/web/cobrands/lincolnshire/_colours.scss b/web/cobrands/lincolnshire/_colours.scss index 8d8ad2bf4..8e80d374a 100644 --- a/web/cobrands/lincolnshire/_colours.scss +++ b/web/cobrands/lincolnshire/_colours.scss @@ -49,3 +49,9 @@ $menu-image: 'menu-black'; $front_main_background: white; // $header-top-border: false; + +$search-help-alignment: left; +$search-help-header-color: $lincs-pop; +$search-help-header-background: transparent; +$search-help-header-font-size-desktop: 1.25em; +$search-help-margin-desktop: -2em -2em 0 -2em; diff --git a/web/cobrands/northamptonshire/_colours.scss b/web/cobrands/northamptonshire/_colours.scss index 17c7822fb..bb2e0a654 100644 --- a/web/cobrands/northamptonshire/_colours.scss +++ b/web/cobrands/northamptonshire/_colours.scss @@ -30,3 +30,7 @@ $header-top-border: false; $heading-font: PraterSansWeb, sans-serif; $body-font: "Open Sans", Arial, "Helvetica Neue", Helvetica, sans-serif; $meta-font: $body-font; + +$search-help-background: #fff3f3; +$search-help-header-font-size-desktop: 1.25em; +$search-help-header-font-family: inherit; diff --git a/web/cobrands/northamptonshire/assets.js b/web/cobrands/northamptonshire/assets.js index 2b6cdeb69..b08f48850 100644 --- a/web/cobrands/northamptonshire/assets.js +++ b/web/cobrands/northamptonshire/assets.js @@ -4,226 +4,13 @@ if (!fixmystreet.maps) { return; } -var is_live = !fixmystreet.staging; +var base_url = fixmystreet.staging ? + "https://tilma.staging.mysociety.org/resource-proxy/proxy.php?https://northants.staging/${layerid}/${x}/${y}/${z}/cluster" : + "https://tilma.mysociety.org/resource-proxy/proxy.php?https://northants.assets/${layerid}/${x}/${y}/${z}/cluster"; + +var url_with_style = base_url + '?styleIds=${styleid}'; var layers = [ - /* -{ - "layer_name": "Street Lights", - "layer": 5, - "version": "5.4-9.6-" -}, -{ - "layer_name": "Street Lighting Nightscape", - "layer": 9, - "version": "9.6-" -}, -{ - "layer_name": "Carriageways", - "layer": 20, - "version": "20.54-" -}, -{ - "layer_name": "Road Heirarchy", - "layer": 39, - "version": "39.53-" -}, -{ - "layer_name": "Posts", - "layer": 59, - "version": "59.133-" -}, -{ - "layer_name": "Grips", - "layer": 61, - "version": "61.1-" -}, -{ - "layer_name": "Traffic Monitoring", - "layer": 62, - "version": "62.2-" -}, -{ - "layer_name": "Special Treatment", - "layer": 64, - "version": "64.1-" -}, -{ - "layer_name": "Gully", - "layer": 66, - "version": "66.9-" -}, -{ - "layer_name": "Channel", - "layer": 68, - "version": "68.2-" -}, -{ - "layer_name": "Comms Cabinet", - "layer": 69, - "version": "69.1-" -}, -{ - "layer_name": "Steps", - "layer": 70, - "version": "70.1-" -}, -{ - "layer_name": "Step Handrail", - "layer": 71, - "version": "71.1-" -}, -{ - "layer_name": "Tree Group", - "layer": 74, - "version": "74.1-" -}, -{ - "layer_name": "Defects Ancillary Items", - "layer": 171, - "version": "171.33-" -}, -{ - "layer_name": "Speed Limit", - "layer": 172, - "version": "172.33-" -}, -{ - "layer_name": "PRoW Network", - "layer": 173, - "version": "173.1-" -}, -{ - "layer_name": "Footway Schemes", - "layer": 174, - "version": "174.1-" -}, -{ - "layer_name": "FINGER POST", - "layer": 178, - "version": "178.39-" -}, -{ - "layer_name": "GAPS", - "layer": 179, - "version": "179.1-" -}, -{ - "layer_name": "OBSTRUCTIONS", - "layer": 182, - "version": "182.2-" -}, -{ - "layer_name": "STEPS", - "layer": 184, - "version": "184.2-" -}, -{ - "layer_name": "Gate Types", - "layer": 191, - "version": "191.2-" -}, -{ - "layer_name": "Gate Condition", - "layer": 192, - "version": "192.2-" -}, -{ - "layer_name": "Bridge Type", - "layer": 193, - "version": "193.17-" -}, -{ - "layer_name": "Bridge Condition", - "layer": 194, - "version": "194.17-" -}, -{ - "layer_name": "PRoW Net By Type", - "layer": 201, - "version": "201.1-" -}, -{ - "layer_name": "Finger Post Condition", - "layer": 209, - "version": "209.39-" -}, -{ - "layer_name": "F Post Path Type", - "layer": 210, - "version": "210.39-" -}, -{ - "layer_name": "AW_Sewer", - "layer": 215, - "version": "215.1-" -}, -{ - "layer_name": "CCTV", - "layer": 218, - "version": "218.1-" -}, -{ - "layer_name": "VMS", - "layer": 219, - "version": "219.1-" -}, -{ - "layer_name": "Warning Signs", - "layer": 220, - "version": "220.1-" -}, -{ - "layer_name": "Traffic Calming", - "layer": 221, - "version": "221.1-" -}, -{ - "layer_name": "Bluetooth Counter", - "layer": 222, - "version": "222.1-" -}, -{ - "layer_name": "Midblock", - "layer": 223, - "version": "223.1-" -}, -{ - "layer_name": "Over Height", - "layer": 224, - "version": "224.1-" -}, -{ - "layer_name": "RTI Display", - "layer": 226, - "version": "226.1-" -}, -{ - "layer_name": "System Links", - "layer": 227, - "version": "227.1-" -}, -{ - "layer_name": "CULVERTS (PRoW)", - "layer": 229, - "version": "229.1-" -}, -{ - "layer_name": "PEDESTRIAN GUARDRAIL", - "layer": 230, - "version": "230.1-" -}, -{ - "layer_name": "Traffic Signal Controller", - "layer": 231, - "version": "231.1-" -}, -{ - "layer_name": "Traffic Signal Posts", - "layer": 232, - "version": "232.1-" -}, - */ { "categories": [ "Loose / Raised/Sunken", @@ -234,119 +21,80 @@ var layers = [ ], "item_name": "drain", "layer_name": "Gully", - "layer": 66, - "version": "66.80-", + "styleid": '5d480b8ffe2ad809d85a78ff', "max_resolution": 0.5971642833948135 }, { "categories": [ "Grit Bin - damaged/replacement", "Grit Bin - empty/refill" ], "item_name": "grit bin", "layer_name": "Grit Bins", - "layer": 13, - "version": "13.7-" + "styleid": '5d480942fe2ad809d85a78ad', }, { "categories": [ "Highway Bridges - Damaged/Unsafe" ], "asset_type": 'area', "item_name": 'bridge', "layer_name": "Structures", - "layer": 14, - "version": "14.7-" + "styleid": '5d4809fffe2ad8059ce44bbe', }, { "categories": [ "Damaged / Missing / Facing Wrong Way", "Obscured by vegetation or Dirty" ], "item_name": "sign", "layer_name": "Signs", - "layer": is_live ? 60 : 303, - "version": is_live ? "60.2172-" : "303.1-" + "styleid": '5d480a8ffe2ad809d85a78d3', }, { "categories": [ "Shelter Damaged", "Sign/Pole Damaged" ], "layer_name": "Bus Stop", - "layer": 72, - "version": "72.14-" + "styleid": '5d4812dffe2ad809d85a7a72', }, { + "categories": [ + "Fallen Tree", + "Restricted Visibility / Overgrown / Overhanging", + "Restricted Visibility" + ], + "layer_name": "Tree", + "styleid": '5d481376fe2ad8059ce44ef2', +}, +{ + "categories": [ "Safety Bollard - Damaged/Missing" ], + "layer_name": "Safety Bollard", + "styleid": "5d481446fe2ad8059ce44f02", +}, +]; + +var prow_assets = [ +{ "categories": [ "Bridge-Damaged/ Missing" ], "item_name": "bridge or right of way", "layer_name": "BRIDGES", - "layer": 177, - "version": "177.40-" + "styleid": "5d48161ffe2ad809d85a7add" }, { "categories": [ "Gate - Damaged/ Missing" ], "item_name": "gate or right of way", "layer_name": "GATE", - "layer": 181, - "version": "181.14-" + "styleid": "5d481906fe2ad8059ce450b4", }, { "categories": [ "Stile-Damaged/Missing" ], "item_name": "stile or right of way", "layer_name": "STILE", - "layer": 185, - "version": "185.10-" + "styleid": "5d481a05fe2ad8059ce45121", }, { "categories": [ "Sign/Waymarking - Damaged/Missing" ], "item_name": "waymarking or right of way", "layer_name": "WAYMARK POST", - "layer": 187, - "version": "187.10-" -}, -{ - "categories": [ - "Damaged/Exposed Wiring / Vandalised", - "Lamp/Bulb Failure", - "Signal Failure", - "Signal Failure all out", - "Signal Stuck", - "Signal Head Failure", - "Request Timing Review", - "Damaged Control box", - "Signal Failure/Damaged - Toucan/Pelican" - ], - "item_name": "signal or crossing", - "layer_name": "Midblock", - "layer": 223, - "version": "223.2-" -}, -{ - "categories": [ - "Damaged/Exposed Wiring / Vandalised", - "Lamp/Bulb Failure", - "Signal Failure", - "Signal Failure all out", - "Signal Stuck", - "Signal Head Failure", - "Request Timing Review", - "Damaged Control box", - "Signal Failure/Damaged - Toucan/Pelican" - ], - "item_name": "signal or crossing", - "layer_name": "TL Junction", - "layer": 225, - "version": "225.5-" -}, -{ - "categories": [ - "Fallen Tree", - "Restricted Visibility / Overgrown / Overhanging", - "Restricted Visibility" - ], - "layer_name": "Tree", - "layer": 307, - "version": "307.7-", - "snap_threshold": 0, -}, -{ - "categories": [ "Safety Bollard - Damaged/Missing" ], - "layer_name": "Safety Bollard", - "layer": 233, - "version": "233.28-" + "styleid": "5d481a4ffe2ad809d85a7b90&styleIds=5d481742fe2ad809d85a7b05" }, ]; +var highway_layer = 'layers_highwayAssetsCustom_5d4806b0fe2ad809d85a774f'; +var prow_asset_layer = 'layers_pRoWAssets_5d48157cfe2ad809d85a7abc'; +var signal_asset_layer = 'layers_nETCOM_5d483dd7fe2ad809d85a8fab'; + // This is required so that the found/not found actions are fired on category // select and pin move rather than just on asset select/not select. OpenLayers.Layer.NCCVectorAsset = OpenLayers.Class(OpenLayers.Layer.VectorAsset, { @@ -385,11 +133,12 @@ OpenLayers.Layer.NCCVectorNearest = OpenLayers.Class(OpenLayers.Layer.VectorNear // default options for northants assets include // a) checking for multiple assets in same location // b) preventing submission unless an asset is selected -var northants_defaults = $.extend(true, {}, fixmystreet.alloy_defaults, { +var northants_defaults = $.extend(true, {}, fixmystreet.alloyv2_defaults, { class: OpenLayers.Layer.NCCVectorAsset, - protocol_class: OpenLayers.Protocol.Alloy, + protocol_class: OpenLayers.Protocol.AlloyV2, http_options: { - environment: is_live ? 26 : 28 + base: url_with_style, + layerid: highway_layer }, non_interactive: false, body: "Northamptonshire County Council", @@ -439,34 +188,49 @@ var northants_defaults = $.extend(true, {}, fixmystreet.alloy_defaults, { } }); -$.each(layers, function(index, layer) { - if ( layer.categories ) { - var options = { - http_options: { - layerid: layer.layer, - layerVersion: layer.version, - }, - asset_type: layer.asset_type || 'spot', - asset_category: layer.categories, - asset_item: layer.item_name || layer.layer_name.toLowerCase(), - }; - if (layer.max_resolution) { - options.max_resolution = layer.max_resolution; - } - if (layer.snap_threshold || layer.snap_threshold === 0) { - options.snap_threshold = layer.snap_threshold; - } - fixmystreet.assets.add(northants_defaults, options); - } +fixmystreet.alloy_add_layers(northants_defaults, layers); + +var prow_defaults = $.extend(true, {}, northants_defaults, { + http_options: { + layerid: prow_asset_layer + } +}); + +fixmystreet.alloy_add_layers(prow_defaults, prow_assets); + +var signals_defaults = $.extend(true, {}, northants_defaults, { + http_options: { + layerid: signal_asset_layer + } +}); + + +fixmystreet.assets.add(signals_defaults, { + http_options: { + layer_id: signal_asset_layer, + styleid: "5d484093fe2ad809d85a9139&styleIds=5d483f6cfe2ad8059ce464de", + }, + asset_category: [ + "Damaged/Exposed Wiring / Vandalised", + "Lamp/Bulb Failure", + "Signal Failure", + "Signal Failure all out", + "Signal Stuck", + "Signal Head Failure", + "Request Timing Review", + "Damaged Control box", + "Signal Failure/Damaged - Toucan/Pelican" + ], + asset_item: "signal or crossing" }); // NCC roads layers which prevent report submission unless we have selected // an asset. -var northants_road_defaults = $.extend(true, {}, fixmystreet.alloy_defaults, { - class: OpenLayers.Layer.NCCVectorNearest, - protocol_class: OpenLayers.Protocol.Alloy, +var northants_road_defaults = $.extend(true, {}, fixmystreet.alloyv2_defaults, { + protocol_class: OpenLayers.Protocol.AlloyV2, http_options: { - environment: is_live ? 26 : 28 + base: url_with_style, + layerid: highway_layer }, body: "Northamptonshire County Council", road: true, @@ -488,8 +252,8 @@ var northants_road_defaults = $.extend(true, {}, fixmystreet.alloy_defaults, { fixmystreet.assets.add(northants_road_defaults, { http_options: { - layerid: 221, - layerVersion: '221.4-', + // Traffic Calming + styleid: "5d481403fe2ad8059ce44efd", }, no_asset_msg_id: '#js-not-an-asset', asset_item: 'speed hump', @@ -507,9 +271,9 @@ var barrier_style = new OpenLayers.Style({ }); fixmystreet.assets.add(northants_road_defaults, { + // Pedestrian Guardrail http_options: { - layerid: is_live ? 1068 : 230, - layerVersion: is_live ? '1068.1-' : '230.4-', + styleid: "5d4813c1fe2ad8059ce44ef6", }, stylemap: new OpenLayers.StyleMap({ 'default': barrier_style @@ -530,10 +294,10 @@ var highways_style = new OpenLayers.Style({ }); fixmystreet.assets.add(northants_road_defaults, { - protocol_class: OpenLayers.Protocol.Alloy, + protocol_class: OpenLayers.Protocol.AlloyV2, + // Carriageways http_options: { - layerid: 20, - layerVersion: '20.249-', + styleid: "5d480710fe2ad8059ce44a1d", }, stylemap: new OpenLayers.StyleMap({ 'default': highways_style @@ -569,20 +333,20 @@ fixmystreet.assets.add(northants_road_defaults, { function ncc_match_prow_type(f, styleId) { return f && f.attributes && - f.attributes.layerStyleId && - f.attributes.layerStyleId == styleId; + f.attributes.styleId && + f.attributes.styleId == styleId; } function ncc_prow_is_fp(f) { - return ncc_match_prow_type(f, is_live ? 6190 : 1454); + return ncc_match_prow_type(f, '5d483b84fe2ad809d85a8dab' ); } function ncc_prow_is_bw(f) { - return ncc_match_prow_type(f, is_live ? 6192 : 1453); + return ncc_match_prow_type(f, '5d483b84fe2ad809d85a8dac'); } function ncc_prow_is_boat(f) { - return ncc_match_prow_type(f, is_live ? 6193: 1455); + return ncc_match_prow_type(f, '5d483b84fe2ad809d85a8dad'); } var rule_footpath = new OpenLayers.Rule({ @@ -624,8 +388,9 @@ prow_style.addRules([rule_footpath, rule_boat, rule_bridleway]); fixmystreet.assets.add(northants_road_defaults, { http_options: { - layerid: is_live ? 1110 : 310, - layerVersion: is_live ? '1110.1-' : '310.1-', + // PRoW Network + base: base_url, + layerid: 'layers_pRoWType_5d483b2ffe2ad809d85a8d9a' }, stylemap: new OpenLayers.StyleMap({ 'default': prow_style diff --git a/web/cobrands/oxfordshire/_colours.scss b/web/cobrands/oxfordshire/_colours.scss index 7ef941660..535b3757a 100644 --- a/web/cobrands/oxfordshire/_colours.scss +++ b/web/cobrands/oxfordshire/_colours.scss @@ -14,6 +14,7 @@ $color-oxfordshire-link-blue: #0a549d; $primary: $color-oxfordshire-bright-green; $primary_b: $color-oxfordshire-dark-green; $primary_text: #fff; +$primary_link_decoration: none; $link-color: $color-oxfordshire-link-blue; $link-hover-color: $color-oxfordshire-bright-yellow; @@ -41,3 +42,7 @@ $header-top-border: false; $form-control-border-color: #525252; $pin_prefix: '/cobrands/oxfordshire/images/'; + +$search-help-alignment: left; +$search-help-background: #fff3f3; +$search-help-margin-desktop: -2em 0 0 0;
\ No newline at end of file diff --git a/web/cobrands/oxfordshire/assets.js b/web/cobrands/oxfordshire/assets.js new file mode 100644 index 000000000..1e00bccc4 --- /dev/null +++ b/web/cobrands/oxfordshire/assets.js @@ -0,0 +1,257 @@ +(function(){ + +if (!fixmystreet.maps) { + return; +} + +var wfs_host = fixmystreet.staging ? 'tilma.staging.mysociety.org' : 'tilma.mysociety.org'; +var tilma_url = "https://" + wfs_host + "/mapserver/oxfordshire"; +var proxy_base_url = "https://" + wfs_host + "/proxy/occ/"; + +var defaults = { + wfs_url: tilma_url, + asset_type: 'spot', + max_resolution: 4.777314267158508, + geometryName: 'msGeometry', + srsName: "EPSG:3857", + body: "Oxfordshire County Council", + strategy_class: OpenLayers.Strategy.FixMyStreet +}; + +var occ_default = $.extend({}, fixmystreet.assets.style_default.defaultStyle, { + fillColor: "#007258" +}); + +var occ_hover = new OpenLayers.Style({ + pointRadius: 8, + cursor: 'pointer' +}); + +var occ_stylemap = new OpenLayers.StyleMap({ + 'default': occ_default, + 'select': fixmystreet.assets.style_default_select, + 'hover': occ_hover +}); + +var occ_ownernames = [ + "LocalAuthority", "CountyCouncil", 'ODS' +]; + +function occ_owns_feature(f) { + return f && + f.attributes && + f.attributes.maintained_by && + OpenLayers.Util.indexOf(occ_ownernames, f.attributes.maintained_by) > -1; +} + +function occ_does_not_own_feature(f) { + return !occ_owns_feature(f); +} + +var owned_default_style = new OpenLayers.Style({ + fillColor: "#868686", + fillOpacity: 0.6, + strokeColor: "#000000", + strokeOpacity: 0.6, + strokeWidth: 2, + pointRadius: 4, + title: 'Not maintained by Oxfordshire County Council. Maintained by ${maintained_by}.' +}); + +var rule_owned = new OpenLayers.Rule({ + filter: new OpenLayers.Filter.FeatureId({ + type: OpenLayers.Filter.Function, + evaluate: occ_owns_feature + }), + symbolizer: { + fillColor: "#007258", + pointRadius: 6, + title: '' + } +}); + +var rule_not_owned = new OpenLayers.Rule({ + filter: new OpenLayers.Filter.FeatureId({ + type: OpenLayers.Filter.Function, + evaluate: occ_does_not_own_feature + }) +}); + +owned_default_style.addRules([rule_owned, rule_not_owned]); + +var owned_stylemap = new OpenLayers.StyleMap({ + 'default': owned_default_style, + 'select': fixmystreet.assets.style_default_select, + 'hover': occ_hover +}); + +fixmystreet.assets.add(defaults, { + stylemap: occ_stylemap, + wfs_feature: "Trees", + asset_id_field: 'Ref', + attributes: { + feature_id: 'Ref' + }, + asset_category: ["Trees"], + asset_item: 'tree' +}); + +fixmystreet.assets.add(defaults, { + select_action: true, + stylemap: occ_stylemap, + wfs_feature: "Traffic_Lights", + asset_id_field: 'Site', + attributes: { + feature_id: 'Site' + }, + asset_category: ["Traffic Lights (permanent only)"], + asset_item: 'traffic light', + feature_code: 'Site', + actions: { + asset_found: fixmystreet.assets.named_select_action_found, + asset_not_found: fixmystreet.assets.named_select_action_not_found + } +}); + +var streetlight_select = $.extend({ + label: "${UNITNO}", + fontColor: "#FFD800", + labelOutlineColor: "black", + labelOutlineWidth: 3, + labelYOffset: 69, + fontSize: '18px', + fontWeight: 'bold' +}, fixmystreet.assets.style_default_select.defaultStyle); + +var streetlight_stylemap = new OpenLayers.StyleMap({ + 'default': occ_default, + 'select': new OpenLayers.Style(streetlight_select), + 'hover': occ_hover +}); + +fixmystreet.assets.add(defaults, { + select_action: true, + stylemap: streetlight_stylemap, + wfs_feature: "Street_Lights", + asset_id_field: 'UNITID', + attributes: { + feature_id: 'UNITID', + column_no: 'UNITNO' + }, + asset_category: ["Street lighting"], + asset_item: 'street light', + feature_code: 'UNITNO', + actions: { + asset_found: fixmystreet.assets.named_select_action_found, + asset_not_found: fixmystreet.assets.named_select_action_not_found + } +}); + +var owned_defaults = $.extend({}, defaults, { + stylemap: owned_stylemap, + select_action: true, + // have to do this by hand rather than using wfs_* options + // as the server does not like being POSTed xml with application/xml + // as the Content-Type which is what using those options results in. + http_options: { + headers: { + 'Content-Type': 'text/plain' + }, + params: { + SERVICE: "WFS", + VERSION: "1.1.0", + REQUEST: "GetFeature", + SRSNAME: "urn:ogc:def:crs:EPSG::27700", + propertyName: 'id,maintained_by,msGeometry' + } + }, + srsName: "EPSG:27700", + asset_id_field: 'id', + attributes: { + feature_id: 'id' + }, + actions: { + asset_found: function(asset) { + var is_occ = occ_owns_feature(asset); + if (!is_occ) { + fixmystreet.message_controller.asset_not_found.call(this); + } else { + fixmystreet.message_controller.asset_found.call(this); + } + }, + // Not a typo, asset selection is not mandatory + asset_not_found: fixmystreet.message_controller.asset_found + } +}); + +fixmystreet.assets.add(owned_defaults, { + http_options: { + url: proxy_base_url + 'drains/wfs', + params: { + TYPENAME: "junctions" + } + }, + asset_category: ["Gully and Catchpits", 'Drainage'], + asset_item: 'drain' +}); + +fixmystreet.assets.add(owned_defaults, { + http_options: { + url: proxy_base_url + 'grit/wfs', + params: { + TYPENAME: "Grit_bins" + } + }, + asset_category: ["Ice/Snow"], + asset_item: 'grit bin' +}); + +var road_occ_maintainable = 'Maintainable at Public Expense'; + +function road_owned(f) { + return f && + f.attributes && + f.attributes.STREET_MAINTENANCE_RESPONSIBILITY_NAME && + f.attributes.STREET_MAINTENANCE_RESPONSIBILITY_NAME.lastIndexOf(road_occ_maintainable, 0) === 0; +} + +fixmystreet.assets.add(defaults, { + stylemap: fixmystreet.assets.stylemap_invisible, + wfs_feature: "OCCRoads", + propertyNames: ['TYPE1_2_USRN', 'STREET_MAINTENANCE_RESPONSIBILITY_NAME', 'msGeometry'], + srsName: "EPSG:27700", + usrn: { + attribute: 'TYPE1_2_USRN', + field: 'usrn' + }, + non_interactive: true, + road: true, + no_asset_msg_id: '#js-not-a-road', + asset_item: 'road', + asset_type: 'road', + actions: { + found: function(layer, feature) { + fixmystreet.message_controller.road_found(layer, feature, road_owned, '#js-not-a-road'); + }, + not_found: fixmystreet.message_controller.road_not_found + }, + asset_category: [ + "Bridges", + "Carriageway Defect", + "Current Roadworks", + "Drainage", + "Gully and Catchpits", + "Highway Schemes", + "Ice/Snow", + "Manhole", + "Pavements", + "Pothole", + "Road Traffic Signs and Road Markings", + "Roads/highways", + "Street lighting", + "Traffic Lights (permanent only)", + "Trees" + ] +}); + +})(); diff --git a/web/cobrands/oxfordshire/base.scss b/web/cobrands/oxfordshire/base.scss index 999321a7e..243e6aa52 100644 --- a/web/cobrands/oxfordshire/base.scss +++ b/web/cobrands/oxfordshire/base.scss @@ -99,29 +99,15 @@ a:not([class]):focus { } } } +} - a#geolocate_link { - padding: 0; - background: transparent; - font-size: inherit; - color: $link-color; - margin-top: 0.5em; - - &:hover { - background-color: transparent; - color: $link-hover-color; - } +a#geolocate_link { + padding: 0; + margin-top: 0.5em; - &:focus { - background-color: $color-oxfordshire-bright-yellow; - outline: 2px solid $color-oxfordshire-bright-yellow; - } - - &.loading { - background: transparent url("/cobrands/fixmystreet/images/spinner-white.gif") 100% 50% no-repeat; - padding: 0 1.5em 0 0; - border: none; - } + &.loading { + background: transparent url("/cobrands/fixmystreet/images/spinner-white.gif") 100% 50% no-repeat; + padding: 0 1.5em 0 0; } } @@ -155,6 +141,13 @@ ol.big-numbers { margin-bottom: 1em; padding-bottom: 5px; } + + // Overloaded selector, to override `.content h2` + h2.search-help__header { + margin-bottom: 0; + padding-bottom: 1rem; + font-size: 1em; + } } dd, p { @@ -166,16 +159,8 @@ dd, p { padding: 1em; margin: 0 -1em -1em -1em; // counteract 1em padding on sidebar without using .full-width which sets an explicit width - h3 { - font-weight: bold; - font-size: 1em; - margin: 0 0 0.5em 0; - } - p { - color: #666; margin: 0 0 0.5em 0; - font-size: 0.9em; } & > :last-child { @@ -293,6 +278,10 @@ textarea { color: $color-oxfordshire-link-blue; } +.asset-spot:before { + background-color: #007258; +} + @media print { body { background-color: #fff !important; diff --git a/web/cobrands/oxfordshire/layout.scss b/web/cobrands/oxfordshire/layout.scss index 1b415903a..e6490910f 100644 --- a/web/cobrands/oxfordshire/layout.scss +++ b/web/cobrands/oxfordshire/layout.scss @@ -130,25 +130,17 @@ $mappage-header-height: 10em; } } } - - a#geolocate_link { - color: $color-oxfordshire-link-blue; - - &:hover { - color: $color-oxfordshire-bright-yellow; - } - - &:focus { - background-color: $color-oxfordshire-bright-yellow; - outline: 2px solid $color-oxfordshire-bright-yellow; - } - } } .frontpage { .content h2 { font-size: 2em; } + + // Overloaded selector, to override `.content h2` + h2.search-help__header { + font-size: 20px; + } } #front_stats { diff --git a/web/cobrands/peterborough/_colours.scss b/web/cobrands/peterborough/_colours.scss index 8211d8835..9b2a0b6bb 100644 --- a/web/cobrands/peterborough/_colours.scss +++ b/web/cobrands/peterborough/_colours.scss @@ -44,3 +44,9 @@ $roboto: 'Roboto', Arial, sans-serif; $heading-font: $roboto; $body-font: $roboto; $meta-font: $roboto; + +$search-help-alignment: left; +$search-help-background: #fff3f3; +$search-help-margin: 1em -1em 0 -1em; +$search-help-margin-desktop: -2em -1em 0 -1em; +$search-help-header-font-size-desktop: 1.25em; diff --git a/web/cobrands/peterborough/assets.js b/web/cobrands/peterborough/assets.js index b3cac5f6c..9470ea26f 100644 --- a/web/cobrands/peterborough/assets.js +++ b/web/cobrands/peterborough/assets.js @@ -51,6 +51,7 @@ OpenLayers.Layer.PeterboroughVectorAsset = OpenLayers.Class(OpenLayers.Layer.Vec }); var NEW_TREE_CATEGORY_NAME = 'Request for tree to be planted'; +var UNKNOWN_LIGHT_CATEGORY_NAME = 'Problem with a light not shown on map'; var trees_defaults = $.extend(true, {}, defaults, { class: OpenLayers.Layer.PeterboroughVectorAsset, @@ -106,4 +107,98 @@ fixmystreet.assets.add(defaults, { asset_item_message: '' }); +var streetlight_stylemap = new OpenLayers.StyleMap({ + 'default': fixmystreet.assets.style_default, + 'hover': fixmystreet.assets.style_default_hover, + 'select': fixmystreet.assets.construct_named_select_style("${UNITNO}") +}); + +var light_defaults = $.extend(true, {}, defaults, { + http_options: { + params: { + TYPENAME: "StreetLights" + } + }, + asset_id_field: 'UNITID', + asset_type: 'spot', + asset_item: 'light' +}); + +fixmystreet.assets.add(light_defaults, { + class: OpenLayers.Layer.PeterboroughVectorAsset, + stylemap: streetlight_stylemap, + feature_code: 'UNITNO', + attributes: { + asset_details: function() { + var a = this.attributes; + return "street: " + a.FULLSTREET + "\n" + + "locality: " + a.LOCALITY + "\n" + + "unitno: " + a.UNITNO + "\n" + + "unitid: " + a.UNITID; + } + }, + asset_group: 'Street lighting', + asset_category: 'Lighting enquiry', + relevant: function(options) { + return ( options.group === 'Street lighting' && + options.category !== UNKNOWN_LIGHT_CATEGORY_NAME + ) || options.category === "Lighting enquiry"; + }, + select_action: true, + actions: { + asset_found: function(asset) { + fixmystreet.message_controller.asset_found.call(this, asset); + fixmystreet.assets.named_select_action_found.call(this, asset); + }, + asset_not_found: function() { + fixmystreet.message_controller.asset_not_found.call(this); + fixmystreet.assets.named_select_action_not_found.call(this); + } + } +}); + +fixmystreet.assets.add(light_defaults, { + asset_category: UNKNOWN_LIGHT_CATEGORY_NAME, + disable_pin_snapping: true, + asset_item_message: '' +}); + +var bin_defaults = $.extend(true, {}, defaults, { + class: OpenLayers.Layer.PeterboroughVectorAsset, + select_action: true, + actions: { + asset_found: fixmystreet.message_controller.asset_found, + asset_not_found: fixmystreet.message_controller.asset_not_found + }, + attributes: { + asset_details: function() { + var a = this.attributes; + return a.Reference + ", " + a.Location; + }, + central_asset_id: 'OBJECTID' + }, + asset_id_field: 'OBJECTID', + asset_type: 'spot' +}); + +fixmystreet.assets.add(bin_defaults, { + http_options: { + params: { + TYPENAME: 'LitterBins' + } + }, + asset_category: 'Litter bin', + asset_item: 'litter bin' +}); + +fixmystreet.assets.add(bin_defaults, { + http_options: { + params: { + TYPENAME: 'DogBins' + } + }, + asset_category: 'Dog bin', + asset_item: 'dog waste bin' +}); + })(); diff --git a/web/cobrands/peterborough/base.scss b/web/cobrands/peterborough/base.scss index 67e199cca..9039cfd87 100644 --- a/web/cobrands/peterborough/base.scss +++ b/web/cobrands/peterborough/base.scss @@ -45,6 +45,7 @@ h1, h2 { } #postcodeForm { background-color: #fff; + padding-bottom: 0; div input#sub { background-color: $link-color; } @@ -53,17 +54,6 @@ h1, h2 { .form-hint { color: $primary_b; } - a#geolocate_link { - background-color: transparent; - padding: 0; - color: $link-color; - &:hover, - &:active, - &:focus { - background-color: transparent; - text-decoration: underline - } - } } .btn-primary, @@ -88,20 +78,6 @@ h1, h2 { font-weight: 700; } -a, -.fake-link { - color: $link-color; - - &:visited { - color: $link-visited-color; - } - - &:hover, - &:active { - color: $link-hover-color; - } -} - .dz-clickable .dz-message u { color: $link-color; } diff --git a/web/cobrands/peterborough/layout.scss b/web/cobrands/peterborough/layout.scss index 62486ab35..de5c5f9a9 100644 --- a/web/cobrands/peterborough/layout.scss +++ b/web/cobrands/peterborough/layout.scss @@ -29,14 +29,6 @@ body.frontpage #front-main { font-weight: normal; font-size: 1.5em; } - a#geolocate_link { - color: $link-color; - &:hover, - &:active, - &:focus { - color: $link-hover-color; - } - } } #postcodeForm .form-hint { diff --git a/web/cobrands/rutland/_colours.scss b/web/cobrands/rutland/_colours.scss index aabedb0f1..e81ce2554 100755 --- a/web/cobrands/rutland/_colours.scss +++ b/web/cobrands/rutland/_colours.scss @@ -14,6 +14,8 @@ $RCCbg: #F1F1F1; $primary: $RCCGreen; $primary_b: #000000; $primary_text: #222222; +$primary_link_color: $primary_text; +$primary_link_hover_color: rgba($primary_text, 0.8); $base_bg: $RCCbg; $base_fg: #000; diff --git a/web/cobrands/sass/_admin.scss b/web/cobrands/sass/_admin.scss index 4ae019776..e78820ae9 100644 --- a/web/cobrands/sass/_admin.scss +++ b/web/cobrands/sass/_admin.scss @@ -43,22 +43,6 @@ $button_bg_col: #a1a1a1; // also search bar (tables) text-align: center; font-weight: bold; } - tr.filter-row td { - display: none; /* TODO: reveal when filtering is implemented */ - padding: flip(4px 4px 4px 40px, 4px 40px 4px 4px); - background-color: $button_bg_col; - background-image: url('/cobrands/zurich/search-icon-white.png'); - background-position: flip(14px, right) center; - background-repeat: no-repeat; - border-bottom: 2px solid $table_border_color; - } - tr.filter-row td input[type=text] { - background-color: #e1e1e1; - width: 16em; - @include border-radius(4px); - border: none; - padding: 3px 0.5em; - } tr.is-deleted { background-color: #ffdddd; img { diff --git a/web/cobrands/sass/_base.scss b/web/cobrands/sass/_base.scss index b52b75f43..b5830ebfd 100644 --- a/web/cobrands/sass/_base.scss +++ b/web/cobrands/sass/_base.scss @@ -11,6 +11,9 @@ $link-visited-color: $link-color !default; $link-text-decoration: none !default; $link-hover-text-decoration: underline !default; +$primary_link_decoration: underline !default; +$primary_link_hover_decoration: $primary_link_decoration !default; + $itemlist_item_background: #f6f6f6 !default; $itemlist_item_background_hover: #e6e6e6 !default; $col_big_numbers: #666 !default; @@ -310,6 +313,9 @@ legend, box-shadow: none; color: #888888; } + &[disabled] { + background-color: #eee; + } } select.form-control { @@ -1966,6 +1972,15 @@ html.js #map .noscript { } } +#change_asset_mobile { + position: absolute; + bottom: 3em; + #{$left}: 0.25em; + padding: 0.25em; + color: #fff; + background-color: black; +} + .olControlAttribution { bottom: 3.25em !important; #{$right}: 0.25em !important; @@ -2181,6 +2196,10 @@ label .muted { margin-bottom: 0.5em; } + dd:last-child { + margin-bottom: 0; + } + .btn, .btn-primary { margin: 0.5em 0 1em 0; @@ -2373,26 +2392,19 @@ label .muted { } } } - a#geolocate_link { - @include inline-block; - vertical-align:top; - background:#1a1a1a; - color:#C8C8C8; - padding:0.5em; - font-family: $meta-font; - font-size: 0.8125em; - @include border-radius(0 0 0.25em 0.25em); + a { + text-decoration: $primary_link_decoration; &:hover { - text-decoration:none; - background:#2a2a2a; + text-decoration: $primary_link_hover_decoration; } } - a#geolocate_link.loading { - background: #1a1a1a url("/cobrands/fixmystreet/images/spinner-black.gif") flip(100%,0) 50% no-repeat; - border-#{$right}: solid 0.5em #1a1a1a; - padding-#{$right}: 1.5em; - } } + +a#geolocate_link { + display: inline-block; + padding: 0.5em; +} + .no-js #geolocate_link { display: none !important; } @@ -2817,3 +2829,4 @@ $nicetable-hover-background: rgba($primary, 0.15) !default; @import "_autocomplete"; @import "_dashboard"; @import "_top-banner"; +@import "_search-help"; diff --git a/web/cobrands/sass/_layout.scss b/web/cobrands/sass/_layout.scss index 02ded6fc1..8b3406d9d 100644 --- a/web/cobrands/sass/_layout.scss +++ b/web/cobrands/sass/_layout.scss @@ -13,6 +13,9 @@ $header-top-border: $header-top-border-width solid $primary !default; $container-max-width: 60em !default; +$primary_link_color: null !default; +$primary_link_hover_color: null !default; + .internal-link-fixed-header { display: block; position: relative; @@ -854,25 +857,11 @@ textarea.form-error { } } a { - color: inherit; - text-decoration: underline; - &:hover { - text-decoration: none; - } - } - a#geolocate_link { - color: inherit; - background:none; - text-decoration: none; - padding-bottom: 0; + color: $primary_link_color; &:hover { - text-decoration:underline; - background:none; + color: $primary_link_hover_color; } } - a#geolocate_link.loading { - border-#{$right}: none; - } } #front-howto { diff --git a/web/cobrands/sass/_search-help.scss b/web/cobrands/sass/_search-help.scss new file mode 100644 index 000000000..43bbf5a9e --- /dev/null +++ b/web/cobrands/sass/_search-help.scss @@ -0,0 +1,78 @@ +$search-help-alignment: center !default; +$search-help-background: transparent !default; +$search-help-color: inherit !default; +$search-help-margin: -1em -1em 0 -1em !default; // overlap .container padding +$search-help-margin-desktop: -1em -1em -2em -1em !default; // overlap .content and .tablewrapper padding-bottoms +$search-help-header-background: #DB3914 !default; +$search-help-header-color: #fff !default; +$search-help-header-font-weight: bold !default; +$search-help-header-font-size: 1em !default; +$search-help-header-font-size-desktop: $search-help-header-font-size !default; +$search-help-header-font-family: null !default; + +.search-help { + margin: $search-help-margin; + background: $search-help-background; + color: $search-help-color; + + // Override greedy `.tablewrapper > div` styles + .tablewrapper > & { + display: block; + width: auto; + } + + @media (min-width: 48em) { + margin: $search-help-margin-desktop; + } +} + +.search-help__header { + margin: 0; + text-align: $search-help-alignment; + background: $search-help-header-background; + color: $search-help-header-color; + font-family: $search-help-header-font-family; + font-weight: $search-help-header-font-weight; + font-size: $search-help-header-font-size; + padding: 1em; // IE8 + padding: 1rem; + + @media (min-width: 48em) { + font-size: $search-help-header-font-size-desktop; + } +} + +.search-help__tips { + overflow: auto; // expand to include margin-bottom on last child + + @media (min-width: 48em) { + @include flex-container(); + @if ( $search-help-alignment == left ) { + @include justify-content(flex-start); + } @else if ( $search-help-alignment == right ) { + @include justify-content(flex-end); + } @else { + @include justify-content(center); + padding: 1em 0; + } + } + + h3 { + margin-top: 0; + text-align: $search-help-alignment; + } +} + +.search-help__tips__category { + margin: 1em; + + @media (min-width: 48em) { + max-width: 20em; + } + + ul { + margin-bottom: 0; + font-size: 0.875em; + margin-left: 1em; + } +} diff --git a/web/cobrands/sass/_waste.scss b/web/cobrands/sass/_waste.scss new file mode 100644 index 000000000..70a73b255 --- /dev/null +++ b/web/cobrands/sass/_waste.scss @@ -0,0 +1,165 @@ +body.waste { + label, legend { + margin-top: 0; font-weight: normal !important; + } /* from base/h5bp */ + + input[type="text"].govuk-input--width-2 { + max-width: 5.4ex; + } + + input[type="text"].govuk-input--width-4 { + max-width: 9ex; + } + + input[type="text"].govuk-input { + font-size: 16px; + font-size: 1rem; + line-height: 1.25; + padding: 5px; + @media (min-width: 40.0625em) { + font-size: 19px; font-size: 1.1875rem; line-height: 1.31579; + } + } +} + +.waste__collections, +.waste__summary { + .govuk-summary-list { + font-size: 1em; + padding-bottom: 0.66em; + background-color: white; + } + + .govuk-summary-list__row { + background-color: white; + } + + .govuk-heading-m { + margin-bottom: 10px; + } + + .govuk-summary-list__key--sub { + padding-top: 10px; + font-weight: normal !important; /* Ugh */ + } +} + +.waste-service-image { + max-width: 100%; + max-height: 140px; + height: auto; + margin-bottom: 1em; +} + +.waste__summary { + .govuk-button--secondary { + font-size: 1em; + } + .govuk-summary-list__key { + vertical-align: middle; + } +} + +.govuk-select { + width: auto; + min-width: 5em; +} + +.waste__address { + font-size: 1.125em; + margin-bottom: 2em; +} + +.waste__address__title { + font-weight: normal; +} + +.waste__address__property { + font-weight: bold; +} + +.aside-services { + ul ul { + margin-top: 0.4em; + } +} +.waste { + .govuk-fieldset__heading { + font-size: 1.4375rem; + font-weight: bold; + } +} + +.waste-panel-toggle { + position: relative; + top: -1em; + margin-bottom: 0; + z-index: 1; +} + +.waste-services-launch-panel { + margin-bottom: 3em; + opacity: 1; + transform: translateY(0); + transition: all 200ms ease-out; + z-index: inherit; + position: relative; + max-width: 100%; + .js &.hidden-js { + display: block; + opacity: 0; + transform: translateY(-100%); + transition: all 200ms ease-in; + position: absolute; + } +} + +.waste-service-name.govuk-heading-m { + margin-top: 1.5em; + border-bottom: 1px solid #808080; + padding-bottom: 0.5em; +} + +.waste-service-descriptor { + font-family: $body-font; + display: block; + width: 100%; + margin-bottom: 0.5em; + padding: 0 0 0.25em 0; + border: 0; + border-bottom: 1px solid #e9e9e9; + -webkit-appearance: none; + background: transparent; + font-size: inherit; + text-align: left; + white-space: normal; + line-height: 1.5; + .content & { + font-weight: normal; + } +} + +.waste-service-link, +input[type="submit"].waste-service-link { + color: $link-color; + &:hover, + &:focus { + text-decoration: underline; + } + &:visited { + color: $link-color; + } +} + +.waste-service-name-link { + .waste & { + cursor: pointer; + margin-top: 0.5em; + margin-bottom: 0; + font-size: 1rem; + } +} + +.text-centered { + text-align: center; +} diff --git a/web/cobrands/stevenage/_colours.scss b/web/cobrands/stevenage/_colours.scss index 0bedded8a..bdbe7281b 100644 --- a/web/cobrands/stevenage/_colours.scss +++ b/web/cobrands/stevenage/_colours.scss @@ -16,3 +16,6 @@ $nav_hover_background_colour: #444; $col_click_map: #00BD08; $container-max-width: 984px; // to match Stevenage header width + +$search-help-background: #fff3f3; +$search-help-margin-desktop: -2em -2em 0 -2em; diff --git a/web/cobrands/tfl/_colours.scss b/web/cobrands/tfl/_colours.scss index 1cffc3f55..3e232b443 100644 --- a/web/cobrands/tfl/_colours.scss +++ b/web/cobrands/tfl/_colours.scss @@ -33,6 +33,7 @@ $primary_b: $johnston-black; $primary_text: $johnston-black; $link-color: $beck-blue; +$link-text-decoration: 'underline'; $link-hover-color: $blue-dark; $base_bg: $white; @@ -49,6 +50,11 @@ $col_fixed_label_dark: #4B8304; $header-top-border: false; +$search-help-alignment: left; +$search-help-background: $red-light; +$search-help-header-background: $red; +$search-help-margin-desktop: -1em -1em 0em -1em; + @mixin tflbutton { background: $beck-blue; border-radius: 22.5px; @@ -73,4 +79,4 @@ $header-top-border: false; background-color: $white; box-shadow: none; padding: 0.4em; -}
\ No newline at end of file +} diff --git a/web/cobrands/tfl/assets.js b/web/cobrands/tfl/assets.js index ad58c5c8a..ae7ba2ae5 100644 --- a/web/cobrands/tfl/assets.js +++ b/web/cobrands/tfl/assets.js @@ -64,6 +64,7 @@ var tlrn_categories = [ "Mobile Crane Operation", "Other (TfL)", "Pavement Defect (uneven surface / cracked paving slab)", + "Pavement Overcrowding", "Pothole", "Pothole (minor)", "Roadworks", @@ -71,6 +72,7 @@ var tlrn_categories = [ "Single Light out (street light)", "Standing water", "Street Light - Equipment damaged, pole leaning", + "Streetspace Feedback", "Unstable hoardings", "Unstable scaffolding", "Worn out road markings" diff --git a/web/cobrands/tfl/base.scss b/web/cobrands/tfl/base.scss index 9c573f331..2625596d5 100644 --- a/web/cobrands/tfl/base.scss +++ b/web/cobrands/tfl/base.scss @@ -55,10 +55,6 @@ h3 { line-height: 1.238095238em; //26px } -a, .fake-link { - text-decoration: underline; -} - .btn--primary, .btn, .green-btn { @@ -138,18 +134,6 @@ input.form-error, textarea.form-error { } } } - a#geolocate_link { - color: $beck-blue; - font-family: $heading-font; - text-decoration: underline; - font-size: 1.125em; - background: transparent; - &:hover, - &:active, - &:focus { - background: transparent; - } - } h2 { font-style: normal; font-family: $body-font; @@ -158,6 +142,11 @@ input.form-error, textarea.form-error { } } +a#geolocate_link { + font-family: $heading-font; + font-size: 1.125em; +} + .item-list__heading { font-family: $body-font; } diff --git a/web/cobrands/tfl/layout.scss b/web/cobrands/tfl/layout.scss index 8e3c6b5d8..751a71672 100644 --- a/web/cobrands/tfl/layout.scss +++ b/web/cobrands/tfl/layout.scss @@ -66,12 +66,6 @@ h1 { #postcodeForm div { margin: 0; } - a#geolocate_link { - color: $beck-blue; - font-family: $heading-font; - text-decoration: underline; - font-size: 1.125em; - } } .frontpage .content { diff --git a/web/cobrands/warwickshire/_colours.scss b/web/cobrands/warwickshire/_colours.scss index aac759179..760d919a4 100644 --- a/web/cobrands/warwickshire/_colours.scss +++ b/web/cobrands/warwickshire/_colours.scss @@ -32,3 +32,9 @@ $header-top-border: false; $mappage-header-height: 5em; $container-max-width: 78em; + +$search-help-alignment: left; +$search-help-background: #fff3f3; +$search-help-margin-desktop: 1em -1em 0 -1em; +$search-help-header-background: $warwickshire-red; +$search-help-header-font-size-desktop: 1.25em; diff --git a/web/cobrands/warwickshire/base.scss b/web/cobrands/warwickshire/base.scss index 224346195..53bae8431 100644 --- a/web/cobrands/warwickshire/base.scss +++ b/web/cobrands/warwickshire/base.scss @@ -79,31 +79,21 @@ } } } +} - a#geolocate_link { - padding: 0; - background: transparent; - font-size: 1em; - color: $link-color; - margin-top: 0.5em; - - &:hover { - background-color: transparent; - color: $link-hover-color; - } - - &:focus { - outline: 3px solid $warwickshire-yellow; - } +a#geolocate_link { + padding: 0; + margin-top: 0.5em; - &.loading, - &.loading:hover { - background: transparent url("/cobrands/warwickshire/images/spinner-f6f6f6-333333.gif") 100% 50% no-repeat; - padding: 0 1.5em 0 0; - border: none; - } + &:focus { + outline: 3px solid $warwickshire-yellow; } + &.loading, + &.loading:hover { + background: transparent url("/cobrands/warwickshire/images/spinner-f6f6f6-333333.gif") 100% 50% no-repeat; + padding: 0 1.5em 0 0; + } } .box-warning { diff --git a/web/cobrands/warwickshire/layout.scss b/web/cobrands/warwickshire/layout.scss index ac360f16d..fdf3524cd 100644 --- a/web/cobrands/warwickshire/layout.scss +++ b/web/cobrands/warwickshire/layout.scss @@ -43,18 +43,6 @@ margin: 1.5em 0 0.5em 0; } } - - a#geolocate_link { - color: $link-color; - - &:hover { - color: $link-hover-color; - } - - &:focus { - outline: 3px solid $warwickshire-yellow; - } - } } .site-footer__section { diff --git a/web/cobrands/westminster/_colours.scss b/web/cobrands/westminster/_colours.scss index be1779daa..8850593c2 100644 --- a/web/cobrands/westminster/_colours.scss +++ b/web/cobrands/westminster/_colours.scss @@ -35,4 +35,9 @@ $meta-font: $body-font; $mappage-header-height: 4.5em; -$high-dpi-screen: '-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi';
\ No newline at end of file +$high-dpi-screen: '-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi'; + +$search-help-alignment: left; +$search-help-background: #fff3f3; +$search-help-margin: 0 -1em; +$search-help-margin-desktop: 1em -1em 0 -1em; diff --git a/web/cobrands/westminster/base.scss b/web/cobrands/westminster/base.scss index c67a67f6d..01b7760e8 100644 --- a/web/cobrands/westminster/base.scss +++ b/web/cobrands/westminster/base.scss @@ -82,27 +82,16 @@ body.frontpage { } } - a#geolocate_link { - background: transparent; - display: block; - padding: 0; - margin-top: 0.5em; - font-family: inherit; - font-size: 1em; - border-radius: 0; - color: $westminster_blue; - - &:hover { - background: transparent; - text-decoration: underline; - } - } - .form-hint { color: inherit; } } +a#geolocate_link { + padding: 0; + margin-top: 0.5em; +} + #front-howto h2, #front-recently h2 { font-weight: bold; diff --git a/web/cobrands/westminster/layout.scss b/web/cobrands/westminster/layout.scss index 94483a523..6e5c30ced 100644 --- a/web/cobrands/westminster/layout.scss +++ b/web/cobrands/westminster/layout.scss @@ -36,10 +36,6 @@ } } -#front-main a#geolocate_link { - color: $westminster-blue; -} - body.mappage { #site-header { box-sizing: border-box; // count padding as part of height, so border-bottom is visible |