]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/leaflet.share.js
Merge pull request #3694 from AntonKhorev/share-button-group
[rails.git] / app / assets / javascripts / leaflet.share.js
index e941a70f41ae2a492e522b7c689dbfa4557244bf..b9c48f15a8a3227208da6466fb247a54cf19b547 100644 (file)
@@ -35,26 +35,25 @@ L.OSM.share = function (options) {
               .bind("change", toggleMarker))
           .append(I18n.t("javascripts.share.include_marker")));
 
-    $("<div>")
-      .attr("class", "share-tabs")
+    $("<div class='btn-group btn-group-sm mb-2'>")
       .appendTo($form)
-      .append($("<a>")
-        .attr("class", "active")
+      .append($("<a class='btn btn-primary'>")
+        .addClass("active")
         .attr("for", "long_input")
         .attr("id", "long_link")
         .text(I18n.t("javascripts.share.long_link")))
-      .append($("<a>")
+      .append($("<a class='btn btn-primary'>")
         .attr("for", "short_input")
         .attr("id", "short_link")
         .text(I18n.t("javascripts.share.short_link")))
-      .append($("<a>")
+      .append($("<a class='btn btn-primary'>")
         .attr("for", "embed_html")
         .attr("href", "#")
         .text(I18n.t("javascripts.share.embed")))
       .on("click", "a", function (e) {
         e.preventDefault();
         var id = "#" + $(this).attr("for");
-        $linkSection.find(".share-tabs a")
+        $(this).siblings("a")
           .removeClass("active");
         $(this).addClass("active");
         $linkSection.find(".share-tab")