From 789dbb1e734885bd7cf5ad25f0d2f47765a13657 Mon Sep 17 00:00:00 2001 From: pep Date: Tue, 21 Jul 2020 20:48:09 +0000 Subject: attempt at merge --- public/assets/js/lib/views/details/commentform.js | 2 +- public/assets/js/lib/views/details/comments.js | 2 +- public/assets/js/lib/views/details/editcomment.js | 4 ++-- public/assets/js/lib/views/index/threadform.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'public/assets/js/lib') 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() -- cgit v1.2.3-70-g09d2