X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/c26b60c4c6ec77e903a25adcc8a2ddbd73aa2ebf..dc24f6c2195c6053efd43778d53ae68984e54107:/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..5fb189a76 100644 --- a/app/assets/javascripts/leaflet.share.js +++ b/app/assets/javascripts/leaflet.share.js @@ -1,78 +1,400 @@ 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($("