From: John Firebaugh Date: Sun, 29 Sep 2013 22:45:18 +0000 (-0700) Subject: Fixes X-Git-Tag: live~4661^2~254 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/53e4d600e712dea988028a12f68927c3400a6901?ds=sidebyside Fixes --- diff --git a/app/assets/javascripts/user.js b/app/assets/javascripts/user.js index d31f5bb82..80b505915 100644 --- a/app/assets/javascripts/user.js +++ b/app/assets/javascripts/user.js @@ -1,3 +1,5 @@ +//= require leaflet.locate + $(document).ready(function () { var map = L.map("map", { attributionControl: false, @@ -7,6 +9,13 @@ $(document).ready(function () { L.OSM.zoom() .addTo(map); + L.control.locate({ + strings: { + title: I18n.t('javascripts.map.locate.title'), + popup: I18n.t('javascripts.map.locate.popup') + } + }).addTo(map); + if (OSM.home) { map.setView([OSM.home.lat, OSM.home.lon], 12); } else { diff --git a/app/assets/stylesheets/common.css.scss b/app/assets/stylesheets/common.css.scss index 20648a8ef..bab99fdaf 100644 --- a/app/assets/stylesheets/common.css.scss +++ b/app/assets/stylesheets/common.css.scss @@ -304,6 +304,7 @@ header { height: $headerHeight; position: relative; border-bottom: $keyline; + z-index: 1001; h1, nav, nav > ul, nav > ul > li, .dropdown { display: inline-block; @@ -580,13 +581,12 @@ nav.secondary { border-radius: 4px 0 0 0; } -.site .leaflet-control .zoomout, +.leaflet-control .zoomout, .control-key .control-button { margin-bottom: 0; border-radius: 0; } -.leaflet-control .zoomout, // For non-main page maps .control-locate .control-button, .control-share .control-button { border-radius: 0 0 0 4px; @@ -768,6 +768,8 @@ nav.secondary { /* Rules for the sidebar */ #sidebar { + border-right: $keyline; + .alert { background: #e00; } @@ -777,6 +779,10 @@ nav.secondary { border-bottom: $keyline; } + h4 { + font-weight: normal; + } + .icon.close { position: absolute; right: $lineheight; @@ -1073,12 +1079,6 @@ ul.results-list li { border-bottom: 1px solid #ccc; } float: right; } -.content_map #small_map { - height: 100%; - width: 100%; - margin-bottom: $lineheight; -} - /* Rules for the changeset list shown by the history tab etc */ diff --git a/app/assets/stylesheets/small.css.scss b/app/assets/stylesheets/small.css.scss index 5c4d72e43..1222ac298 100644 --- a/app/assets/stylesheets/small.css.scss +++ b/app/assets/stylesheets/small.css.scss @@ -59,11 +59,6 @@ h2, h3, h4 { min-height: auto; } -.content_map #small_map { - height: 300px; - border: 1px solid #ccc; -} - .leaflet-control-pan, .leaflet-control-zoomslider { display: none; }