Permalink
Browse files

Merge pull request #8 from anthonylewis/master

Tony is a champion.
  • Loading branch information...
2 parents f8b6073 + b2c4b40 commit c8076fa358d1bf14aaa707ccb28e5ce441d3909c @manewitz committed Feb 2, 2013
Showing with 7 additions and 0 deletions.
  1. +7 −0 public/js/input.js
View
@@ -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

0 comments on commit c8076fa

Please sign in to comment.