X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e96a64ca9c2ea068dd9167e074ee26c8d28744b4..367fa44a74c06563b6f0e23c1e9db888769f57f0:/app/assets/javascripts/leaflet.share.js diff --git a/app/assets/javascripts/leaflet.share.js b/app/assets/javascripts/leaflet.share.js index 7efe12e0c..eb351fa02 100644 --- a/app/assets/javascripts/leaflet.share.js +++ b/app/assets/javascripts/leaflet.share.js @@ -1,71 +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($("