X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/1977e66ace0751b8b4fdf3b55bde367ec33e7c57..71e7208a0aceccf47edce739803130096999da5d:/app/assets/javascripts/leaflet.share.js diff --git a/app/assets/javascripts/leaflet.share.js b/app/assets/javascripts/leaflet.share.js index c4a5d0265..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 @@ -44,19 +26,20 @@ L.OSM.share = function (options) { .appendTo($linkSection); var $form = $("
") - .attr("class", "standard-form") .appendTo($linkSection); $("
") - .attr("class", "standard-form-row") + .attr("class", "form-check mb-3") .appendTo($form) .append( $("