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,
var $container = $("<div>")
.attr("class", "control-share");
- var button = $("<a>")
- .attr("class", "control-button")
- .attr("href", "#")
- .attr("title", I18n.t("javascripts.share.title"))
- .html("<span class=\"icon share\"></span>")
- .on("click", toggle)
+ var button = this.makeButton("share", "javascripts.share.title", toggle)
.appendTo($container);
- var $ui = $("<div>")
- .attr("class", "share-ui");
-
- $("<div>")
- .attr("class", "sidebar_heading")
- .appendTo($ui)
- .append(
- $("<span>")
- .text(I18n.t("javascripts.close"))
- .attr("class", "icon close")
- .bind("click", toggle))
- .append(
- $("<h4>")
- .text(I18n.t("javascripts.share.title")));
+ var $ui = this.makeUI("share-ui", "javascripts.share.title", toggle);
// Link / Embed
.appendTo($linkSection);
$("<div>")
- .attr("class", "form-check form-group")
+ .attr("class", "form-check mb-3")
.appendTo($form)
.append(
$("<label>")
.appendTo($imageSection);
$("<div>")
- .attr("class", "form-group form-check")
+ .attr("class", "mb-3 form-check")
.appendTo($form)
.append(
$("<label>")