summaryrefslogtreecommitdiff
path: root/public/assets
diff options
context:
space:
mode:
Diffstat (limited to 'public/assets')
-rw-r--r--public/assets/js/lib/views/details/commentform.js2
-rw-r--r--public/assets/js/lib/views/details/comments.js2
-rw-r--r--public/assets/js/lib/views/details/editcomment.js4
-rw-r--r--public/assets/js/lib/views/index/threadform.js2
4 files changed, 5 insertions, 5 deletions
diff --git a/public/assets/js/lib/views/details/commentform.js b/public/assets/js/lib/views/details/commentform.js
index 2b76171..51295cb 100644
--- a/public/assets/js/lib/views/details/commentform.js
+++ b/public/assets/js/lib/views/details/commentform.js
@@ -25,7 +25,7 @@ var CommentForm = FormView.extend({
},
keydown: function(e){
- if ((e.ctrlKey || e.metaKey || e.altKey) && e.keyCode == 83) { // "s" key
+ if (((e.ctrlKey || e.metaKey || e.altKey) && e.keyCode == 83) || (e.ctrlKey && e.keyCode == 13)) { // "s" key or "ctrl + enter"
e.preventDefault()
e.stopPropagation()
this.save()
diff --git a/public/assets/js/lib/views/details/comments.js b/public/assets/js/lib/views/details/comments.js
index 1e8d127..85054de 100644
--- a/public/assets/js/lib/views/details/comments.js
+++ b/public/assets/js/lib/views/details/comments.js
@@ -97,4 +97,4 @@ var CommentsView = FormView.extend({
}
},
-}) \ No newline at end of file
+})
diff --git a/public/assets/js/lib/views/details/editcomment.js b/public/assets/js/lib/views/details/editcomment.js
index ff0190a..1db96a5 100644
--- a/public/assets/js/lib/views/details/editcomment.js
+++ b/public/assets/js/lib/views/details/editcomment.js
@@ -31,7 +31,7 @@ var EditCommentForm = FormView.extend({
},
keydown: function(e){
- if ((e.ctrlKey || e.metaKey || e.altKey) && e.keyCode == 83) { // "s" key
+ if (((e.ctrlKey || e.metaKey || e.altKey) && e.keyCode == 83) || (e.ctrlKey && e.keyCode == 13)) { // "s" key or "ctrl + enter"
e.preventDefault()
e.stopPropagation()
this.save()
@@ -50,4 +50,4 @@ var EditCommentForm = FormView.extend({
success: function(data){
window.location.href = "/details/" + data.comment.thread
}
-}) \ No newline at end of file
+})
diff --git a/public/assets/js/lib/views/index/threadform.js b/public/assets/js/lib/views/index/threadform.js
index b71eea0..0edebc8 100644
--- a/public/assets/js/lib/views/index/threadform.js
+++ b/public/assets/js/lib/views/index/threadform.js
@@ -36,7 +36,7 @@ var ThreadForm = FormView.extend({
},
keydown: function(e){
- if ((e.ctrlKey || e.metaKey || e.altKey) && e.keyCode == 83) { // "s" key
+ if (((e.ctrlKey || e.metaKey || e.altKey) && e.keyCode == 83) || (e.ctrlKey && e.keyCode == 13)) { // "s" key or "ctrl + enter"
e.preventDefault()
e.stopPropagation()
this.save()