]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/leaflet.key.js
Merge pull request #3581 from harry-wood/discourage-note-report
[rails.git] / app / assets / javascripts / leaflet.key.js
index 321f937db3fc74b94013be51a69a2f28388e6ea7..367c39c1462067ab74ed7fdad466b0814a5b75fa 100644 (file)
@@ -19,9 +19,8 @@ L.OSM.key = function (options) {
       .attr("class", "sidebar_heading")
       .appendTo($ui)
       .append(
-        $("<span>")
-          .text(I18n.t("javascripts.close"))
-          .attr("class", "icon close")
+        $("<button type='button' class='btn-close float-end mt-1'>")
+          .attr("aria-label", I18n.t("javascripts.close"))
           .bind("click", toggle))
       .append(
         $("<h4>")
@@ -63,15 +62,15 @@ L.OSM.key = function (options) {
       var disabled = ["mapnik", "cyclemap"].indexOf(map.getMapBaseLayerId()) === -1;
       button
         .toggleClass("disabled", disabled)
-        .attr("data-original-title",
+        .attr("data-bs-original-title",
               I18n.t(disabled ?
-                     "javascripts.key.tooltip_disabled" :
-                     "javascripts.key.tooltip"));
+                "javascripts.key.tooltip_disabled" :
+                "javascripts.key.tooltip"));
     }
 
     function update() {
       var layer = map.getMapBaseLayerId(),
-        zoom = map.getZoom();
+          zoom = map.getZoom();
 
       $(".mapkey-table-entry").each(function () {
         var data = $(this).data();