Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
740bedc1
Commit
740bedc1
authored
May 10, 2016
by
Rafael Ostertag
Browse files
Implemented
https://project/issues/1881
parent
e16dd40c
Changes
1
Hide whitespace changes
Inline
Side-by-side
javascript/src/QfqForm.js
View file @
740bedc1
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment