Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Issue #1 Create on enter

  • Loading branch information...
commit b2c4b406a86531d056f9ecda4dd13140f3f5d0e6 1 parent f8b6073
Tony Lewis authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 public/js/input.js
View
7 public/js/input.js
@@ -29,6 +29,7 @@
events: {
"click #add-input": "createInput",
+ "keypress" : "createOnEnter"
},
createInput: function () {
@@ -52,6 +53,12 @@
$(".field").val("");
$("#provided").attr("checked", false);
},
+
+ createOnEnter: function (event) {
+ if ( event.which == 13 ) {
+ this.createInput();
+ }
+ },
addInputTr: function (model) {
//The parameter passed is a reference to the model that was added
Please sign in to comment.
Something went wrong with that request. Please try again.