X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/78f608b114c05f1147936a57b930831e28000c1a..6adcce4e5d75fa21dea85742fa36ee3b97247b01:/app/assets/javascripts/sidebar.js diff --git a/app/assets/javascripts/sidebar.js b/app/assets/javascripts/sidebar.js index 912197b9f..e126285ab 100644 --- a/app/assets/javascripts/sidebar.js +++ b/app/assets/javascripts/sidebar.js @@ -1,16 +1,20 @@ -function openSidebar(options) { - options = options || {}; +function openSidebar() { + $("#sidebar-main") + .hide(); - $("#sidebar").trigger("closed"); - - if (options.title) { $("#sidebar_title").html(options.title); } - - $("#sidebar").width(options.width || "30%"); - $("#sidebar").css("display", "block").trigger("opened"); + $("#sidebar") + .trigger("closed") + .show() + .trigger("opened"); } function closeSidebar() { - $("#sidebar").css("display", "none").trigger("closed"); + $("#sidebar") + .hide() + .trigger("closed"); + + $("#sidebar-main") + .show(); } $(document).ready(function () {