]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/leaflet.layers.js
Changed directions close button to Bootstrap
[rails.git] / app / assets / javascripts / leaflet.layers.js
index 241880a20ebe874f302dfc0c4249bddf251df52c..5e541f1e5821885c9b4e5bc15d6ca18e96cf4e03 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>")
@@ -34,7 +33,7 @@ L.OSM.layers = function (options) {
       .attr("class", "section base-layers")
       .appendTo($ui);
 
-    var baseLayers = $("<ul>")
+    var baseLayers = $("<ul class='list-unstyled'>")
       .appendTo(baseSection);
 
     layers.forEach(function (layer) {
@@ -116,10 +115,10 @@ L.OSM.layers = function (options) {
 
       $("<p>")
         .text(I18n.t("javascripts.map.layers.overlays"))
-        .attr("class", "deemphasize")
+        .attr("class", "text-muted")
         .appendTo(overlaySection);
 
-      var overlays = $("<ul>")
+      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);