Skip to content
Snippets Groups Projects
Commit 5a73c045 authored by Aria Givi's avatar Aria Givi
Browse files

modal schließt beim drücken von escp, form wird abgesendet beim drücken von enter

parent f7699a5c
No related branches found
No related tags found
3 merge requests!1262WIP: Resolve "Spendenseite Texte anpassen",!1207WIP: Resolve "Rechtschreibfehler",!1193688
$(function () { $(function () {
setFocusCreatorActionListeners(); setFocusCreatorActionListeners();
loadInitialCustomFocuses(); //loadInitialCustomFocuses();
loadInitialSelectedFocus(); //loadInitialSelectedFocus();
focusChanged(); //focusChanged();
}); });
/** /**
* Sets all action listeners for this page * Sets all action listeners for this page
*/ */
function setFocusCreatorActionListeners () { function setFocusCreatorActionListeners () {
$('.focusCheckbox').click(checkboxCheckListener); /* $('.focusCheckbox').click(checkboxCheckListener);
$('#addFocusBtn').click(() => showFocusCreateDialog('')); $('#addFocusBtn').click(() => showFocusCreateDialog(''));
$('#editFocusBtn').click(editCurrentFocus); $('#editFocusBtn').click(editCurrentFocus);
$('.save-focus-btn').click(saveFocus); $('.save-focus-btn').click(saveFocus);
...@@ -23,7 +23,17 @@ function setFocusCreatorActionListeners () { ...@@ -23,7 +23,17 @@ function setFocusCreatorActionListeners () {
}); });
$('#create-focus-modal').on('shown.bs.modal', function () { $('#create-focus-modal').on('shown.bs.modal', function () {
$('#focus-name').focus(); $('#focus-name').focus();
}); */
$(document).keydown(function(event) {
if ($("input#show-create-focus").is(':checked')) {
if (event.keyCode == 27) {
$("input#show-create-focus").prop('checked', false);
} else if (event.keyCode == 13) {
$('#customSearchForm').submit();
}
}
}); });
} }
/** /**
* Loads all the custom focuses stored in local storage * Loads all the custom focuses stored in local storage
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment