X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/9172695f7f94bb60dd01455a922e22d181eb284e..ab4de87d1eef4546a96738154cf81b7d7f72d988:/app/assets/javascripts/leaflet.share.js diff --git a/app/assets/javascripts/leaflet.share.js b/app/assets/javascripts/leaflet.share.js index 1434743d0..b9c48f15a 100644 --- a/app/assets/javascripts/leaflet.share.js +++ b/app/assets/javascripts/leaflet.share.js @@ -1,69 +1,383 @@ L.OSM.share = function (options) { - var control = L.control(options); + var control = L.OSM.sidebarPane(options, "share", "javascripts.share.title", "javascripts.share.title"), + marker = L.marker([0, 0], { draggable: true }), + locationFilter = new L.LocationFilter({ + enableButton: false, + adjustButton: false + }); + + control.onAddPane = function (map, button, $ui) { + // Link / Embed + + var $linkSection = $("
") + .attr("class", "section share-link") + .appendTo($ui); + + $("

") + .text(I18n.t("javascripts.share.link")) + .appendTo($linkSection); + + var $form = $("
") + .appendTo($linkSection); + + $("
") + .attr("class", "form-check mb-3") + .appendTo($form) + .append( + $("