Skip to content
Snippets Groups Projects
Commit 740bedc1 authored by Rafael Ostertag's avatar Rafael Ostertag
Browse files
parent e16dd40c
No related branches found
No related tags found
No related merge requests found
......@@ -51,6 +51,7 @@ var QfqNS = QfqNS || {};
this.getDeleteButton().click(this.handleDeleteClick.bind(this));
this.setupFormUpdateHandler();
this.setupEnterKeyHandler();
this.fileUploader = new n.FileUpload('#' + this.formId, this.fileUploadTo);
this.fileUploader.on('fileupload.started', this.startUploadHandler);
......@@ -77,6 +78,22 @@ var QfqNS = QfqNS || {};
n.QfqForm.prototype.on = n.EventEmitter.onMixin;
/**
* @private
*/
n.QfqForm.prototype.setupEnterKeyHandler = function () {
$("input").keyup(function (event) {
if (event.which === 13) {
if (this.form.formChanged) {
this.getSaveButton().trigger("click");
}
event.preventDefault();
}
}.bind(this));
};
/**
*
* @private
......
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