X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/0e78061cdba5cfb3f299f57b7643d2b396ee235b..71e7208a0aceccf47edce739803130096999da5d:/app/assets/javascripts/leaflet.share.js diff --git a/app/assets/javascripts/leaflet.share.js b/app/assets/javascripts/leaflet.share.js index 79cb95973..c518eb4e9 100644 --- a/app/assets/javascripts/leaflet.share.js +++ b/app/assets/javascripts/leaflet.share.js @@ -1,5 +1,5 @@ L.OSM.share = function (options) { - var control = L.control(options), + var control = L.OSM.sidebarPane(options), marker = L.marker([0, 0], { draggable: true }), locationFilter = new L.LocationFilter({ enableButton: false, @@ -10,28 +10,10 @@ L.OSM.share = function (options) { var $container = $("
") .attr("class", "control-share"); - var button = $("") - .attr("class", "control-button") - .attr("href", "#") - .attr("title", I18n.t("javascripts.share.title")) - .html("") - .on("click", toggle) + var button = this.makeButton("share", "javascripts.share.title", toggle) .appendTo($container); - var $ui = $("
") - .attr("class", "share-ui"); - - $("
") - .attr("class", "sidebar_heading") - .appendTo($ui) - .append( - $("") - .text(I18n.t("javascripts.close")) - .attr("class", "icon close") - .bind("click", toggle)) - .append( - $("

") - .text(I18n.t("javascripts.share.title"))); + var $ui = this.makeUI("share-ui", "javascripts.share.title", toggle); // Link / Embed @@ -47,7 +29,7 @@ L.OSM.share = function (options) { .appendTo($linkSection); $("
") - .attr("class", "form-check form-group") + .attr("class", "form-check mb-3") .appendTo($form) .append( $("