X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/c26b60c4c6ec77e903a25adcc8a2ddbd73aa2ebf..367fa44a74c06563b6f0e23c1e9db888769f57f0:/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 773145bed..eb351fa02 100644 --- a/app/assets/javascripts/leaflet.share.js +++ b/app/assets/javascripts/leaflet.share.js @@ -1,78 +1,415 @@ 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); - control.onAdd = function (map) { - var $container = $('
') - .attr('class', 'control-share'); + $("

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