]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/leaflet.layers.js
Merge pull request #3581 from harry-wood/discourage-note-report
[rails.git] / app / assets / javascripts / leaflet.layers.js
index ddcce195daba2d5f7724d2b81ab876d51d6efeeb..038205ca4975d16e593b89d4b0278fef61062367 100644 (file)
@@ -22,9 +22,8 @@ L.OSM.layers = 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>")
@@ -119,7 +118,7 @@ L.OSM.layers = function (options) {
         .attr("class", "text-muted")
         .appendTo(overlaySection);
 
-      var overlays = $("<ul class='list-unstyled'>")
+      var overlays = $("<ul class='list-unstyled form-check'>")
         .appendTo(overlaySection);
 
       var addOverlay = function (layer, name, maxArea) {
@@ -130,12 +129,14 @@ L.OSM.layers = function (options) {
           .appendTo(overlays);
 
         var label = $("<label>")
+          .attr("class", "form-check-label")
           .appendTo(item);
 
         var checked = map.hasLayer(layer);
 
         var input = $("<input>")
           .attr("type", "checkbox")
+          .attr("class", "form-check-input")
           .prop("checked", checked)
           .appendTo(label);
 
@@ -169,7 +170,7 @@ L.OSM.layers = function (options) {
           }
 
           $(item).attr("class", disabled ? "disabled" : "");
-          item.attr("data-original-title", disabled ?
+          item.attr("data-bs-original-title", disabled ?
             I18n.t("javascripts.site.map_" + name + "_zoom_in_tooltip") : "");
         });
       };