X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/feeb135760abdbfef0eea193318566d9d96f2523..0a040c7a79512ceb1120b88723a6a5ac146ef1c5:/app/assets/javascripts/leaflet.key.js?ds=inline
diff --git a/app/assets/javascripts/leaflet.key.js b/app/assets/javascripts/leaflet.key.js
index d88ce5d6e..3f71932fb 100644
--- a/app/assets/javascripts/leaflet.key.js
+++ b/app/assets/javascripts/leaflet.key.js
@@ -6,9 +6,8 @@ L.OSM.key = function (options) {
.attr('class', 'control-key');
var button = $('')
- .attr('class', 'control-button')
+ .attr('class', 'control-button mobile-hide')
.attr('href', '#')
- .attr('title', I18n.t('javascripts.key.tooltip'))
.html('')
.on('click', toggle)
.appendTo($container);
@@ -20,10 +19,9 @@ L.OSM.key = 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(
$('')
@@ -61,8 +59,12 @@ L.OSM.key = function (options) {
}
function updateButton() {
- var layer = map.getMapBaseLayerId();
- button.toggleClass('disabled', layer !== 'mapnik');
+ var disabled = map.getMapBaseLayerId() !== 'mapnik'
+ button
+ .toggleClass('disabled', disabled)
+ .attr('data-original-title', I18n.t(disabled ?
+ 'javascripts.key.tooltip_disabled' :
+ 'javascripts.key.tooltip'))
}
function update() {