From e6fba318845f74d89fed5209e20cf1d58559510d Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 14 Apr 2021 15:18:05 +0200 Subject: [PATCH] Close calendar popup with Esc --- www/calendar/inner.js | 6 ++++++ www/common/outer/calendar.js | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/www/calendar/inner.js b/www/calendar/inner.js index 6b9f95685..0a0ca209b 100644 --- a/www/calendar/inner.js +++ b/www/calendar/inner.js @@ -733,6 +733,12 @@ Messages.calendar_allDay = "All day"; }); }); + $('body').on('keydown', function (e) { + if (e.which === 27) { + $('.tui-full-calendar-floating-layer').hide(); + } + }); + updateDateRange(); renderCalendar(); diff --git a/www/common/outer/calendar.js b/www/common/outer/calendar.js index bedf74676..b9f25462c 100644 --- a/www/common/outer/calendar.js +++ b/www/common/outer/calendar.js @@ -138,7 +138,6 @@ ctx.calendars[channel] = { var teamId = cfg.storeId; var data = cfg.data; var channel = data.channel; - console.error(cfg); if (!channel) { return; } var c = ctx.calendars[channel];