Skip to content

Commit

Permalink
master: initial Shift+Enter comment submit.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgandt committed Jan 31, 2012
1 parent 26bfd49 commit b8ffee1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions AgileZen/agilezen.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,15 @@
});
}

function bindCommentCommit() {
$('[name="story-comment-text"]').keypress(function(event) {
var code = (event.keyCode ? event.keyCode : event.which);
if(code == 13 && true == event.shiftKey) {
this.closest("form").submit();
}
});
}

$(window).on('resize', relocate);
relocate();

Expand All @@ -102,5 +111,6 @@

container.css({ 'top': (container.outerHeight() * -1) + 'px' }).show().animate({ 'top': 0 }, 600);
bindTimer();
bindCommentCommit();
});
}(this));

0 comments on commit b8ffee1

Please sign in to comment.