X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/dc24f6c2195c6053efd43778d53ae68984e54107..032f6f9870c5c3f71582f90d6bf22ec68a74848e:/app/assets/javascripts/leaflet.share.js?ds=sidebyside diff --git a/app/assets/javascripts/leaflet.share.js b/app/assets/javascripts/leaflet.share.js index 5fb189a76..40ba020e6 100644 --- a/app/assets/javascripts/leaflet.share.js +++ b/app/assets/javascripts/leaflet.share.js @@ -8,9 +8,10 @@ L.OSM.share = function (options) { control.onAddPane = function (map, button, $ui) { // Link / Embed + $("#content").addClass("overlay-right-sidebar"); var $linkSection = $("
") - .attr("class", "section share-link") + .attr("class", "share-link p-3 border-bottom border-secondary-subtle") .appendTo($ui); $("

") @@ -46,10 +47,13 @@ L.OSM.share = function (options) { .text(I18n.t("javascripts.share.short_link"))) .append($("") .attr("for", "embed_html") + .attr("id", "embed_link") + .attr("data-bs-title", I18n.t("javascripts.site.embed_html_disabled")) .attr("href", "#") .text(I18n.t("javascripts.share.embed"))) .on("click", "a", function (e) { e.preventDefault(); + if (!$(this).hasClass("btn-primary")) return; var id = "#" + $(this).attr("for"); $(this).siblings("a") .removeClass("active"); @@ -69,6 +73,7 @@ L.OSM.share = function (options) { .attr("id", "long_input") .attr("type", "text") .attr("class", "form-control form-control-sm font-monospace") + .attr("readonly", true) .on("click", select)); $("
") @@ -79,6 +84,7 @@ L.OSM.share = function (options) { .attr("id", "short_input") .attr("type", "text") .attr("class", "form-control form-control-sm font-monospace") + .attr("readonly", true) .on("click", select)); $("
") @@ -89,16 +95,17 @@ L.OSM.share = function (options) { $("