mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-20 06:35:56 +08:00
Merge pull request #4150 from aignatov-bio/ai-sci-5257-close-all-modals-to-esc
Fix element closing on select [SCI-5257]
This commit is contained in:
commit
7446e4be9b
|
@ -306,4 +306,13 @@ $(document).on('ajax:beforeSend', 'form', function() {
|
|||
$(this).removeAttr('novalidate');
|
||||
return this.reportValidity();
|
||||
});
|
||||
|
||||
$(document).keyup(function(e) {
|
||||
if (e.keyCode == 27) {
|
||||
$('.dropdown').removeClass('open');
|
||||
$('.atwho-user-popover').popover("hide");
|
||||
$('.modal').modal("hide");
|
||||
}
|
||||
});
|
||||
|
||||
window.I18n = I18n
|
||||
|
|
|
@ -19,7 +19,7 @@ var DasboardCalendarWidget = (function() {
|
|||
<% }); %>
|
||||
<% _.each(days, function(day) { %>
|
||||
<% if (day.classes.includes('event')){ %>
|
||||
<div class="<%= day.classes %>" id="<%= day.id %>">
|
||||
<div class="<%= day.classes %> dropdown" id="<%= day.id %>">
|
||||
<div class="event-day" data-toggle="dropdown"><%= day.day %></div>
|
||||
<div class="dropdown-menu events-container dropdown-menu-right" role="menu">
|
||||
<div class="title">${I18n.t('dashboard.calendar.due_on')} <%= day.date.format(formatJS) %></div>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<div class="modal"
|
||||
id="new-office-file-modal"
|
||||
role="dialog"
|
||||
tabindex="-1"
|
||||
aria-labelledby="new-office-file-modal-label">
|
||||
<%= bootstrap_form_tag url: create_wopi_file_path(),
|
||||
html: { novalidate: "novalidate" },
|
||||
|
|
Loading…
Reference in a new issue