diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/cobrands/fixmystreet.com/layout.scss | 4 | ||||
-rw-r--r-- | web/cobrands/fixmystreet.com/posters.scss | 8 | ||||
-rw-r--r-- | web/js/map-OpenLayers.js | 11 |
3 files changed, 19 insertions, 4 deletions
diff --git a/web/cobrands/fixmystreet.com/layout.scss b/web/cobrands/fixmystreet.com/layout.scss index 848490e7a..f8026171d 100644 --- a/web/cobrands/fixmystreet.com/layout.scss +++ b/web/cobrands/fixmystreet.com/layout.scss @@ -307,6 +307,10 @@ body.unresponsive-council { .mysoc-footer { margin-top: 3em; + // The below lines are so that on e.g. /about/posters the footer will move on + // top of the fixed sidebar in narrow height situations. + position: relative; + z-index: 1; } body.mappage .mysoc-footer { display: none; diff --git a/web/cobrands/fixmystreet.com/posters.scss b/web/cobrands/fixmystreet.com/posters.scss index ee8da9d32..8a1061c06 100644 --- a/web/cobrands/fixmystreet.com/posters.scss +++ b/web/cobrands/fixmystreet.com/posters.scss @@ -16,11 +16,11 @@ body.goodies { color: mix($primary, #000, 40%); } } - } - h2 { - padding-top: 1em; - border-top: 1px solid mix($primary, #eee, 20%); + h2 { + padding-top: 1em; + border-top: 1px solid mix($primary, #eee, 20%); + } } .pack-preview { diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js index f5f5f2934..1379d0fa5 100644 --- a/web/js/map-OpenLayers.js +++ b/web/js/map-OpenLayers.js @@ -643,6 +643,17 @@ OpenLayers.Protocol.FixMyStreet = OpenLayers.Class(OpenLayers.Protocol.HTTP, { /* Pan data handler */ OpenLayers.Format.FixMyStreet = OpenLayers.Class(OpenLayers.Format.JSON, { read: function(json, filter) { + // Check we haven't received the data after the map has been clicked. + if (fixmystreet.page == 'new') { + // If we have, we want to do nothing, which means returning an + // array of the back-projected version of the current pin + var pin = fixmystreet.markers.features[0].clone(); + pin.geometry.transform( + fixmystreet.map.getProjectionObject(), + new OpenLayers.Projection("EPSG:4326") + ); + return [ pin ]; + } if (typeof json == 'string') { obj = OpenLayers.Format.JSON.prototype.read.apply(this, [json, filter]); } else { |