1 L.OSM.sidebarPane = function (options, uiClass, buttonTitle, paneTitle) {
2 var control = L.control(options);
4 control.onAdd = function (map) {
5 var $container = $("<div>")
6 .attr("class", "control-" + uiClass);
9 .attr("class", "control-button")
11 .html("<span class=\"icon " + uiClass + "\"></span>")
15 button.attr("title", I18n.t(buttonTitle));
18 button.appendTo($container);
21 .attr("class", uiClass + "-ui");
23 $("<div class='sidebar_heading d-flex'>")
25 .append($("<div class='flex-grow-1 text-break'>")
27 .text(I18n.t(paneTitle))))
29 .append($("<button type='button' class='btn-close'>")
30 .attr("aria-label", I18n.t("javascripts.close"))
31 .bind("click", toggle)));
33 options.sidebar.addPane($ui);
35 this.onAddPane(map, button, $ui, toggle);
40 if (!button.hasClass("disabled")) {
41 options.sidebar.togglePane($ui, button);
43 $(".leaflet-control .control-button").tooltip("hide");
49 // control.onAddPane = function (map, button, $ui, toggle) {