Allow closing modals by clicking on the background
Cherry-pick #4044 Fixes #4895
This commit is contained in:
committed by
Frédéric Guillot
parent
de7c1bf16b
commit
6ca955de1f
@@ -27,7 +27,7 @@ KB.keyboardShortcuts = function () {
|
||||
|
||||
KB.onKey('?', function () {
|
||||
if (! KB.modal.isOpen()) {
|
||||
KB.modal.open(KB.find('body').data('keyboardShortcutUrl'));
|
||||
KB.modal.open(KB.find('body').data('keyboardShortcutUrl'), '', true);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -62,7 +62,7 @@ KB.keyboardShortcuts = function () {
|
||||
|
||||
KB.onKey('n', function () {
|
||||
if (! KB.modal.isOpen()) {
|
||||
KB.modal.open(KB.find('#board').data('taskCreationUrl'), 'large', false);
|
||||
KB.modal.open(KB.find('#board').data('taskCreationUrl'), 'large', true);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -70,25 +70,25 @@ KB.keyboardShortcuts = function () {
|
||||
if (KB.exists('#task-view')) {
|
||||
KB.onKey('e', function () {
|
||||
if (! KB.modal.isOpen()) {
|
||||
KB.modal.open(KB.find('#task-view').data('editUrl'), 'large', false);
|
||||
KB.modal.open(KB.find('#task-view').data('editUrl'), 'large', true);
|
||||
}
|
||||
});
|
||||
|
||||
KB.onKey('c', function () {
|
||||
if (! KB.modal.isOpen()) {
|
||||
KB.modal.open(KB.find('#task-view').data('commentUrl'), 'medium', false);
|
||||
KB.modal.open(KB.find('#task-view').data('commentUrl'), 'medium', true);
|
||||
}
|
||||
});
|
||||
|
||||
KB.onKey('s', function () {
|
||||
if (! KB.modal.isOpen()) {
|
||||
KB.modal.open(KB.find('#task-view').data('subtaskUrl'), 'medium', false);
|
||||
KB.modal.open(KB.find('#task-view').data('subtaskUrl'), 'medium', true);
|
||||
}
|
||||
});
|
||||
|
||||
KB.onKey('l', function () {
|
||||
if (! KB.modal.isOpen()) {
|
||||
KB.modal.open(KB.find('#task-view').data('internalLinkUrl'), 'medium', false);
|
||||
KB.modal.open(KB.find('#task-view').data('internalLinkUrl'), 'medium', true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user