Add contract parts
add procurement create prevent enter to product field
This commit is contained in:
26
backend/web/js/app.js
Normal file
26
backend/web/js/app.js
Normal file
@@ -0,0 +1,26 @@
|
||||
|
||||
|
||||
|
||||
function doPreventSubmit($selector){
|
||||
$($selector).keydown(function(e) {
|
||||
if(e.keyCode == 13) { // enter key was pressed
|
||||
e.preventDefault();
|
||||
// run own code
|
||||
return false; // prevent execution of rest of the script + event propagation / event bubbling + prevent default behaviour
|
||||
}
|
||||
});
|
||||
$($selector).keyup(function(e) {
|
||||
if(e.keyCode == 13) { // enter key was pressed
|
||||
e.preventDefault();
|
||||
// run own code
|
||||
return false; // prevent execution of rest of the script + event propagation / event bubbling + prevent default behaviour
|
||||
}
|
||||
});
|
||||
$($selector).keypress(function(e) {
|
||||
if(e.keyCode == 13) { // enter key was pressed
|
||||
e.preventDefault();
|
||||
// run own code
|
||||
return false; // prevent execution of rest of the script + event propagation / event bubbling + prevent default behaviour
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user