frio mobile: fix: right offcanvas

This commit is contained in:
Extarys 2021-01-21 15:25:06 -05:00
commit 846506081c
3 changed files with 191 additions and 53 deletions

View file

@ -373,6 +373,19 @@ $(document).ready(function () {
$body.removeClass("aside-out");
});
$(".offcanvas-right-toggle").on("click", function (event) {
event.preventDefault();
// FIXME: Doesn't toggle, menu stays open even when pressing the button again
$("body").toggleClass("offcanvas-right-active");
});
$(document).on("mouseup touchend", function (event) {
var offCanvas = $(".offcanvas-right");
if (!offCanvas.is(event.target) && offCanvas.has(event.target).length === 0) {
$("body").removeClass("offcanvas-right-active");
}
});
// Event listener for 'Show & hide event map' button in the network stream.
$body.on("click", ".event-map-btn", function () {
showHideEventMap(this);