X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/71e7208a0aceccf47edce739803130096999da5d..0a98d08885bff899ed9e8fe2008ba26b7b13469a:/app/assets/javascripts/leaflet.share.js diff --git a/app/assets/javascripts/leaflet.share.js b/app/assets/javascripts/leaflet.share.js index c518eb4e9..b92d70796 100644 --- a/app/assets/javascripts/leaflet.share.js +++ b/app/assets/javascripts/leaflet.share.js @@ -1,24 +1,17 @@ L.OSM.share = function (options) { - var control = L.OSM.sidebarPane(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.onAdd = function (map) { - var $container = $("
") - .attr("class", "control-share"); - - var button = this.makeButton("share", "javascripts.share.title", toggle) - .appendTo($container); - - var $ui = this.makeUI("share-ui", "javascripts.share.title", toggle); - + 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); $("

") @@ -31,38 +24,38 @@ L.OSM.share = function (options) { $("
") .attr("class", "form-check mb-3") .appendTo($form) - .append( - $("