Skip to content
Snippets Groups Projects
Commit 2ad45f16 authored by Rafael Ostertag's avatar Rafael Ostertag
Browse files

Enter on input elements now performs a save and close.

parent bc9e1019
No related branches found
No related tags found
No related merge requests found
......@@ -85,7 +85,9 @@ var QfqNS = QfqNS || {};
$("input").keyup(function (event) {
if (event.which === 13) {
if (this.form.formChanged) {
this.getSaveButton().trigger("click");
this.lastButtonPress = "save&close";
n.Log.debug("save&close click");
this.submit();
}
event.preventDefault();
}
......@@ -572,6 +574,9 @@ var QfqNS = QfqNS || {};
form.resetFormChanged();
switch (this.lastButtonPress) {
case 'save&close':
window.history.back();
break;
case 'save':
if (data.message) {
var alert = new n.Alert(data.message);
......
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