mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-12 08:04:34 +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
3 changed files with 11 additions and 1 deletions
|
@ -306,4 +306,13 @@ $(document).on('ajax:beforeSend', 'form', function() {
|
||||||
$(this).removeAttr('novalidate');
|
$(this).removeAttr('novalidate');
|
||||||
return this.reportValidity();
|
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
|
window.I18n = I18n
|
||||||
|
|
|
@ -19,7 +19,7 @@ var DasboardCalendarWidget = (function() {
|
||||||
<% }); %>
|
<% }); %>
|
||||||
<% _.each(days, function(day) { %>
|
<% _.each(days, function(day) { %>
|
||||||
<% if (day.classes.includes('event')){ %>
|
<% 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="event-day" data-toggle="dropdown"><%= day.day %></div>
|
||||||
<div class="dropdown-menu events-container dropdown-menu-right" role="menu">
|
<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>
|
<div class="title">${I18n.t('dashboard.calendar.due_on')} <%= day.date.format(formatJS) %></div>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<div class="modal"
|
<div class="modal"
|
||||||
id="new-office-file-modal"
|
id="new-office-file-modal"
|
||||||
role="dialog"
|
role="dialog"
|
||||||
|
tabindex="-1"
|
||||||
aria-labelledby="new-office-file-modal-label">
|
aria-labelledby="new-office-file-modal-label">
|
||||||
<%= bootstrap_form_tag url: create_wopi_file_path(),
|
<%= bootstrap_form_tag url: create_wopi_file_path(),
|
||||||
html: { novalidate: "novalidate" },
|
html: { novalidate: "novalidate" },
|
||||||
|
|
Loading…
Add table
Reference in a new issue