diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/cobrands/bromley/layout.scss | 7 | ||||
-rw-r--r-- | web/cobrands/eastsussex/layout.scss | 41 | ||||
-rw-r--r-- | web/cobrands/greenwich/base.scss | 2 | ||||
-rw-r--r-- | web/cobrands/greenwich/layout.scss | 2 | ||||
-rw-r--r-- | web/cobrands/hart/hart.scss | 26 | ||||
-rw-r--r-- | web/cobrands/oxfordshire/layout.scss | 6 | ||||
-rw-r--r-- | web/cobrands/sass/_base.scss | 16 | ||||
-rw-r--r-- | web/cobrands/sass/_layout.scss | 2 | ||||
-rw-r--r-- | web/cobrands/sass/_report_list.scss | 129 | ||||
-rw-r--r-- | web/cobrands/sass/_report_list_pins.scss | 111 | ||||
-rw-r--r-- | web/cobrands/stevenage/layout.scss | 8 | ||||
-rw-r--r-- | web/js/map-OpenLayers.js | 5 | ||||
-rw-r--r-- | web/js/moderate.js | 12 |
13 files changed, 145 insertions, 222 deletions
diff --git a/web/cobrands/bromley/layout.scss b/web/cobrands/bromley/layout.scss index 4b61f8ee9..cd6c174db 100644 --- a/web/cobrands/bromley/layout.scss +++ b/web/cobrands/bromley/layout.scss @@ -1,8 +1,6 @@ @import "_colours"; @import "../sass/layout"; - -// Import the new filters/list styling -@import "../sass/_report_list.scss"; +@import "../sass/report_list_pins"; // Alter the logo and the header on every page *but* the map page. On the map // page it stays small like in base.css @@ -71,11 +69,10 @@ body.alertindex form.full-width { body.mappage #user-meta p { background-color: $bromley_blue; border-bottom: 1px solid #444; - left: 2.65em; } // And also override the banner on other pages so that it lines up properly -#user-meta { +#user-meta, body.mappage #user-meta { max-width: 1200px; } #user-meta p, diff --git a/web/cobrands/eastsussex/layout.scss b/web/cobrands/eastsussex/layout.scss index 3ccfb3f6a..d90a617f1 100644 --- a/web/cobrands/eastsussex/layout.scss +++ b/web/cobrands/eastsussex/layout.scss @@ -211,42 +211,6 @@ body.twothirdswidthpage .content aside { margin-top: 3em; /* required to push "Your Reports" visible on Safari/IE */ } -#main-nav { - margin-top: 106px; - ul { - margin-left: 157px; - float: none; - } -} - -#main-nav ul li { - text-align: center; - text-transform: uppercase; - padding: 0 15px; - font-size: 16px; - border-right: solid 1px white; - line-height: 1.5em; -} - -#main-nav ul li a { - padding: 0; - font-size: inherit; -} - -#main-nav ul li:last-child { - border-right: none; -} - -#main-nav ul li a:link, #main-nav ul li a:visited { - color: #fff; -} - -#main-nav ul li:hover, #main-nav ul li:hover a, { - background-color: white; - color: black; - text-decoration: none; -} - .main-menu-wrapper { display: none; } @@ -254,11 +218,6 @@ body.twothirdswidthpage .content aside { @media only screen and (max-width: 61em) { - #main-nav { - padding-left: 0px; - float:none; - } - #site-header { height: auto; } diff --git a/web/cobrands/greenwich/base.scss b/web/cobrands/greenwich/base.scss index 844cf2762..3d8dc29ba 100644 --- a/web/cobrands/greenwich/base.scss +++ b/web/cobrands/greenwich/base.scss @@ -29,7 +29,7 @@ body.frontpage #site-logo, background-size: cover; } -.issue-list-a li, .list-a li, #user-meta p, #front-main #postcodeForm { +.issue-list-a li, #user-meta p, #front-main #postcodeForm { background-color: $greenwich_light_grey; } diff --git a/web/cobrands/greenwich/layout.scss b/web/cobrands/greenwich/layout.scss index df5437968..894b82a33 100644 --- a/web/cobrands/greenwich/layout.scss +++ b/web/cobrands/greenwich/layout.scss @@ -1,7 +1,7 @@ @import "_colours"; @import "_fonts"; @import "../sass/layout"; -@import "../sass/report_list"; +@import "../sass/report_list_pins"; $fixed_page_width: 990px; diff --git a/web/cobrands/hart/hart.scss b/web/cobrands/hart/hart.scss index 0823a4bc5..7cd7306cc 100644 --- a/web/cobrands/hart/hart.scss +++ b/web/cobrands/hart/hart.scss @@ -76,14 +76,13 @@ body.frontpage .nav-wrapper-2 { #main-nav { margin-top: 106px; - - ul { - margin-left: 157px; - float: none; - } + } + .nav-menu { + margin-left: 157px; + float: none; } - #main-nav ul li { + .nav-menu li { text-align: center; text-transform: uppercase; padding: 0 15px; @@ -91,21 +90,16 @@ body.frontpage .nav-wrapper-2 { border-right: solid 1px white; line-height: 1.5em; } - - #main-nav ul li a { - padding: 0; - font-size: inherit; - } - - #main-nav ul li:last-child { + .nav-menu li:last-child { border-right: none; } - #main-nav ul li a:link, #main-nav ul li a:visited { - color: #fff; + .nav-menu a { + padding: 0; + font-size: inherit; } - #main-nav ul li:hover, #main-nav ul li:hover a, { + .nav-menu li:hover, .nav-menu li:hover a, { background-color: white; color: black; text-decoration: none; diff --git a/web/cobrands/oxfordshire/layout.scss b/web/cobrands/oxfordshire/layout.scss index 75a31e461..04890b1aa 100644 --- a/web/cobrands/oxfordshire/layout.scss +++ b/web/cobrands/oxfordshire/layout.scss @@ -1,6 +1,6 @@ @import "_colours"; @import "../sass/layout"; -@import "../sass/report_list"; +@import "../sass/report_list_pins"; body, body a { font-family:"Trebuchet MS",Arial, Helvetica, sans-serif; @@ -266,7 +266,7 @@ body.mappage { } } -.report-list, .issue-list-a { +.issue-list-a { li:after { background-color: $oxfordshire_mid_grey_green; } @@ -287,7 +287,7 @@ h4.static-with-rule { background: transparent; margin-top: 0; // no space between list items - // Replicate .report-list styling, a bit + // Replicate .issue-list-a styling, a bit border-top: 1px solid $oxfordshire_mid_grey_green; padding: 1em 1em 1em 0; margin-left: 1em; diff --git a/web/cobrands/sass/_base.scss b/web/cobrands/sass/_base.scss index 60a70f77e..301f6fdce 100644 --- a/web/cobrands/sass/_base.scss +++ b/web/cobrands/sass/_base.scss @@ -7,6 +7,7 @@ $image-sprite: '/cobrands/fixmystreet/images/sprite.png' !default; $menu-image: 'menu-white' !default; @import "_mixins"; +@import "_report_list"; body { font-family: $body-font; @@ -865,9 +866,8 @@ input.final-submit { padding: 0; border-bottom: 0.25em solid $primary; li { - list-style: none; - margin:0; - padding:0; + list-style: none; + padding: 0; margin: 0.25em 0 0; /* see note below about this */ display:table; @@ -882,7 +882,7 @@ input.final-submit { a { color:#222222; } - a:hover { + a:hover, a:focus { color:#222222; background-color:#e6e6e6; text-decoration: none; @@ -919,13 +919,7 @@ input.final-submit { } } } -.list-a { - @extend .issue-list-a; - a { - padding:0.5em 1em; - font-weight:bold; - } -} + //display:table fixes .ie6, .ie7 { .issue-list-a { diff --git a/web/cobrands/sass/_layout.scss b/web/cobrands/sass/_layout.scss index 806f1408c..c9cc3610d 100644 --- a/web/cobrands/sass/_layout.scss +++ b/web/cobrands/sass/_layout.scss @@ -1116,7 +1116,7 @@ body.frontpage { // Left padding is to ensure no overlap of the site-logo // Background styling replicates header styling - #main-nav{ + #main-nav { width: auto; float: $right; padding-#{$left}: 180px; diff --git a/web/cobrands/sass/_report_list.scss b/web/cobrands/sass/_report_list.scss index 0ba69fd4b..8d34bfd77 100644 --- a/web/cobrands/sass/_report_list.scss +++ b/web/cobrands/sass/_report_list.scss @@ -1,6 +1,3 @@ -// You should @import this file in a cobrand's layout.scss if it's using -// the new-style combined report list with category/status filters. - .report-list-filters { padding: 1em 1em 0; margin-bottom: 0.5em; @@ -33,129 +30,3 @@ max-width: 13em; } } - -.report-list, .issue-list-a { - margin-#{$left}: 0; - - li { - list-style: none; - position: relative; - margin: 0; - background: none; - - a { - display: block; - padding: 1em; - padding-#{$left}: 4em; - border-#{$left}: solid 1em transparent; - background: transparent url(/i/pin-yellow-small.png) no-repeat $left center; - - &:hover, &:focus { - text-decoration: none; - } - } - - &.yellow a { - background-image: url(/i/pin-yellow-small.png); - } - &.green a { - background-image: url(/i/pin-green-small.png); - } - &.red a { - background-image: url(/i/pin-red-small.png); - } - &.grey a { - background-image: url(/i/pin-grey-small.png); - } - - &.empty p { - display: block; - padding: 1em; - font-size: 1em; - text-align: center; - } - - &:after { - content: ""; - display: block; - height: 1px; - position: absolute; - #{$left}: 4em; - #{$right}: 0; - bottom: 0; - background-color: #e5e5e5; - } - - &.empty:after { - #{$left}: 0; - } - } - - h3, p { - margin: 0; - } - - h3 { - color: $primary; - margin-bottom: 0.2em; - } - - p { - font-size: 0.8em; - color: #777; - } -} - -// On the /my page, we use a .issue-list with an extra full-width modifier -// which removes the left padding. However, our new reports list still needs -// it: -.issue-list-a.full-width { - margin-#{$left}: -1em; -} - -.big-green-banner { - display: none; // hide the empty banner by default - - &.mobile-map-banner { - display: block; // show it again once the mobile javascript adds this class - } -} - -.click-the-map { - color: #000; - margin: -10px -1em 0; // overlap padding on parents - padding: 18px; - border-bottom: 1px solid #e5e5e5; - // TODO This is not right-to-left enabled yet - background: #fff url('/i/click-map-chevron-big.gif') 90% 12px no-repeat; - - h2 { - font-family: inherit; - margin: 0 0 5px; - } - - p { - margin: 0; - font-size: 18px; - line-height: 20px; - color: $primary; - padding-#{$right}: 20px; - // TODO This is not right-to-left enabled yet, image wise - background: transparent url('/i/click-map-chevron-small.gif') $right center no-repeat; - display: inline-block; - } - - img { - // the little chevron icon - vertical-align: -1px; - margin-#{$left}: 0.2em; - } -} - -body.frontpage { - .issue-list-a, .list-a { - li .text { - padding-#{$left}: 3em; - } - } -} diff --git a/web/cobrands/sass/_report_list_pins.scss b/web/cobrands/sass/_report_list_pins.scss new file mode 100644 index 000000000..f1948775b --- /dev/null +++ b/web/cobrands/sass/_report_list_pins.scss @@ -0,0 +1,111 @@ +.issue-list-a { + li { + position: relative; + margin: 0; + background: none; + + a { + display: block; + padding: 1em; + padding-#{$left}: 4em; + border-#{$left}: solid 1em transparent; + background: transparent url(/i/pin-yellow-small.png) no-repeat $left center; + } + + &.yellow a { + background-image: url(/i/pin-yellow-small.png); + } + &.green a { + background-image: url(/i/pin-green-small.png); + } + &.red a { + background-image: url(/i/pin-red-small.png); + } + &.grey a { + background-image: url(/i/pin-grey-small.png); + } + + &.empty p { + display: block; + padding: 1em; + font-size: 1em; + text-align: center; + } + + &:after { + content: ""; + display: block; + height: 1px; + position: absolute; + #{$left}: 4em; + #{$right}: 0; + bottom: 0; + background-color: #e5e5e5; + } + + &.empty:after { + #{$left}: 0; + } + } + + h3, p { + margin: 0; + } + + h3 { + color: $primary; + margin-bottom: 0.2em; + } + + p { + font-size: 0.8em; + color: #777; + } +} + +.big-green-banner { + display: none; // hide the empty banner by default + + &.mobile-map-banner { + display: block; // show it again once the mobile javascript adds this class + } +} + +.click-the-map { + color: #000; + margin: -10px -1em 0; // overlap padding on parents + padding: 18px; + border-bottom: 1px solid #e5e5e5; + // TODO This is not right-to-left enabled yet + background: #fff url('/i/click-map-chevron-big.gif') 90% 12px no-repeat; + + h2 { + font-family: inherit; + margin: 0 0 5px; + } + + p { + margin: 0; + font-size: 18px; + line-height: 20px; + color: $primary; + padding-#{$right}: 20px; + // TODO This is not right-to-left enabled yet, image wise + background: transparent url('/i/click-map-chevron-small.gif') $right center no-repeat; + display: inline-block; + } + + img { + // the little chevron icon + vertical-align: -1px; + margin-#{$left}: 0.2em; + } +} + +body.frontpage { + .issue-list-a { + li .text { + padding-#{$left}: 3em; + } + } +} diff --git a/web/cobrands/stevenage/layout.scss b/web/cobrands/stevenage/layout.scss index 49529dd49..17ef6a4c3 100644 --- a/web/cobrands/stevenage/layout.scss +++ b/web/cobrands/stevenage/layout.scss @@ -37,10 +37,8 @@ } // d523b431 -#main-nav { - ul { - float: none; - } +.nav-menu { + float: none; } .nav-menu a, .nav-menu span { margin: 0; @@ -224,7 +222,9 @@ body.frontpage { // d523b431 #main-nav { float: left; + padding-left: 0; } + .nav-wrapper { .nav-wrapper-2 { @include background(linear-gradient(#222, #555 30%, #555 60%, #222)); diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js index 63ef7324d..3cd54bc23 100644 --- a/web/js/map-OpenLayers.js +++ b/web/js/map-OpenLayers.js @@ -552,13 +552,10 @@ OpenLayers.Format.FixMyStreet = OpenLayers.Class(OpenLayers.Format.JSON, { } else { obj = json; } - var current, current_near; + var current; if (typeof(obj.current) != 'undefined' && (current = document.getElementById('current'))) { current.innerHTML = obj.current; } - if (typeof(obj.current_near) != 'undefined' && (current_near = document.getElementById('current_near'))) { - current_near.innerHTML = obj.current_near; - } return fms_markers_list( obj.pins, false ); }, CLASS_NAME: "OpenLayers.Format.FixMyStreet" diff --git a/web/js/moderate.js b/web/js/moderate.js index 075766d0b..dd366df3f 100644 --- a/web/js/moderate.js +++ b/web/js/moderate.js @@ -1,12 +1,7 @@ -$(function () { - setup_moderation( $('.problem-header'), 'problem' ); - setup_moderation( $('.issue-list .issue'), 'update' ); -}); - function setup_moderation (elem, word) { elem.each( function () { - var $elem = $(this) + var $elem = $(this); $elem.find('.moderate').click( function () { $elem.find('.moderate-display').hide(); $elem.find('.moderate-edit').show(); @@ -40,3 +35,8 @@ function setup_moderation (elem, word) { }); }); } + +$(function () { + setup_moderation( $('.problem-header'), 'problem' ); + setup_moderation( $('.issue-list .issue'), 'update' ); +}); |