X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/feeb135760abdbfef0eea193318566d9d96f2523..6f762ae184385413e142e5b2b1e4399007dc8a67:/app/assets/javascripts/leaflet.share.js
diff --git a/app/assets/javascripts/leaflet.share.js b/app/assets/javascripts/leaflet.share.js
index 441acfd74..d4c829532 100644
--- a/app/assets/javascripts/leaflet.share.js
+++ b/app/assets/javascripts/leaflet.share.js
@@ -13,7 +13,7 @@ L.OSM.share = function (options) {
var button = $('')
.attr('class', 'control-button')
.attr('href', '#')
- .attr('title', 'Share')
+ .attr('title', I18n.t('javascripts.share.title'))
.html('')
.on('click', toggle)
.appendTo($container);
@@ -25,10 +25,9 @@ L.OSM.share = function (options) {
.attr('class', 'sidebar_heading')
.appendTo($ui)
.append(
- $('')
+ $('')
.text(I18n.t('javascripts.close'))
- .attr('class', 'sidebar_close')
- .attr('href', '#')
+ .attr('class', 'icon close')
.bind('click', toggle))
.append(
$('')
@@ -231,6 +230,7 @@ L.OSM.share = function (options) {
update();
options.sidebar.togglePane($ui, button);
+ $('.leaflet-control .control-button').tooltip('hide');
}
function toggleMarker() {
@@ -296,14 +296,16 @@ L.OSM.share = function (options) {
};
if (map.hasLayer(marker)) {
- params.marker = marker.getLatLng().lat + ',' + marker.getLatLng().lng;
+ var latLng = marker.getLatLng().wrap();
+ params.marker = latLng.lat + ',' + latLng.lng;
}
$('#embed_html').val(
'
' +
- '' +
+ escapeHTML(I18n.t('javascripts.share.view_larger_map')) + '');
// Image